Tags: Vetlo/Mirror
Tags
perf: NetworkIdentity DirtyComponentsMask code removed entirely. OnSe… …rialize now includes the component index as byte before serializing each component. Faster because we avoid GetDirtyComponentsMask() and GetSyncModeObserversMask() calculations. Increases allowed NetworkBehaviour components from 64 to 255. Code is significantly more simple. (MirrorNetworking#2331) * perf: NetworkIdentity DirtyComponentsMask code removed entirely. OnSerialize now includes the component index as byte before serializing each component. Faster because we avoid GetDirtyComponentsMask() and GetSyncModeObserversMask() calculations. Increases allowed NetworkBehaviour components from 64 to 255. Bandwidth is now smaller if <8 components, and larger if >8 components. Code is significantly more simple. * Update Assets/Mirror/Runtime/NetworkIdentity.cs Co-authored-by: James Frowen <[email protected]> Co-authored-by: James Frowen <[email protected]>
breaking: Users must initialize synclists (MirrorNetworking#391) (Mir… …rorNetworking#2330) * Users must initialize syncobjects (MirrorNetworking#391) Previously we initialized syncobjects, so this is valid: ```cs public class Pepe : NetworkBehavior { public SyncList<int> mylist; } ``` With this change, users must initialize their own fields: ```cs public class Pepe : NetworkBehavior { public SyncList<int> mylist = new SyncList<int>(); } ``` BREAKING CHANGE: You must initialize all your SyncLists * Add null check * This is no longer a weaver error * Update Assets/Mirror/Runtime/NetworkBehaviour.cs Co-authored-by: James Frowen <[email protected]> * Remove unnecesary using Co-authored-by: James Frowen <[email protected]>
fix: fixing Initializer for generic synclists (MirrorNetworking#2328) Weaver should initialize `public SyncList<int> myList;` in the same way it does for `SyncListInt`
feat: NetworkTranform Teleport (MirrorNetworking#2320) * Server Teleport Enchancement for NetworkTransform Related to this issue: MirrorNetworking#2200 * Improvements on NetworkTransformBase We disable clientAuthority until teleportation is finished and acknowledged. We set the goal and start data points to null before teleportation. We set the clientAuthority back to it's initial value registered on server, both on the server and client side; it seems like we don't need to change it to anything on Client side because to my understanding clientAuthortiy is not affecting anything on client side. I may be wrong but still it is a great practice to set it back to it's initial value just in case... * Added teleportation with rotation I forgot to add a rotation functionality on my previous commit. It wouldn't be a teleportation without also changing the rotation. If provided a rotation input it will teleport with a rotation, if not it will simply protect the original rotation before the teleportation. * Removed my debug statement I forgot to remove the debug log statement lol silly me * fixing up code * resetting goal and last pos on server and client * renaming variables * making sure TeleportFinished can't request authority at any time * moving teleport block * removing duplicate lines Co-authored-by: Emre Bugday <[email protected]>
breaking: no need to override Serialize/Deserialize in messages (Mirr… …orNetworking#2317) * breaking: no need to override Serialize/Deserialize in messages Messages no longer serilize themselves. This has been decoupled. Serializing a message is now done via readers and writers, which can be either generated or user provided. This lifts some restrictions, * you no longer need to have a default constructor in messages * Messages types can be recursive * struct Messages don't need to provide an empty Serialize and Deserialize method Before: ```cs public struct ReadyMessage : IMessageBase { public void Deserialize(NetworkReader reader) { } public void Serialize(NetworkWriter writer) { } } ``` After: ```cs public struct ReadyMessage : IMessageBase { } ``` BREAKING CHANGE: Messages must be public BREAKING CHANGE: Use custom reader and writer instead of Serialize/Deserialize methods * Remove unused method * remove unused methods * remove unused methods * make all messages struct * Fix test code generator * Get rid of MessageBase * Rename IMessageBase -> NetworkMessage * add MessageBase as obsolete * Use a default request * Empty file to make asset store happy * Apply suggestions from code review Co-authored-by: James Frowen <[email protected]> Co-authored-by: James Frowen <[email protected]>
feat: NetworkAnimator now syncs animator.speed (MirrorNetworking#2312) * feat: NetworkAnimator now syncs animator.speed * Update NetworkAnimator.cs - adding previous speed field - avoiding floating number equals * Update NetworkAnimator.cs - adding previousSpeed field
PreviousNext