virtual reality - How do I use SteamVR_LoadLevel to fade between scenes in unity3d? -


i've got @ top,

    public gameobject maincamera 

and i've got within if statement,

    steamvr_loadlevel tempload = maincamera.getcomponent<steamvr_loadlevel>();     tempload.fadeouttime = 1f;     tempload.fadeintime = 1f;     tempload.trigger(); 

but i'm getting error when triggering if statement,

coroutine 'loadlevel' couldn't started because the game object 'camera (head)' inactive!

edit 1. figured out, should have made maincamera variable of type steamvr_camera , should have nullchecked tested being active , enabled.

check state game object "camera (head)" in hierarchy window , active him


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

python 2.7 - Lines in my code being skipped and I am not sure why -

python - multiprocessing pool with map -