Ejemplo n.º 1
0
        void Awake()
        {
            if (!initialized)
            {
                initialized = true;

        #if UNITY_EDITOR
        #elif UNITY_ANDROID
                ApiBindingAndroid.Install();
        #elif UNITY_IOS
                ApiBindingIos.Install();
        #endif

        #if UNITY_5_4_OR_NEWER
                UnityEngine.SceneManagement.SceneManager.sceneLoaded += (scene, mode) => {
                    UnityDependency.OnSceneLoaded(scene, scene.buildIndex, scene.name, scene.path, (int)mode);
                };
                UnityEngine.SceneManagement.SceneManager.sceneUnloaded += (scene) => {
                    UnityDependency.OnSceneUnloaded(scene, scene.buildIndex, scene.name, scene.path);
                };
                TapjoyUnity.Internal.UnityDependency.sceneCount = () => {
                    return(UnityEngine.SceneManagement.SceneManager.sceneCount);
                };
                TapjoyUnity.Internal.UnityDependency.GetSceneAt = (index) => {
                    return(UnityEngine.SceneManagement.SceneManager.GetSceneAt(index));
                };

                TapjoyUnity.Internal.UnityDependency.ToJson = JsonUtility.ToJson;
        #endif
            }
        }
Ejemplo n.º 2
0
   void Awake()
   {
 #if UNITY_EDITOR
 #elif UNITY_ANDROID
       ApiBindingAndroid.Install();
 #elif UNITY_IOS
       ApiBindingIos.Install();
 #endif
   }
Ejemplo n.º 3
0
        void Awake()
        {
            if (!initialized)
            {
                initialized = true;

        #if UNITY_EDITOR
        #elif UNITY_ANDROID
                ApiBindingAndroid.Install();
        #elif UNITY_IOS
                ApiBindingIos.Install();
        #endif

        #if UNITY_5_4_OR_NEWER
                UnityEngine.SceneManagement.SceneManager.activeSceneChanged += (oldScene, newScene) => {
                    UnityDependency.OnActiveSceneChanged(Wrap(oldScene), Wrap(newScene));
                };
                UnityEngine.SceneManagement.SceneManager.sceneLoaded += (scene, mode) => {
                    UnityDependency.OnSceneLoaded(Wrap(scene), (int)mode);
                };
                UnityEngine.SceneManagement.SceneManager.sceneUnloaded += (scene) => {
                    UnityDependency.OnSceneUnloaded(Wrap(scene));
                };
                TapjoyUnity.Internal.UnityDependency.sceneCount = () => {
                    return(UnityEngine.SceneManagement.SceneManager.sceneCount);
                };
                TapjoyUnity.Internal.UnityDependency.GetActiveScene = () => {
                    return(Wrap(UnityEngine.SceneManagement.SceneManager.GetActiveScene()));
                };
                TapjoyUnity.Internal.UnityDependency.GetSceneAt = (index) => {
                    return(Wrap(UnityEngine.SceneManagement.SceneManager.GetSceneAt(index)));
                };

                TapjoyUnity.Internal.UnityDependency.ToJson = JsonUtility.ToJson;
        #endif
            }
        }