MCPcopy
hub / github.com/jeffreylanters/react-unity-webgl / Window

Interface Window

module/declarations/global.d.ts:41–57  ·  view source on GitHub ↗

* Due to some developers wanting to use the window object as a global scope * in order to invoke the create Unity Instance and dispatch React Unity Event * functions, we need to declare the window object as a global type.

Source from the content-addressed store, hash-verified

39 * functions, we need to declare the window object as a global type.
40 */
41 interface Window {
42 /**
43 * Dispatches an event that has been registered to all event systems.
44 * @param eventName The name of the event.
45 * @param parameters The parameters to pass to the event.
46 */
47 dispatchReactUnityEvent: typeof dispatchReactUnityEvent;
48
49 /**
50 * Creates a new UnityInstance.
51 * @param canvasHtmlElement The target html canvas element.
52 * @param arguments The arguments needed to load Unity.
53 * @param onProgress The on progress event listener.
54 * @returns A promise resolving when instantiated successfully.
55 */
56 createUnityInstance: typeof createUnityInstance;
57 }
58}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected