title: Is there a replacement for OnEnable() method?
body: <p>I'm making a custom EditorWindow. And I have a bunch of classes having <code>RectOffset</code> property. These are regular classes, not inherited from <code>ScriptableObject</code> or <code>Monobehaviour</code>.</p>
  
  <p>I serialize and deserialize them. When I deserialize, I instantiate them dynamically with <code>Activator.CreateInstance(Type, Object[]);</code>, e.g.:</p>
  
  <pre><code>public void OnAfterDeserialize() {
      Vector2 dropPosition = new Vector2(10, 10);
      Control child = (Control)Activator.CreateInstance(typeof(Button), dropPosition);
      child.Name = child.InitName;
      TestRectOffset =  new RectOffset(0, 0, 0, 0); 
  }
  </code></pre>
  
  <p>But in this case <em>Unity3d</em> gives me an error that I have to use <code>OnEnable()</code> for <code>RectOffset</code>. </p>
  
  <blockquote>
    <p>set_left is not allowed to be called during serialization, call it
    from OnEnable instead.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEngine.RectOffset:.ctor(Int32, Int32, Int32, Int32)</p>
  </blockquote>
  
  <p>Of course, I don't have this method. My classes will have much more than one property which must get value in <code>OnEnable</code>, but it's not possible, because they're instantiating dynamically.</p>
  
  <p>What should I do to emulate <code>OnEnable</code> behavior? How to instantiate an object with <code>Activator.CreateInstance</code> without errors?</p>