public static PoolDataController SpawnFromGroup(string group, string type, string name, Transform toParent, Vector2 position, GenericParams parms) { PoolController pc = GetPool(group); if (pc != null) { return(pc._Spawn(type, name, toParent, new Vector3(position.x, position.y, 0f), null, parms)); } return(null); }
public static PoolDataController SpawnFromGroup(string group, string type, string name, Transform toParent, Vector3 position, Quaternion rotation, GenericParams parms) { PoolController pc = GetPool(group); if (pc != null) { return(pc._Spawn(type, name, toParent, position, rotation, parms)); } return(null); }
public static T SpawnFromGroup <T>(string group, string type, string name, Transform toParent, Vector3 position, GenericParams parms) { PoolController pc = GetPool(group); if (pc != null) { var spawned = pc._Spawn(type, name, toParent, position, null, parms); if (spawned) { return(spawned.GetComponent <T>()); } } return(default(T)); }