Search code examples
c#listunity-game-engineinstantiationgameobject

How to put gameObjects into the list?


I have gameObjects and I need to put them to the list, something like that:

List<GameObject> unityGameObjects = new List<GameObject>();


Solution

  • I found the solution for my question, thereby I'll ask my question, maybe it will be helpful for someone else:

     unityGameObjects.Add(GameObject.Find(unityObject.Value));