- Home /
Question by
OkeanTR · Dec 11, 2015 at 01:56 PM ·
findobjectsoftype
FindObjectsOfType not find all objects and code not do anything
Why this code not work ? When i look Inspector it took only Five Objects and that objects not deactive himself. I added my Yoket script to all my objects and activate IEnumerator from another script. (No Error)
private Yoket[] platformList;
public IEnumerator RestartGameCo()
{
platformList = FindObjectsOfType<Yoket> ();
for(int i = 0; i < platformList.Length; i++)
{
platformList[i].gameObject.SetActive (false);
}
}
Comment