Questions tagged [scene-manager]

class in UnityEngine.SceneManagement for managing scenes in unity

56 questions
0
votes
2 answers

Unity 3D Collision on gameobject not working

I've made a code where once you collide on a gameobject, it will go to a different scene, the gameobject is a bed, I've applied a tag named Bed, I've applied a rigidbody, I've applied the code to the player where once you collide the code will…
0
votes
1 answer

How can I share scores via 2 scenes in Unity

I am a New person to Unity. My problem is that I have a Score in my first scene which is the position of z of the player. I want it to save it to the HighScore using PlayerPrefs. I have 2 empty objects named MenuManager and GameManager and they have…
0
votes
1 answer

button.OnClick listener triggers twice

My play button in scene changes the current menu scene to the actual level scene. I added the listener method in the form of a delegate: playLevel.onClick.AddListener(delegate { LoadLevel();}) Most of the times it works perfectly fine, but…
0
votes
1 answer

How to keep player skin through restart

I'm trying to keep the player skin, even when reloading the scene, or moving on to a new one. The player object changes every scene. The player skin is chosen in a pause menu, with three buttons. Each one of those buttons calls a function in the…
Emilia
  • 15
  • 5
0
votes
1 answer

Unity - unable to list all scenes in a project

In my app, I wanted to get a list of certain scenes and their build indices at start up of a particular scene. The probability is that none of the scenes has yet been loaded. To do this I tried SceneManager.GetSceneByName() - I have the names of the…
nmw01223
  • 1,611
  • 3
  • 23
  • 40
0
votes
1 answer

How to fix unity error CS0176 with scenemanager

My Problem is the following: I´m trying to code a script for Unity with which I can change the scene when one specific Object was clicked. But I get the following error: NewBehaviourScript.cs(19,21): error CS0176: Member…
Jusses
  • 1
  • 1
0
votes
2 answers

scene gets not destroyed when loading another

I have a problem with the ScenManager of my unity android app. When I start a new Scene the old scene is activ and work but the new scene is shown an work. I want that only the new scene work. // here I load the new…
julianpjp
  • 112
  • 1
  • 8
0
votes
1 answer

Is there a way to set a scene's content to a variable?

I have a game where I need to save a scene. I'm doing this by setting the scene to a variable which I can access later. The player then goes to a main menu when they are done. The player now wants to go back to that scene, however, when it loads…
0
votes
0 answers

How to make the restart button work after the game

I'd like the restart-button to work after the game, not only during the game. The button is there (visible) during the game, but it only works during the game. Whenever "gameOn is false, the button stops working. I just learning how to write code,…
Senseless
  • 99
  • 1
  • 8
0
votes
1 answer

Why doesnt my scene finish loading Unity?

Hi I'm currently developing a game in Unity and I run into a small problem for some reason the fourth scene I'm creating(Level 3) gets stuck and doesnt finish loading preventing my game from transitioning from scene 2(Level 2) to scene 3(Level 3). I…
0
votes
1 answer

Unity iOS crash when unloading assetbundle scene

I have separated some mini games in another project to load them all in one project. I have created asset bundles successfully with Unity 2018.4.9 version and put them into StreamingAssets folder. Unity Editor loads and unloads scenes successfully…
Ali Avcı
  • 1,281
  • 1
  • 11
  • 24
0
votes
1 answer

How can I make a method that runs before any scene is loaded?

I'm currently making a game in Unity and I ran into a problem. Essentially what I'm currently trying to do is load a huge list of objects that I require for future scenes in my Recource folder and load them before any scene including the startup…
0
votes
1 answer

How to change scenes in Unity with any input (key pressed or mouse clicked)?

I'm trying to change the scene with any key pressed or mouse clicked but it doesn't seem to be giving any response in-game. I've tried the most common solution to this on the internet : using System.Collections; using…
HSN720
  • 71
  • 2
  • 12
0
votes
1 answer

How to load the right scene

Hey I am making a gameover screen for my game. I want it to get gameover screen, then when player dies it restarts that level. I made it in a inefficient way making multiple gameover screens then connecting each gameover to their scene so it could…
0
votes
0 answers

Coroutine couldn't be started because the game object 'Scene Loader' is inactive

I have already searched in the Internet, also this link, and this link but didn't find the specific problem I have now. I have a main scene with 2 buttons, where each button should open other scene (button 1 => scene 1, button 2 = > scene 2) and in…
Johny
  • 625
  • 2
  • 6
  • 26