private void Reset() { if (GetComponent <UIMediatorLegacy>() == null) { gameObject.AddComponent(typeof(UIMediatorLegacy)); } SourceRaw = new BindingSourceData() { ReferenceType = BindingSourceType.MonoBehaviour, ObjectReference = null }; }
public virtual void OnBeforeSerialize() { SourceRaw = new BindingSourceData() { ObjectReference = Source as Object, ReferenceType = BindingSourceType.MonoBehaviour }; if (Source as BindingSourceScriptableObject != null) { SourceRaw.ReferenceType = BindingSourceType.ScriptableObject; } if (Source != null && Source.LockBindingMode) { this.BindingMode = Source.PrefferedMode; } }