private void OnTriggerEnter(Collider other) { if (!buttonPushed) { if (other.tag == "Table") { return; } buttonObj.transform.localPosition = new Vector3(0, 1.35f, 0); if (sceneReloader) { FindObjectOfType <AdditiveSceneMethod.AdditiveSceneController>().CallReload(2); } else { if (!shownWindow) { tutorialWindow.Show(); } else { tutorialWindow.Hide(); } shownWindow = !shownWindow; } } }
public override void OnInspectorGUI() { DrawDefaultInspector(); GenericUIWindowScript myTarget = (GenericUIWindowScript)target; if (Application.isPlaying) { if (GUILayout.Button("Show")) { myTarget.Show(); } if (GUILayout.Button("Hide")) { myTarget.Hide(); } } else { if (GUILayout.Button("Enable play mode")) { } if (GUILayout.Button("Enable play mode")) { } } }