using UnityEngine; using System.Collections; using System.Runtime.InteropServices; using System.Collections.Generic; using System; namespace WeChatWASM { public class LaunchProgressParams { public string callbackId; public string res; } public class WXLaunchEventListener { #if UNITY_WEBGL [DllImport("__Internal")] #endif private static extern string WXOnLaunchProgress(); public Action OnLaunchProgressAction; public static Dictionary Dict = new Dictionary(); public WXLaunchEventListener(Action action) { var id = WXOnLaunchProgress(); Dict.Add(id, this); OnLaunchProgressAction+=action; } } }