Skip to content

Commit 419b98d

Browse files
Updated readme
1 parent 0898e3f commit 419b98d

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

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

2828

2929

30-
<br/><br/>
31-
---
30+
<br/><br/><br/>
3231
# Installation
3332
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).
3433

@@ -39,8 +38,7 @@ $ npm install react-unity-webgl
3938

4039

4140

42-
<br/><br/>
43-
---
41+
<br/><br/><br/>
4442
# Usage
4543
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).
4644

@@ -86,8 +84,7 @@ this.myCustomModule = { ... }
8684

8785

8886

89-
<br/><br/>
90-
---
87+
<br/><br/><br/>
9188
# Calling Unity scripts functions from JavaScript in React
9289
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.
9390

@@ -124,8 +121,7 @@ public class SpawnController: MonoBehaviour {
124121

125122

126123

127-
<br/><br/>
128-
---
124+
<br/><br/><br/>
129125
# Calling JavaScript functions within React from Unity scripts
130126
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.
131127
```js
@@ -177,8 +173,7 @@ public class MenuController: MonoBehaviour {
177173

178174

179175

180-
<br/><br/>
181-
---
176+
<br/><br/><br/>
182177
# Notes
183178
## Best practices for adding the src and loader files on a public path
184179
Make sure your Unity build is in your public folder, this is due to the component **and** Unity itself will load files in Runtime and not Compile/Bundle time. The public folder means that the folder should be accesible via a public web adress. The path within your `src` and `loader` should be relative to the html file your app is running in.
@@ -191,7 +186,6 @@ Simple numeric types can be passed to JavaScript in function parameters without
191186

192187

193188

194-
<br/><br/>
195-
---
189+
<br/><br/><br/>
196190
# Contributing
197191
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)