示例#1
0
 //初始化回调对象
 public static void InitCallback()
 {
     lock (_lock)
     {
         if (_instance == null)
         {
             GameObject callback = GameObject.Find(CB_OBJ);
             if (callback == null)
             {
                 callback = new GameObject(CB_OBJ);
                 UnityEngine.Object.DontDestroyOnLoad(callback);
                 _instance = callback.AddComponent <EMSDKCallback>();
             }
             else
             {
                 _instance = callback.GetComponent <EMSDKCallback>();
             }
         }
     }
 }
示例#2
0
 public void Init()
 {
     EMSDKCallback.InitCallback();
 }