Example #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        CatapultPowerUI myTarget = (CatapultPowerUI)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"))
            {
            }
        }
    }
Example #2
0
 public void TogglePowerUI(bool value)
 {
     if (oldPowerValue == value)
     {
         return;
     }
     if (value)
     {
         powerUI.Show();
     }
     else
     {
         powerUI.Hide();
     }
     oldPowerValue = value;
 }