public ConfigUI() { if (Instance == null) { Instance = FindObjectOfType(typeof(ConfigUI)) as ConfigUI; if (Instance == null) { GameObject go = new GameObject().AddComponent <ConfigUI>().gameObject; go.name = "SlotExtenderZero.ConfigUI"; Instance = go.GetComponent <ConfigUI>(); } } else { Instance.Awake(); } }
public void Awake() { useGUILayout = false; Instance = this; InitItems(); }