UnityWebController constructor
UnityWebController({
- required dynamic listenMessageFromUnity(
- String data
Implementation
UnityWebController({required Function(String data) listenMessageFromUnity}) {
html.window.addEventListener('message', (event) {
listenMessageFromUnity((event as html.MessageEvent).data.toString());
refreshUnityView();
});
}