branchrust_reboot/main/syncvar_entitycomponent_2cancel
8 Commits over 0 Days - ∞cph!
Persist SyncVar arguments from within components
SyncVars can now be used in EntityComponents
Weaver setup:
Takes sync attributes inside the method and wires them to the hoisted SyncVars in the BaseEntity class
Inject proxy methods (getter and setter)
Util method to try and find EntityComponentBase inheritence
Create getter and setter methods we can give to the weaver
Make a public caller method to get around partial methods with access modifiers requiring an implementation
Pivot, lets do this the most cheaty way imaginable since I cant do two passes with source generator:
CodeGen out some stub methods and emulate the SyncVar inside the EntityComponent
Setup SyncComponent attribute so we can control it
Wire up setting in a way that makes it believable to be a SyncVar