Skip to content

Commit a90f482

Browse files
Resolved incorrect anchor links in older versions of the documentation
1 parent 14cf64b commit a90f482

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

documentation/docs/getting-started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Before installing the module, make sure you're installing a version which is com
1414

1515
- [React](https://reactjs.org) version >= 16.8.0 or above
1616
- [Unity](https://unity.com) version >= 2020.1.0 or above
17-
- If you are using an older version of Unity which does not support Web Assemly, using a module version prior to version 9 is required. To find out more, read the [Compatibility](#compatibility) section below.
17+
- If you are using an older version of Unity which does not support Web Assemly, using a module version prior to version 9 is required. To find out more, read the Unity Version Compatibility section below.
1818

1919
## Unity Version Compatibility
2020

documentation/versioned_docs/version-6.x.x/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting Started
22

3-
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).
3+
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.
44

55
```js
66
import React from "react";

documentation/versioned_docs/version-8.x.x/api/communication-from-unity-to-react.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Keep in mind communication from Unity to React is global, so Event Listeners wit
99
:::
1010

1111
:::info
12-
Simple numeric types can be passed to JavaScript in function parameters without requiring any conversion. Other data types will be passed as a pointer in the emscripten heap (which is really just a big array in JavaScript). For strings, you can use the Pointerstringify helper function to convert to a JavaScript string. You can read more about parameters and [JavaScript to Unityscript types](#javascript-to-unityscript-types) here.
12+
Simple numeric types can be passed to JavaScript in function parameters without requiring any conversion. Other data types will be passed as a pointer in the emscripten heap (which is really just a big array in JavaScript). For strings, you can use the Pointerstringify helper function to convert to a JavaScript string. You can read more about parameters and [JavaScript to Unityscript types](/docs/8.x.x/concepts/javascript-to-unityscript-types) here.
1313
:::
1414

1515
```ts showLineNumber
@@ -61,7 +61,7 @@ function App() {
6161

6262
To emit the Event Listener we've just created, we'll have to create a new JSLib file within our Unity Project first. This JSLib file will be places within the "Assets/Plugins/WebGL" directory. The JSLib itself has nothing to do with this module, it is natively supported by Unity and is used for all communication between your CSharp and JavaScript in any given context.
6363

64-
We'll start of by creating a new method inside of our JSLib. The name of this method can be anything, but in this example we'll give it it the same name as our Event Name to keep things clean. In the body of the method, we'll emit our Event Listener by invoking the global method "dispatchReactUnityEvent" exposed by this module. All of your Event Listeners are available using the Event Name as the first parameter. We'll pass along the userName and the score. The userName has to go through the built-in `UTF8ToString` method (or the `Pointer_stringify` method when using Unity 2021.1 or older) in order to get the value, otherwise a int pointer will be passed instead. You can read more about parameters and [JavaScript to Unityscript types](#javascript-to-unityscript-types) here.
64+
We'll start of by creating a new method inside of our JSLib. The name of this method can be anything, but in this example we'll give it it the same name as our Event Name to keep things clean. In the body of the method, we'll emit our Event Listener by invoking the global method "dispatchReactUnityEvent" exposed by this module. All of your Event Listeners are available using the Event Name as the first parameter. We'll pass along the userName and the score. The userName has to go through the built-in `UTF8ToString` method (or the `Pointer_stringify` method when using Unity 2021.1 or older) in order to get the value, otherwise a int pointer will be passed instead. You can read more about parameters and [JavaScript to Unityscript types](/docs/8.x.x/concepts/javascript-to-unityscript-types) here.
6565

6666
```js showLineNumber
6767
// File: MyPlugin.jslib

0 commit comments

Comments
 (0)