Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if UNITY_WEBGL && !UNITY_EDITOR
- using System;
- using System.Runtime.InteropServices;
- using AOT;
- public static class WebGLBridge {
- public static event Action OnReady;
- [DllImport("__Internal")]
- private static extern void Init(Action onReady);
- #region Handlers
- [MonoPInvokeCallback(typeof(Action))]
- private static void ReadyHandler() {
- OnReady?.Invoke();
- }
- #endregion
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement