Skip to content

Commit 72c2be0

Browse files
author
Philipp Molitor
committed
small improvements
1 parent 0d3412d commit 72c2be0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const config: UnityLoaderConfig = {
6767
};
6868

6969
export const UnityGameComponent: VFC = (): JSX.Element => {
70+
// your need to construct a config or pass it from the props
7071
const [ctx] = useState<UnityContext>(new UnityContext(config));
7172

7273
// You can keep track of the game progress and ready state like this.
@@ -177,3 +178,5 @@ export async function fetchLoaderConfig(
177178
};
178179
}
179180
```
181+
182+
You can then use it to construct a `UnityContext` and pass this context to your `UnityRenderer` via the `context` prop.

0 commit comments

Comments
 (0)