コード例 #1
0
 public static void Clear(this CombineInstance[] self)
 {
     for (var i = 0; i < self.Length; i++)
     {
         MeshPool.Return(self[i].mesh);
         self[i].mesh = null;
     }
 }
コード例 #2
0
ファイル: UIParticle.cs プロジェクト: 1995zmj/GameFrameDemo
        /// <summary>
        /// This function is called when the behaviour becomes disabled.
        /// </summary>
        protected override void OnDisable()
        {
            UIParticleUpdater.Unregister(this);
            if (!_shouldBeRemoved)
                particles.Exec(p => p.GetComponent<ParticleSystemRenderer>().enabled = true);
            _tracker.Clear();

            // Destroy object.
            MeshPool.Return(_bakedMesh);
            _bakedMesh = null;

            base.OnDisable();
        }
コード例 #3
0
        public void Clear()
        {
            for (var i = 0; i < combineInstances.Count; i++)
            {
                var inst = combineInstances[i];
                MeshPool.Return(inst.mesh);
                inst.mesh           = null;
                combineInstances[i] = inst;
            }

            combineInstances.Clear();

            MeshPool.Return(mesh);
            mesh = null;

            count = 0;
            hash  = -1;
            index = -1;
        }
コード例 #4
0
 public static void DiscardTemporaryMesh(Mesh mesh)
 {
     MeshPool.Return(mesh);
 }