Value set in Editor isnt persistent in Playmode.

I try to change a variable in edit mode with a function via [ContextMenu(“SwitchInstructor”)] but after I started the play mode the variable is still false.

public class GameManager : Singleton<GameManager>
{
    private bool isInstructor = false;
    public bool IsInstructor
    {
        set
        {
            isInstructor = value;
            Debug.Log("IsInstructor " + isInstructor + "  " + GetInstanceID());
        }
        get
        {
            Debug.Log("IsInstructor " + isInstructor + "  " + GetInstanceID());
            return isInstructor;
        }
    }

    [ContextMenu("SwitchInstructor")]
    public void SwitchIsInstructor()
    {
        Debug.Log("IsInstructor "+isInstructor + "  " + GetInstanceID()+ "  SwitchIsInstructor ");
        isInstructor = !isInstructor;
        Debug.Log("IsInstructor " + isInstructor + "  " + GetInstanceID()+ "   SwitchIsInstructor");
    }
}

95112-unitydebuglog.png

I tried to set it with the property and direct. Both methods dosnt work. It doesn’t get set at any other place in my code. No custom editor script. No other script with permission to change it. The code for the Singleton class can be found here: http://wiki.unity3d.com/index.php/Singleton

Add [SerializeField] over private bool isInstructor = false;