Search Unity

Prefab Can't be Controlled if Instantiated

Discussion in 'Prefabs' started by Ant85, Jan 10, 2020.

  1. Ant85

    Ant85

    Joined:
    Sep 30, 2018
    Posts:
    6
    Problem has been solved.
     
    Last edited: Jan 11, 2020
  2. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    426
    Hi, you could leave your original post and reply with a solution for others, thanks :)

    edit, you control instantiated objects like this for example:

    public GameObject worldObject;
    GameObject worldObjectInstantiate;

    worldObjectInstantiate = Instantiate(worldObject, transform.position, Quaternion.identity);
    worldObjectInstantiate.transform.parent = this.transform;
    worldObjectInstantiate.transform.localRotation = Quaternion.Euler(-90, 0, 90);
     
    Last edited: Feb 1, 2020
    mhedges likes this.