"to the monsters, we're the monsters"

This commit is contained in:
vis2k 2022-04-02 02:11:27 +08:00
parent ce75d69659
commit 28d1c402bd

View File

@ -175,6 +175,7 @@ static int ProcessLoadAddressInstruction(SyncVarAccessLists syncVarAccessLists,
// property. that's allowed. everywhere else it's not. // property. that's allowed. everywhere else it's not.
// for example, Networkhealth generated property setter calls // for example, Networkhealth generated property setter calls
// NetworkBehaviour.GeneratedSyncVarSetter(ref originalField, ...) // NetworkBehaviour.GeneratedSyncVarSetter(ref originalField, ...)
// TODO also need to ignore generated Deserialize
if (md != replacement) if (md != replacement)
{ {
Log.Error($"{md.FullName} accesses [SyncVar] {opField.Name} by reference. [REPLACEMENT={replacement.Name}] This is not supported, because [SyncVar]s are internally represented as properties, and C# can not access properties by reference."); Log.Error($"{md.FullName} accesses [SyncVar] {opField.Name} by reference. [REPLACEMENT={replacement.Name}] This is not supported, because [SyncVar]s are internally represented as properties, and C# can not access properties by reference.");