unity-game-enginevirtual-realityphotonzenjectprefab

How to instantiate a prefab and set its dependencies with PHOTON


Im trying to isntantiate a prefab with photon bit i have this issue enter image description here

Thats because the prefab im trying to instantiate needs some dependencies from de scene like the camera enter image description here enter image description here

Any ideas how can i do this?? :/

Thanks a lot!


Solution

  • Just try to assign the object in the script. If you need the camera use

    followObject = GameObject.FindWithTag("MainCamera");
    

    or

    followObject = Camera.main;
    

    in the Start() method.