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

Preserve particles when changing scene

In Unity 5, I have a "Title" scene with a particle system that simulates snow falling from the sky. When the player clicks the Start button, I change scene to the "Game" scene. I want to keep the snow...

View Article


DontDestroyOnLoad() not instantiated the first time game is run

Hello, I asked this question a little bit ago but it's disappeared in the endless sea of questions so I thought I'd ask it again with the chance to reword my question. I've made a game that has a...

View Article


functions dont destroy on load gameobject can be used only once from the...

hi guyz I am making a game and i am trying to use the functions present in dontdestroyonload game object but it can only be used once from the scene in which the game object is actually present and...

View Article

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

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


Don'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 Article

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

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


pass 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


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 Article

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

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

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


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

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


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

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


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

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

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
Browsing all 416 articles
Browse latest View live


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