using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class BluetoothHolder : MonoBehaviour { bool debug = true; public static BluetoothHolder ins; void Awake() { if (ins) { Destroy(this.gameObject); } else { DontDestroyOnLoad(this.gameObject); } } void Start() { ins = this; if (!debug) { this.transform.Find("CanvasForOpenDebug").gameObject.SetActive(false); } CloseDebug(); } public void openDebug() { this.transform.Find("Canvas").gameObject.SetActive(true); this.transform.Find("Objects").gameObject.SetActive(true); } public void CloseDebug() { this.transform.Find("Canvas").gameObject.SetActive(false); this.transform.Find("Objects").gameObject.SetActive(false); } }