Can't access an object which is in DontDestroyOnLoad
Hello guys, first of all i want to say that i am a complete noob concerning unity programming therefore i would gladly appreciate your help. So my problem is that i have a background music object in...
View ArticleDont destroy on load is destroying my Game Manager
using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public class GameManager : MonoBehaviour { public static GameManager Instance { get { if(_instance !=null) { return...
View Articlehow do i make an instantiated object be a child of DontDestroyOnLoad object's...
i tried it and final after searching a loot i couldn't find any answer to it .. i have a game object that contains a canvas, in that canvas i have inventory and i am dynamically adding items in to it...
View ArticleDestroy on load/Properties Issue
So I have been trying and trying to resolve this issue. Basically the integer value for the color is assigned to theUI script in one scene and It is defiantly assigned. Next scene the Material changer...
View ArticleCan I add an exemption on DontDestroyOnLoad?
I am currently using DontDestroyOnLoad on my game objects. However, can I add an exemption to this? Like a particular game object will be destroyed?
View ArticleShared canvas for some scenes
Most of the scenes use a common canvas and eventsystem, so I add the code DontDestroyOnLoad to them. However, other scenes, such as the main menu, will use an other canvas. What's the best practice here?
View ArticleDestroying DontDestroyOnLoad
Hello Unity community ;) lovely as always, Okay so here is the question: I'm developing a multiplayer game and all is swell, so far... But the problem is the "LobbyManager" is dont DestroyOnLoad and...
View ArticleDestroying Dontdestroyonload in code
Hello unity community your looking good! Cough Cough enough of that, Sooo here is the question: I'm trying to destroy the dontdestroyonload after the match finishes... in my game but I have no clue how...
View ArticleDontDestroyOnLoad problem
Hi I'm trying to have a song start in Scene 1 and then continue through to Scene 2. But if Scene 3 happens, I want the audio to stop. I have Scene 1 to Scene 2 worked out. But for some reason I can't...
View ArticleOn Click Missing Audio Object when Scene changes
Not sure if this is a common problem, but it has been frustrating me for hours. I have a Main Menu. Two Buttons. Play and Exit I assign an on Click Event to the play an audio when clicked. ![alt...
View ArticleCanvas will only appear on the game screen when its child of a new loaded...
So I have a gameobject which loads new scenes when nessesarry. The script attached to the game object has a variable which holds the reference to a canvas element(the canvas element has a progressbar)....
View ArticleOne 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 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