title: How to implement OnValueChange for any type class field in Unity
body: <p>I am trying to implement OnValueChanged method which will called automaticaly when target field will be changed. For example I Have a MonoBehaviour class in unity and if it's enum field value is changed then execute some code. Here is the pseudocode</p>
  
  <pre><code>public class SomeClass : MonoBehaviour {
  
     public enum SomeEnum { Value1, Value2 }
  
     public SomeEnum MyEnum;
  
     void Update() {
         if(MyEnum value isChanged){
             call OnMyEnumChanged();
         }    
     }
  
     public void OnMyEnumChanged() {
  
     }
  
  }
  </code></pre>
  
  <p>Hope my question is clear, any suggestions is highly appreciated</p>