One SceneManager.LoadSceneAsync across multiple scenes
Hey everyone, I'm loading a scene using SceneManager.LoadSceneAsync and it's working. Now, the scene that it's loading is huge, so I want to be able to quickly reload it if my character dies. Is there...
View ArticleDontDestroyOnLoad Duplicating Objects When Scene Reloaded
I'm aware this is a generic issue, but i'm having trouble understanding. When I reload my scene, I want to keep an object because it has previous time records. When the scene reloads, the object is...
View ArticleDo not destroy is not working ?
Hey guys have do not destroy on a game object, the do not destroy thing comes up in my hirackey yet when the next scene loads with "PhotonNetwork.loadscene" the Object disappears and gets deleted on...
View ArticleUnity Reload Scene - References missing / objects inactive upon reload
When playing the active scene, all the references are linked through inspector like the game manager ![alt text][1] However, when reaching a simple game over and pressed the restart button, all the...
View ArticleDontDestroyOnLoad, where is my error?
Hello, I'm new on Unity, so to start I'm on a little project of creating a hidden object games. I'm currently doing a prototype with the key feature. I find information (specially here) and manage to...
View ArticleNeed I put OnApplicationQuit into a DontDestroyOnLoad object?
I have some actions need to perform when the application is closed, like clearing some cached player preferences. No matter which scenes the user is, it should be executing. Should I put it in a...
View ArticledontDestroyOnLoad doesn't work as expected with scene navigation
Hi, I am a unity nab and I can't figure out this strange behaviour i have in my test game while using `dontDestroyOnLoad`. I have a `__preloadScene` that is my very first scene that gets loaded in the...
View ArticleLoading new Scene seems to break my DontDestroyOnLoad Variables
Hey guys, I've tried to research this for hours to find a solution but nothing seems to fix my problem. Maybe I am missing something that is staring me in the face... I'm not sure, my rubber ducky...
View ArticleHOW TO USE THE COMMAND DontDestroyOnLoad(); ?
i want to reset my game but when i use the command SceneManager.LoadScene, it resets all my scripts, variables,... i want to keep something dont load with scene so i use dontdestroyonload but it still...
View ArticleHow to initiate a counter when the script runs once it increments and once...
How to initiate a counter when the script runs once it increments and once called, increments again? using UnityEngine; using System.Collections; public class LoadWorldMapCounter : MonoBehaviour {...
View Article"Dont destroy on load" does not work at forst
using System.Collections; using System.Collections.Generic; using UnityEngine; public class debugPlanePrefabController : MonoBehaviour { // Use this for initialization void Start () { DontDestroyOnLoad...
View Articlehow to disable dontdestroyonload on a specific scene
hey, i'm making a 2d game that contains bonus scenes, so i manage to put my score to go over the scenes and don't destroy, so it would have the same value when the player went back to the main scene....
View ArticleDo something at the end of every scene in a DontDestroyOnLoad object
I'm using Unity 5. I have an object with a bunch of scripts that is DontDestroyOnLoad. Is there a way to detect that the current scene is ending and to have the scripts on this object do something at...
View ArticleCanvas order and DontDestroyOnLoad
Hello! I have a problem with canvas order. I have 3 scenes in game. There are canvases with own UI elements on each scene plus canvas with common UI elements which put into DontDestroyOnLoad and jorney...
View ArticleUse of DontDestroyonLoad()
I need to send a parameter from a scene to another, and I wanted to use DontDestroyonLoad(). But exactly, how can I take this parameter from the script attached to a button that I clicked to pass to...
View ArticleLosing reference to the camera after loading new scene
I am getting the error:> MissingReferenceException: The object of type 'Camera' has been destroyed but you are still trying to access it.Your script should either check if it is null or you should...
View ArticleDon't destroy On Load make object not interactable in new scene
Hi I'm having a small but annoying problem with DontDestroyOnLoad. I am loading my player into a new scene where it is supposed to interact with another object's collider in that scene. But its not...
View ArticleNetwork Lobby Example from Asset Store doesn't work on SendReturnToLobby from...
When calling the SendReturnToLobby() method after the game ends, the Client's lobby is very messed up. It shows two copies of the Server player (only one of which is active), it doesn't allow me to...
View ArticleRead variable from DontDestroyOnLoad GameObject C#
Hi I have a DontDestroyOnLoad GameObject that moves from Scene 1 to Scene 2. I also have a GameObject in Scene 2 that has to read an int from the DontDestroyOnLoad Object. Here is the Script...
View Articlepass data between scene for game settings?
Ok, i've already read about passing data between scenes with gameobjects, components and Dontdestroyonload(), but what i mean here is : how can i handle this data to set up my gameplay in the loading...
View Article