public void OnDestroy() { GameObject.Destroy(dustCamera); GameObject.Destroy(cameraObject); GameObject.Destroy(cameraTexture); GameObject.Destroy(cameraRenderTexture); instance = null; }
public void Start() { DontDestroyOnLoad(this); instance = this; }
public void Awake() { DontDestroyOnLoad(this); instance = this; }