Beispiel #1
0
 void OnShowHideBtnClick()
 {
     if (handler.isShow)
     {
         handler.Hide();
     }
     else
     {
         handler.Show();
     }
 }
Beispiel #2
0
    void DrawContentTitle(PlatHandler content)
    {
        GUILayout.BeginHorizontal();
        content.isFreeze = !GUILayout.Toggle(!content.isFreeze, "", GUILayout.Width(20));
        GUILayout.Label(content.gameObject.name, GUILayout.Width(110));

        EditorGUI.BeginChangeCheck();
        bool isShow = GUILayout.Toggle(content.isShow, "show", GUILayout.Width(80));

        if (EditorGUI.EndChangeCheck())
        {
            if (isShow)
            {
                content.Show();
            }
            else
            {
                content.Hide();
            }
        }

        GUILayout.EndHorizontal();
    }