Skip to content

Commit be05866

Browse files
Added unloading to the Unity Tests package
1 parent 3506226 commit be05866

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

testing/src/unity-test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const UnityTest: FunctionComponent = () => {
1919
addEventListener,
2020
removeEventListener,
2121
takeScreenshot,
22+
unload,
2223
} = useUnityContext({
2324
codeUrl: "/unitybuild-2020-1/example-app.wasm",
2425
dataUrl: "/unitybuild-2020-1/example-app.data",
@@ -83,6 +84,9 @@ const UnityTest: FunctionComponent = () => {
8384
style={{ border: "1px solid red", height: 300, width: 400 }}
8485
ref={canvasRef}
8586
/>
87+
<p>
88+
<button onClick={() => unload()}>Unload</button>
89+
</p>
8690
</div>
8791
);
8892
};

0 commit comments

Comments
 (0)