SteamVR Developer Hardware

SteamVR Developer Hardware

Unity SteamVR_LoadLevel what is the proper way to use?
Hello I'm attempting to use the SteamVR_LoadLevel to transition scenes easier in my Unity Game. Currently I'm just switching the normal Application.LoadLevel("LevelToLoad"); with the SteamVR_LoadLevel.Begin("LevelToLoad");. This seems to be working fine for fading into the default SteamVR loading room (a.k.a. "white room"), then fading into the "LevelToLoad". But I cannot get the Skybox to load & I don't know how to change the hand models.

I've tried dragging over my Skybox images (top, botton, front, back, left, right) onto the SteamVR_LoadLevel.cs script & SteamVR_Skybox.cs script. BUT when I try and debug the SteamVR_LoadLevel.cs script it always shows the "front" texture as NULL.
Do I need to add the SteamVR_LoadLevel.cs script onto an object in the scene to set the Skybox textures? Or do I need to do something else?

Is there an example scene using SteamVR_LoadLevel within the SteamVR plugin for Unity (I might be blind to that example scene. Or does someone else have an example)?

Also is there any way to change the Vive Wand models within the transition scene (so they match the models I'm using in my game)?

And finally is there any way to load in GameObjects into the transition scene? (I'm not entirely sure how SteamVR_LoadLevel works. If it's just loading an intermediate scene then I would hope we would be able to load in our GameObjects into that scene. BUT if we are just passing Textures to the SteamVR program and letting that handle loading the transition scene then I could see us not being able to load in GameObjects.)
< >
1-7 / 7 のコメントを表示
I can tell you how I did these.
I use the SceneManager to load the level rather than application.loadlevel.
I added a SteamVR_Skybox and populated it, no more white room. background matches my game and new scene fades in when when the scene has loaded.
I added models of my hands to the controllers and turned off the automatic models that are used.
drohack 2016年10月26日 12時41分 
Bangerman の投稿を引用:
I can tell you how I did these.
I use the SceneManager to load the level rather than application.loadlevel.
I added a SteamVR_Skybox and populated it, no more white room. background matches my game and new scene fades in when when the scene has loaded.
I added models of my hands to the controllers and turned off the automatic models that are used.

Ah right, Application.LoadLevel("LevelToLoad") is deprecated and SceneManager.LoadScene("LevelToLoad") is the correct way of loading a scene in Unity.

When you say you "added a SteamVR_Skybox and populated it". Do you mean you created a new GameObject that held the SteamVR_Skybox script to your scene? Did you need to make that GameObject "DontDestroyOnLoad"?
yes to adding the skybox to a gameobject. You probably need to make it dont destroy on load.
drohack 2016年10月26日 18時35分 
I added the SteamVR_Skybox to a GameObject (and set to DontDestroyOnLoad). And loading the scenes with SceneManager.LoadScene("LevelToLoad") now have the correct skybox.
BUT my hand models are still switching to the default Wand models. (they're not keeping the models I switched them out with in my [CameraRig]).
My hierachy looks like this

GameCameraRoot // the room
-[CameraRig]
-- Controller (left)
-- MyLeftHandModel
-- Model // (SteamVR_RenderModel disabled)
........

Works a treat
最近の変更はBangermanが行いました; 2016年10月27日 2時43分
Doesn't the recommended SceneManager.LoadSceneAsync work?
The syntax is: public static AsyncOperation LoadSceneAsync(string "sceneName", SceneManagement.LoadSceneMode mode = LoadSceneMode.Single);
In case someone tries to use this with SteamVR 2.0:
First thing I forgot is the
using Valve.VR;
< >
1-7 / 7 のコメントを表示
ページ毎: 1530 50

投稿日: 2016年10月26日 9時19分
投稿数: 7