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

java - SSE Emitter : Manage timeouts and complete() -

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

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -