private void PickSpawnablesAtRandom() { var theObj = spawnablesList[Random.Range(0, spawnablesList.Count)]; IId id = theObj.GetComponent <IId>(); if (id != null) { spawnObjId = id.GetId(); spawnObjType = id.GetObjType(); } }
public string GetObjType(GameObject obj) { IId id = obj.GetComponent <IId>(); if (id != null) { return(id.GetObjType()); } else { return(null); } }