public virtual IEnumerator ApplyChangesWrapper(string newJson) { #if UNITY_EDITOR Assert.IsFalse(applyChangesRunning, "ApplyChanges routine was interrupted when it shouldn't!"); applyChangesRunning = true; #endif var enumerator = owner.ApplyChanges(newJson); if (enumerator != null) { yield return(enumerator); } #if UNITY_EDITOR applyChangesRunning = false; #endif owner.RaiseOnAppliedChanges(); }
public virtual IEnumerator ApplyChangesWrapper(BaseModel model) { #if UNITY_EDITOR Assert.IsFalse(applyChangesRunning, "ApplyChanges routine was interrupted when it shouldn't!"); applyChangesRunning = true; #endif if (owner.IsValid()) { var enumerator = owner.ApplyChanges(model); if (enumerator != null) { yield return(enumerator); } } #if UNITY_EDITOR applyChangesRunning = false; #endif owner.RaiseOnAppliedChanges(); }