Skip to content

Commit 7b7aac9

Browse files
Minor documentation improvements
1 parent bd4cd01 commit 7b7aac9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation/docs/api/unload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The unload function is only available in Unity Builds created with Unity 2020.1
1515
:::
1616

1717
:::warning
18-
Normally it was possible to unmount the Unity Application and unmount the containing component right after the unload function was invoked, but due to a bug in newer Unity version this is no longer possible when using a builds made with Unity 2021.2 or later. It is still possible to unload the Unity Application, but the canvas has to kept mounted until the promise is resolved. As of writing this, the issue has not been fixed, but it is possible to unmount the Unity Application manually by halting the navigation to the next page. A ticket has been openend, this is a know issue by the Unity team. More information can be found on the [issue on GitHub](https://github.com/jeffreylanters/react-unity-webgl/issues/250).
18+
Normally it was possible to unmount the Unity Application and unmount the containing component right after the unload function was invoked, but due to a bug in newer Unity versions this is no longer possible when using a build made with Unity 2021.2 or later. It is still possible to unload the Unity Application, but the canvas has to be kept mounted until the promise is resolved. As of writing this, the issue has not been fixed, but it is possible to unmount the Unity Application manually by halting the navigation to the next page. A ticket has been opened, this is a known issue by the Unity team. More information can be found on the [issue on GitHub](https://github.com/jeffreylanters/react-unity-webgl/issues/250).
1919
:::
2020

2121
When building a multi-page React Application, it is important to unload the Unity Application in order to completely unmount the component from the DOM to free up the memory taken by the Unity JavaScript heap, and without Unity throwing an error. Invoking the function will request the Unity Application to be unloaded from memory. The function will return a Promise that will be resolved when the Unity Application has been unloaded.

0 commit comments

Comments
 (0)