private void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); } }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
// Start is called before the first frame update void Start() { playerUI.transform.localPosition = new Vector3(-300, -300, 0); PlayerUI.SetupUI(Player); // ダイアログが非表示になっていたら表示させておく. fadeManager = GameObject.Find("FadeCanvas").GetComponent <FadeIOManager>(); fadeManager.dialogWindow.SetActive(true); dialogCanvas = fadeManager.dialogWindow.GetComponent <CanvasGroup>(); dialogCanvas.ignoreParentGroups = true; DialogTextManager.instance.SetScenarios(new string[] { "町についた" }); }