OnDirty simplified now that it's a class with a default implementation

This commit is contained in:
vis2k 2021-09-27 15:24:10 +08:00
parent 331369c52d
commit 4590a25e0e

View File

@ -20,7 +20,7 @@ public abstract class SyncObject
// => Weaver calls InitSyncObject and replaces it
// => if it was not replaced, then it was a runtime change which is not allowed.
// ===> this way we can show SyncVar<T> in the Inspector!
public virtual Action OnDirty { get; set; } = () =>
public Action OnDirty = () =>
throw new Exception("SyncObject was not initialized. Do not create 'new SyncObject's at runtime. Define them once, then Weaver will initialize them.");
/// <summary>Used internally to check if we are currently tracking changes.</summary>