8 Months Ago
Object Snapshot Refresh (#1500) * Initial commit * Component id + prune those for refresh as well * Serialize id properly * OnRefresh * Fix refresh for bones * Revert comp ids on this branch * Use Id not __id as that is what was settled with for Component Ids * When a component is added to a GameObject after it has been network spawned, and it has Sync vars we should register them with the network table * Don't do on the root though save that for the multi-comp PR * Include latest table snapshot with full refresh. Update to support __guid * Undo this bit * Added Connection.CanRefreshObjects permission (def: true) * Add checks for CanRefreshObjects to Network.Refresh() and when OnObjectRefresh is called * Register properties recursively when sending network refresh or receiving one * Test to re-register Sync props after Network.Refresh * Make docs clearer * If a Component isn't valid then just set the property anyway for a Sync var * By default, clients (except host) can NOT refresh network objects. Host can change this with Connection.CanRefreshObjects * Some additional validation checks * Better logic * Fix issue with nested types not having correct identity hash for wrapped property codegen