public void SetUp() { // Ensure Pools are set up if (!PoolingSystem.HasPool <TestObject>(m_Key)) { PoolingSystem.CreatePool(m_Key, m_Obj, m_InstanceCount); } }
/// <summary> /// Create Pool for Decals using DecalData as key. /// </summary> /// <param name="decalData">DecalData to create Decals from.</param> public static void CreateDecalPool(DecalData decalData) { // Test for pooling enabled if (!decalData.poolingEnabled) { Debug.LogWarning($"Pooling is not enabled for DecalData ({decalData.name})"); return; } // Create Pool var decal = CreateDecal(decalData); PoolingSystem.CreatePool(decalData, decal, decalData.instanceCount); // Cleanup DestroyGameObject(decal.gameObject); }