File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,19 @@ type UnityContextHook = EventSystemHook & {
8888 * @returns A promise that resolves when the UnityInstance has been unloaded.
8989 */
9090 readonly unload : ( ) => Promise < void > ;
91+
92+ /**
93+ * Detatches the Unity Instance from the React DOM, by doing so, the Unity
94+ * Instance can be unloaded from the memory while the Unity component can be
95+ * unmounted safely.
96+ *
97+ * Warning! This is a workaround for the fact that the Unity WebGL instances
98+ * which are build with Unity 2021.2 and newer cannot be unmounted before the
99+ * Unity Instance is unloaded.
100+ * @see https://github.com/jeffreylanters/react-unity-webgl/issues/22
101+ * @returns A promise that resolves when the UnityInstance has been detached.
102+ */
103+ readonly UNSAFE__detachAndUnloadImmediate : ( ) => Promise < void > ;
91104} ;
92105
93106export type { UnityContextHook } ;
You can’t perform that action at this time.
0 commit comments