IEnumerator FindAllGameObjects ()
{
while ( Application.isPlaying )
{
gameObjectNames.Clear();
GameObject[] gos = FindObjectsOfType( typeof( GameObject ) ) as GameObject[];
foreach ( GameObject go in gos )
{
gameObjectNames.Add( go.name );
}
yield return new WaitForSeconds( findObjectsFrequency );
}
yield return null;
}