Skip to content

Commit 0898e3f

Browse files
Updated readme
1 parent b71f46f commit 0898e3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ When building content for the web, you might need to communicate with other elem
2727

2828

2929

30+
<br/><br/>
3031
---
3132
# Installation
3233
Install using npm. Make sure you download the release matching with your Unity version. I try to update this plugin in case of need as fast as possible. Check the [releases on GitHub](https://github.com/jeffreylanters/react-unity-webgl/releases) for the corresponding version or [view on NPM](https://www.npmjs.com/package/react-unity-webgl).
@@ -38,6 +39,7 @@ $ npm install react-unity-webgl
3839

3940

4041

42+
<br/><br/>
4143
---
4244
# Usage
4345
To get started import the default Unity class from react-unity-webgl and include it in your render while giving the public path to your src and loader files. [Best practices for adding the src and loader files on a public path](#best-practices-for-adding-the-src-and-loader-files-on-a-public-path).
@@ -84,6 +86,7 @@ this.myCustomModule = { ... }
8486

8587

8688

89+
<br/><br/>
8790
---
8891
# Calling Unity scripts functions from JavaScript in React
8992
Sometimes you need to send some data or notification to the Unity script from the browser’s JavaScript. The recommended way of doing it is to call methods on GameObjects in your content. To get started import the function SendMessage from react-unity-webgl.
@@ -121,6 +124,7 @@ public class SpawnController: MonoBehaviour {
121124

122125

123126

127+
<br/><br/>
124128
---
125129
# Calling JavaScript functions within React from Unity scripts
126130
We also allow you to call JavaScript functions within React from the Unity Content. To get started import the function RegisterExternalListener from react-unity-webgl.
@@ -173,6 +177,7 @@ public class MenuController: MonoBehaviour {
173177

174178

175179

180+
<br/><br/>
176181
---
177182
# Notes
178183
## Best practices for adding the src and loader files on a public path
@@ -185,6 +190,8 @@ Simple numeric types can be passed to JavaScript in function parameters without
185190

186191

187192

193+
194+
<br/><br/>
188195
---
189196
# Contributing
190197
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Before commiting, please compile your code using `npm run compile` and open a pull request. Thank you very much!

0 commit comments

Comments
 (0)