-
Notifications
You must be signed in to change notification settings - Fork 463
fix: collections not detecting deltas backport to v1.x.x #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: collections not detecting deltas backport to v1.x.x #3005
Conversation
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious how come all of these exceptions have been removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been making it a point to swap out throwing exceptions with just logging errors when I run across areas where an exception is a bit harsh for the issue (if it wouldn't normally cause some form of exception then there is no point in interrupting the call stack for some form of improper usage or the like). Also wanted the permissions error to be unified for both NetworkVariable and NetworkList. 👍
|
|
||
| - Fixed issue using collections within `NetworkVariable` where the collection would not detect changes to items or nested items. (#3005) | ||
| - Fixed issue where `List`, `Dictionary`, and `HashSet` collections would not uniquely duplicate nested collections. (#3005) | ||
| - Fixed Issue where a state with dual triggers, inbound and outbound, could cause a false layer to layer state transition message to be sent to non-authority `NetworkAnimator` instances and cause a warning message to be logged. (#2999) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were missed changelog entries: 2999 and 2992. They are not in this PR.
Backport of #3004
When using collections with NetworkVariable, it would only detect a completely new assignment of a collection but would not detect a change to an already assigned collection (add, remove, insert, clear) nor was there a convenient way to check if a collection or the values of its items/elements were dirty.
(Requires a backport to NGO v1.x.x)
MTTB-305
MTTB-308
fix: #2993
Changelog
NetworkVariable.CheckDirtyStatethat is to be used in tandem with collections in order to detect whether the collection or an item within the collection has changed.NetworkVariablewhere the collection would not detect changes to items or nested items.List,Dictionary, andHashSetcollections would not uniquely duplicate nested collections.NetworkListto exiting early with a logged error that is now a unified permissions message withinNetworkVariableBase.NetworkVariable.Valueto exiting early with a logged error that is now a unified permissions message withinNetworkVariableBase.Testing and Documentation
NetworkVariableCollectionsTests