示例#1
0
        public override void OnDestroy()
        {
            if (prefabGameObject)
            {
                XResources.DestroyGameObject(path, prefabGameObject);
                particleSystems = null;
            }
            SharedPool <XSceneFxClip> .Return(this);

            base.OnDestroy();
        }
示例#2
0
        public override void OnDestroy()
        {
            if (fx)
            {
                XResources.DestroyGameObject(path, fx);
                fx = null;
            }
            ps = null;
            SharedPool <XBoneFxClip> .Return(this);

            base.OnDestroy();
        }
示例#3
0
        public static void DestroySharedAsset(string path)
        {
            if (sharedPool.ContainsKey(path))
            {
                var asset = sharedPool[path];
                asset.refence--;
                if (asset.refence <= 0)
                {
#if !UNITY_EDITOR
                    Resources.UnloadAsset(asset.asset);
#endif
                    SharedPool <Asset> .Return(asset);
                }
            }
        }
示例#4
0
 public override void OnDestroy()
 {
     if (!timeline.IsHostTrack(this))
     {
         if (mixPlayable.IsValid())
         {
             mixPlayable.Destroy();
         }
         if (playableOutput.IsOutputValid())
         {
             XTimeline.graph.DestroyOutput(playableOutput);
         }
         mixJob.Dispose();
         SharedPool <XAnimationTrack> .Return(this);
     }
     base.OnDestroy();
 }
示例#5
0
        public override void OnDestroy()
        {
            if (playable.IsValid())
            {
                playable.Destroy();
                if (track.mixPlayable.IsValid())
                {
                    track.mixPlayable.SetInputCount(0);
                }
            }
            AnimClipData anData = data as AnimClipData;

            XResources.DestroySharedAsset(anData.anim);
            SharedPool <XAnimationClip> .Return(this);

            base.OnDestroy();
        }
示例#6
0
        public virtual void OnDestroy()
        {
            Foreach(track => track.OnDestroy(), clip => clip.OnDestroy());
            ForeachMark(mark => mark.OnDestroy());

            childs = null;
            marks  = null;
            parent = null;
            if (mixs != null)
            {
                for (int i = 0; i < mixs.Count; i++)
                {
                    SharedPool <MixClip> .Return(mixs[i]);
                }
                mixs.Clear();
                mixs = null;
            }
        }
示例#7
0
 public static void DestroyGameObject(string path, GameObject go)
 {
     if (Application.isPlaying)
     {
         Object.Destroy(go);
     }
     else
     {
         Object.DestroyImmediate(go);
     }
     if (goPool.ContainsKey(path))
     {
         var it = goPool[path];
         it.refence--;
         if (it.refence <= 0)
         {
             goPool.Remove(path);
             SharedPool <Asset> .Return(it);
         }
     }
 }
示例#8
0
        public override void OnDestroy()
        {
            SharedPool <XJumpMarker> .Return(this);

            base.OnDestroy();
        }
示例#9
0
        public override void OnDestroy()
        {
            SharedPool <XTransformTrack> .Return(this);

            base.OnDestroy();
        }
示例#10
0
        public override void OnDestroy()
        {
            SharedPool <XGroupTrack> .Return(this);

            base.OnDestroy();
        }
示例#11
0
        public override void OnDestroy()
        {
            SharedPool <XPostprocessTrack> .Return(this);

            base.OnDestroy();
        }
示例#12
0
        public override void OnDestroy()
        {
            SharedPool <XActiveMark> .Return(this);

            base.OnDestroy();
        }
示例#13
0
        public override void OnDestroy()
        {
            SharedPool <XLogicClip> .Return(this);

            base.OnDestroy();
        }
示例#14
0
 public override void OnDestroy()
 {
     draw?.Destroy();
     base.OnDestroy();
     SharedPool <XLogicTrack> .Return(this);
 }