protected override void Init() { #region On Off Instance = this; #if BUILD_SINGLESCNE_MODE foreach (var item in hides) { item.SetActive(false); } #else enabled = false; #endif #endregion base.Init(); gameObject.AddComponent <TimeConsume> (); testGroup1_title = "设备"; testGroup2_title = "品质"; testGroup3_title = "渲染"; testGroup4_title = "美术"; }
public static void Show(bool show) { if (Instance == null) { GameObject go = new GameObject("PTester_SAO"); Instance = go.AddComponent <PTester_SAO> (); } Instance.enabled = show; }
void OnGUI() { if (GUI.Button(new Rect(0, 0, 50, 50), "", GUIStyle.none)) { PTester_SAO.Show(true); } if (GUI.Button(new Rect(0, 50, 50, 50), "", GUIStyle.none)) { PTester_SAO.Show(false); } }