Whenever I instantiate my main player object from a prefab to the scene, all the GUIs attached to the scripts which are applied to the player don’t seem to work. I had the idea of applying all the scripts to another GameObject in the scene, then instantiating the player within the GameObject. How would I do this? and is there an easier solution? Im using C# thanks
Solved it with the following code:
public GameObject trike;
public GameObject trike2;
public GameObject test;
GameObject obj;
void Start() {
obj = (GameObject) Instantiate(trike, test.transform.position, test.transform.rotation);
obj.transform.parent = test.transform;
obj = (GameObject) Instantiate(trike2, test.transform.position, test.transform.rotation);
obj.transform.parent = test.transform;
}
}