When I load New Scene With SteamVR_LoadLevel All Controllers Freezing - unity3d

Hey i am working on VR application with unity. I have got some scenes in my project. Everythings are fine first scenes. There is a level i am using a "Player" prefab and when i start a load new scene with SteamVR_LoadLevel .Begin function, next scene loading finely and my HMD running good but the controllers freeze. I am CameraRig in next scene and i destroy Player [SteamVR] gameobject before scene with checkbox (unchecked) inside of inspector.
I was try Unity SceneManagement, or other things but i can not find a solution. By the way if i run that scene directly, every controller working fine.
Waiting your answers thank you.

I can not find solution on this problem but i change my GameObjects. I think if you use Player prefab previous scene and if you use CameraRig inside next scene then controllers freezing. Because vr action setup not same (or broken) for CameraRig. When i realized this situation, i change my CameraRig object to Player prefab. If you accept, this is my solution.

Related

Rigidbody Shivering / Shaking in only one scene in Unity 2018

Hellow, i am facing a problem in my unity project. There is a scene in which rigidbody starts shivering / shaking on play and even in the editor (during playmod). Its a very little bit countinuous and irritating. First I thought that it might be an issue with any of my script / camera. So i tried without scripts and camera but shivering still happening. Shivering happening in just scene "A" only but works fine when I create new scene and place that prefab in new Scene. But most weirdest thing is that when i place the rigidbody prefab in another scene then it works absolutely fine and when I copy the same rigidbody from scene "A" to scene "B" then shivering starts in "B" scene too. I have noticed that problem might pertains to "Wheel Colliders" of my vehicle controller script because when I make them "hidden" / if I disable the "vehiclecontroller" component shivering stops.
please give any advice / suggestions.
below is a short visual of my problem.

why am I losing all gameObjects in unity when I have more then one scene

I am trying to create a tower defense game and I made a menu scene and a level01 scene.
Now when I create some objects in the menu scene, and go to the level01 scene, I lose all my objects in my menu scene. I don't know what is going on. I have tried to create a new menu scene and duplicating my level01 scene, but it doesn't work.
You can use DontDestroyOnLoad or you can add multiple scenes and never unload the menu scene.
SceneManager.LoadScene("OtherSceneName", LoadSceneMode.Additive);
The use of a scene, as its name implies, is to prescribe a different scene and arrangement. If you can design the gameplay inside a scene and deactivate them beforehand instead of adding objects. This will make the code more consistent and will prevent future problems.
You can mark objects to keep them between loading scenes by DontDestroyOnLoad(myObject). Here is the documentation with sample code:
Object.DontDestroyOnLoad

Unity: suddenly some gameobjects stopped beeing shown

I'm a Computer Science
Engineering student. I'm currently working on a Uni project using Unity to build a 2D game. Until this morning everything was fine, but suddenly after some work on a UI Manager Script in my menu scene (Scene 0) when I tried to play the game some gameobjects (apparently random) stopped to be visualized on Scene View and on Game View in the Level scene (Scene 1).
I can see all gameobjects fine on camera preview and they all are active in the hierarchy, even all colliders are working.
I tried to look on the web, but I can't find any solution or any similar case...
I don't really have any ideas, I'll be really glad if someone can help me. Thanks.
Check the Material variable on the Sprite Renderer component and make sure it's set to "Sprites-Default". In my case, the material for the hidden objects had somehow changed to "None" while I was working on a little postprocessing effect.
Edit: Here's how the material changed. Adding a SpriteGlow script from a package which works with postprocessing had first turned the objects' SpriteRenderer material from the original "Sprites-Default" to "Sprite/Outline". Upon removing the SpriteGlow script component from the object, the material became "None" rather than defaulting back to "Sprites-Default" and that was when I stopped seeing the objects even though they were present in the scene. This is most likely your problem too since you said every other thing like collision works and the objects are definitely present in the scene.

Unity2D: Prefab not working with animator

I have a prefab that is instantiate in using my spawning script. I also have a game over panel that slide down (this is done by animation) once the player dies. The problem I'm having is that the needs to be game over panel attach to the prefab in the inspector window for the game over panel to work. This image explains everything. Please help
in Unity you can't assign scene objects to prefabs because prefabs must be usable within all your scenes, so if a scene object was assignable to a prefab then the prefab couldn't be used in another scene.

Add scene when build Unity project

When I build Unity project I saw that if I add current scene Unity or not the game still run fine.
So what is the purpose of add scene ?
If you have not added any scenes then unity will build with your current opened scene by default. The purpose of adding scene is to handle among multiple scenes like Main Menu, Store, Gameplay, Gameover etc. To get more than one scene, you have to add all the relevant scenes, otherwise unity will not recognise the scene when you want to switch to another scene.
As long as #Hamza Hasan answer is correct, I think that question author means something diffrent.
He asks why he should add scene if it works fine in Editor without this action.
So the answer is, if this scene is not first default one (and it is your case), you wont be able to load it programaticaly, as it wasnt included into build even if it works in Editor. It works in Editor couse it was loaded into memory opening the scene.