Forum Discussion
jasonh
8 years agoHonored Guest
How to get the Custom Avatar Hand Mesh to Load in More Than One Scene?
I am experiencing an issue where if I have 2 scenes in my build, and I transition to the second scene, the shading for the avatar's hands disappears.
I am executing the suggested code below in each scene:
https://developer.oculus.com/documentation/avatarsdk/latest/concepts/avatars-gsg-unity/#avatars-gsg-unity
It loads the shaders in the 1st scene, but the for some reason it doesn't load the shaders in the second scene. If I make a build with just the second scene, it loads as it should.
What is the best practice to keep the custom avatar mesh, and to perpetuate throughout the various scenes of your app/game?
Thank you for your help.
I am executing the suggested code below in each scene:
https://developer.oculus.com/documentation/avatarsdk/latest/concepts/avatars-gsg-unity/#avatars-gsg-unity
It loads the shaders in the 1st scene, but the for some reason it doesn't load the shaders in the second scene. If I make a build with just the second scene, it loads as it should.
What is the best practice to keep the custom avatar mesh, and to perpetuate throughout the various scenes of your app/game?
Thank you for your help.
1 Reply
Replies have been turned off for this discussion
- jasonhHonored Guest
Hello. Thank you for your response. I did not use this function. I'll give it a shot in the next iteration of the game.
imperativity said:
Hi,
Have you incorporated this function in your scene?
https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.htmlWhen loading a new level all objects in the scene are destroyed, then the objects in the new level are loaded.
In order to preserve an object during level loading call DontDestroyOnLoad on it.
If the object is a component or game object then its entire transform hierarchy will not be destroyed either.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 7 days ago
- 2 years ago