// Update is called once per frame void Update() { if (!haveWordsBeenSpawned) { json = jsonLevelLoader.GetComponent<JsonData>(); if(json.getIsReady()) { haveWordsBeenSpawned = true; } GameObject objective = Instantiate(objectiveObject, new Vector3(-2.5f,8.0f,0.0f), Quaternion.identity) as GameObject; WordScript scriptObjective = objective.GetComponent<WordScript>(); scriptObjective.setString(json.getObjective()); for(int i = 0;i < positionsForWords.Count;i++) { ListOfFreeIndexs.Add(i); } for (int i = 0; i < ListOfFreeIndexs.Count; i++) addWord(); } }