public void OnAfterDeserialize()
 {
     if (!IsInstantiated)
     {
         IsInstantiated = true;
         var old = RefHandle;
         RefHandle           = ScriptableObject.CreateInstance <CapsPrefabRef>();
         RefHandle.RefHandle = old.RefHandle;
         old.RefHandle       = null;
     }
 }
 public void OnBeforeSerialize()
 {
     if (!IsInstantiated)
     {
         var handle = GetHandle();
         if (!RefHandle)
         {
             RefHandle = ScriptableObject.CreateInstance <CapsPrefabRef>();
         }
         RefHandle.RefHandle = handle;
     }
 }