Exemple #1
0
        public void CanDestroyInstance()
        {
            // Execution
            PoolingSystem.DestroyPool <TestObject>(m_Key);

            // Result
            Assert.IsTrue(ProcessorTestResults.instanceDestroyed);
            LogAssert.NoUnexpectedReceived();
        }
Exemple #2
0
        public void CanDestroyPool()
        {
            // Execution
            PoolingSystem.DestroyPool <GameObject>(m_Key);
            var hasPool = PoolingSystem.HasPool <GameObject>(m_Obj);

            // Result
            Assert.IsFalse(hasPool);
            LogAssert.NoUnexpectedReceived();
        }
Exemple #3
0
        /// <summary>
        /// Destroy Pool of Decals.
        /// </summary>
        /// <param name="decalData">Key for Pool to destroy.</param>
        public static void DestroyDecalPool(DecalData decalData)
        {
            // Test for pooling enabled
            if (!decalData.poolingEnabled)
            {
                Debug.LogWarning($"Pooling is not enabled for DecalData ({decalData.name})");
                return;
            }

            // Destroy Pool
            PoolingSystem.DestroyPool <Decal>(decalData);
        }