Ejemplo n.º 1
0
        public void dispose()
        {
            if (m_controlRes != null)
            {
                Ctx.m_instance.m_controllerMgr.unload(m_controlRes.GetPath(), null);
                m_controlRes = null;
            }

            if (m_animator != null)
            {
                UtilApi.Destroy(m_animator.runtimeAnimatorController);
            }

            if (m_nextFrametimer != null)
            {
                Ctx.m_instance.m_frameTimerMgr.delObject(m_nextFrametimer);
                m_nextFrametimer = null;
            }
            if (m_idleStateFrametimer != null)
            {
                Ctx.m_instance.m_frameTimerMgr.delObject(m_idleStateFrametimer);
                m_idleStateFrametimer = null;
            }
            if (m_oneAniEndTimer != null)
            {
                Ctx.m_instance.m_timerMgr.delObject(m_oneAniEndTimer);
                m_oneAniEndTimer = null;
            }

            m_oneAniPlayEndDisp.clearEventHandle();
        }
Ejemplo n.º 2
0
        protected void testScriptController()
        {
            string                    path    = string.Format("{0}{1}", Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathSceneAnimatorController], "SelfCardAni.asset");
            ControllerRes             res     = Ctx.m_instance.m_controllerMgr.getAndSyncLoad <ControllerRes>(path);
            RuntimeAnimatorController copyCom = res.InstantiateController();

            res.DestroyControllerInstance(copyCom);
            Ctx.m_instance.m_controllerMgr.unload(res.GetPath(), null);
        }