Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();


        if (GUILayout.Button("Repaint"))
        {
            RepaintButton();
        }

        if (GUILayout.Button("ChangeBlock"))
        {
            for (int i = 0; i < targets.Length; i++)
            {
                if (targets[i] is CommonButton)
                {
                    CommonButton btnTarget = (CommonButton)targets[i];
                    btnTarget.ChangeBlock();
                    btnTarget.SetStyle();
                    btnTarget.SetBlock();
                }
            }
        }

        if (GUI.changed)
        {
            RepaintButton();
        }
    }