Quantcast
Channel: Questions in topic: "dontdestroyonload"
Browsing all 416 articles
Browse latest View live
↧

Canvas 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 Article


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 Article


DontDestroyOnLoad 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 Article

Do 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 Article

Unity 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 Article


DontDestroyOnLoad, 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 Article

Need 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 Article

dontDestroyOnLoad 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 Article


HOW 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 Article


How 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 Article

how 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 Article

Do 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 Article


Canvas 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 Article

DontDestroyOnLoad for a specific scene

I have a scene called 'game'. And a gameobject. Every time the player selects the restart button, the game scene loads again. I don't want the gameobject to destroy when the game scene is loaded fresh....

View Article


DontDestroyOnLoad Error with Firebase Analytics

Hi. I am trying to export a build to Android, but I get the following error: Error building Player: InvalidOperationException: The following game object is invoking the DontDestroyOnLoad method:...

View Article

Objects remain under DontDestroyOnLoad despite being removed from the parent

I'm trying to upgrade a project from Unity 4.6 to 5.4 and I'm having an issue with objects not being removed when loading a new scene. I have a root game object which contains the player, camera, game...

View Article


Question Regarding Don'tDestroyOnLoad Object

Hi, I want to ask one thing, I have some objects that attached with the script of Don'tDestroyOnLoad scripts so that the objects will brought to other scene... But I want a certain scene to not have...

View Article

GameObject::scene and DontDestroyOnLoad()

Hi, If I assign a `GameObject` to the `DontDestroyOnLoad()` method and then call `print(gameObject.scene.name)` it prints out *"DontDestroyOnLoad"* instead of the scene name. Is there a way to get the...

View Article

How do you transfer UI Text from one scene to another?

The scoring of my game is based on how far the player travels on the x-axis. I use this code to calculate it: public Transform player; public Text scoreText; void Update() { scoreText.text =...

View Article
Browsing all 416 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>