title: In Unity, How to Trigger the Set Method When Changing Boolean Value in the Inspector?
body: <p>Let's say I have the following class attached to a game object:</p>
  <pre><code>public class SomeClass : MonoBehaviour
  {
  
      [SerializeField]
      private bool aBool;
  
      public bool ABool 
      {
          get 
          {
              return aBool;
          }
          set 
          {
              Debug.Log(&quot;we are setting the bool!&quot;);
              
              // triggered when changing from false to true
              if (aBool == false &amp;&amp; value == true) 
              {
                  // do stuff
              }
  
              // triggered when changing from true to false
              if (aBool == true &amp;&amp; value == false)
              {
                  // do stuff
              }
  
              aBool = value;
          } 
      }
  
      // Other fantastic methods and etc here.
  }
  </code></pre>
  <p>When I play my game and check the aBool checkbox on the game object in the inspector, the set method is not being triggered. My debug log statement is not triggering, so it looks like it is not entering the set method.</p>
  <p>How do I trigger the set method when I set the boolean in the inspector window, when playing the game? Have I done something wrong when creating the property?</p>