Exemplo n.º 1
0
 internal static void Init()
 {
     if (instance == null)
     {
         var go = new GameObject("CrossPlatformAPI");
         instance = go.AddComponent <CrossPlatformAPI>();
         GameObject.DontDestroyOnLoad(go);
     }
 }
Exemplo n.º 2
0
        private static void Init()
        {
            if (api != null)
            {
                return;
            }
            CrossPlatformAPI.Init();
#if UNITY_ANDROID && !UNITY_EDITOR
            AndroidUtil.InitCPAPI();
            api = new ShareImplAndroid();
#elif UNITY_IOS && !UNITY_EDITOR
            api = new ShareImplIos();
#else
            api = new ShareImplDummy();
#endif
        }