UNPKG

react-unity-webgl

Version:

React Unity WebGL provides a modern solution for embedding Unity WebGL builds in your React Application while providing advanced APIs for two way communication and interaction between Unity and React.

20 lines 881 B
import { UnityEventParameter } from "./unity-event-parameters"; /** * Event system for external React Unity events. */ type EventSystem = { /** * Adds an event listener for external React Unity events. * @param eventName The name of the event to listen to. * @param callback The callback to invoke when the event is fired. */ readonly addEventListener: (eventName: string, callback: (...parameters: UnityEventParameter[]) => UnityEventParameter) => void; /** * Removes an event listener for external React Unity events. * @param eventName The name of the event to remove. * @param callback The callback to remove. */ readonly removeEventListener: (eventName: string, callback: (...parameters: UnityEventParameter[]) => UnityEventParameter) => void; }; export type { EventSystem }; //# sourceMappingURL=event-system.d.ts.map