Hi, I have a problem with loading the new scene , when it is done I am everywhere, deleted GameObject. I read the script that you need to add " DontDestroyOnLoad ", I said it but it still did not help but interestingly appeared on the list MainCamera Code: Code (csharp): using UnityEngine; using System.Collections; public class Test2 : MonoBehaviour { static Test2 Instance; void Start() { if(Instance != null) { GameObject.Destroy(gameObject); } else { GameObject.DontDestroyOnLoad(gameObject); Instance = this; } } void Update() { }
I'm sorry but it's not entirely clear what it is you are trying to do... could you explain what it is you are trying to achieve?
Gross... Please watch my tutorial on Singleton Design. Also, please include more detail as to what you're trying to achieve.
Is "Test2" on all of those "deleted gameobject"s, or is it only on Main Camera? I've seen that error crop-up before but I forget what it is how or how I solved it. Are you destroying anything in the editor? Any script have ExecuteInEditMode on it?
I have a 2D game and I have done all the 1 and 2 level and at the end of the 1st mission is to " Application.LoadLevel ( " Level02 ")" and when it reads a 2- level everything is suddenly removing and this is jamming . And he wants to level 2 has loaded without a problem and was fully playable .