New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-unity-webgl

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-unity-webgl - npm Package Compare versions

Comparing version 8.3.3 to 8.3.4

2

package.json
{
"name": "react-unity-webgl",
"version": "8.3.3",
"version": "8.3.4",
"description": "React Unity WebGL provides an easy solution for embedding Unity WebGL builds in your React application, with two-way communication between your React and Unity application with advanced API's.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -55,2 +55,3 @@ <div align="center">

- [Getting Started](#getting-started)
- [Creating a Unity Context Object](#creating-a-unity-context-object)
- [Communication from React to Unity](#communication-from-react-to-unity)

@@ -97,2 +98,12 @@ - [Communication from Unity to React](#communication-from-unity-to-react)

## Creating a Unity Context Object
The core of rendering your Unity Application within your React Application is the Unity Context Object. This instance is where all the magic happens, and is used for configurating and sending and receiving messages from and to your Unity Application. If you haven't done so already, you'll first need a Unity WebGL build. Head over to [Creating Unity WebGL Builds](#creating-unity-webgl-builds) to learn more about this.
A most basic Unity Context instance consists of a Unity Config with four properties. The `loaderUrl`: a JavaScript file contain the Unity Loader that the web page needs in order to load the Unity content, the `frameworkUrl`: a JavaScript file containing the runtime and plugin code, the `dataUrl`: a custom file containg your Assets and scenes, and the `codeUrl`: a Web Assembly binary file containg native code. Sounds complicated? No worries, you don't need to remember any of this. Just add the paths to the files to the Unity Context, sit back and enjoy!
The paths to these files are public paths and should be relative from your public root or `index.html`. They will be loaded during runtime due to their enourmous size, we do not want this in our bundle since this would have impact on our entire React Application. But no worries, you can use the built-in [loading progression tracking](#tracking-the-loading-progression) in order to show some sort of loading screen.
Feed your Unity Context to one or more Unity components to start and render your Unity Application!
## Communication from React to Unity

@@ -99,0 +110,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc