示例#1
0
        static void CheckIfSceneLoaded()
        {
            UnityEngine.SceneManagement.Scene activeScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene();

            // The will be clean if the user loaded a scene, or reloaded the current active one. But
            // this will not handle the case where the user has reloaded the same scene but it had no changes

            // The HashCode of the scene will change if the user reloaded the current active scene.
            if (activeScene.isDirty == false ||
                previousSceneHashCode != activeScene.GetHashCode())
            {
                if (onLoadScene != null)
                {
                    onLoadScene();
                }
            }
        }
示例#2
0
        static StackObject *GetHashCode_15(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            UnityEngine.SceneManagement.Scene instance_of_this_method = (UnityEngine.SceneManagement.Scene) typeof(UnityEngine.SceneManagement.Scene).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            var result_of_this_method = instance_of_this_method.GetHashCode();

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);

            __intp.Free(ptr_of_this_method);
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }