public void AddUnactivateObject(Spawnable spawnableObject) { int typeIndex = spawnableObject.GetSpawnableObjetsType(); if (_unactivedSpawnableObjects.ContainsKey(typeIndex)) { _unactivedSpawnableObjects[typeIndex].Add(spawnableObject); } else { Debug.LogWarning("Tried to spawn a spawnable object, that its prefab werenn't added to the pref pool array, please add the prefab to the SpawnsPoolManager prefabs array"); } }