public void Register(ObjectsSpawnNode node) { var existingNode = Nodes.FirstOrDefault(x => x.Id == node.Id); if (existingNode != default) { #if DEBUG UnityEngine.Debug.LogError("[FactorySpawn] already contains node with id " + node.Id); #endif return; } Nodes.Add(node); }
public void Register(ObjectsSpawnNode node) { // var existingNode = Nodes.FirstOrDefault(x => x.Id == node.Id); // // if (existingNode != default) // { // #if DEBUG // UnityEngine.Debug.LogError("[FactorySpawn] already contains node with id " + node.Id); // #endif // return; // } Nodes.Add(node); _pool.Register(node.Prefab, node.RegisterCount); }