-
Notifications
You must be signed in to change notification settings - Fork 464
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
Changes from all commits
2333218
c5a0412
523d8db
bf4e74b
d643a78
e1391a3
6f78339
6565a3e
eb0e0d8
c268af4
33abafe
950f5ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -369,7 +369,8 @@ public void Add(T item) | |
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); | ||
| LogWritePermissionError(); | ||
| return; | ||
| } | ||
|
|
||
| m_List.Add(item); | ||
|
|
@@ -390,7 +391,8 @@ public void Clear() | |
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); | ||
| LogWritePermissionError(); | ||
| return; | ||
| } | ||
|
|
||
| m_List.Clear(); | ||
|
|
@@ -416,7 +418,8 @@ public bool Remove(T item) | |
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); | ||
| LogWritePermissionError(); | ||
| return false; | ||
| } | ||
|
|
||
| int index = m_List.IndexOf(item); | ||
|
|
@@ -451,7 +454,8 @@ public void Insert(int index, T item) | |
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); | ||
| LogWritePermissionError(); | ||
| return; | ||
| } | ||
|
|
||
| if (index < m_List.Length) | ||
|
|
@@ -480,7 +484,8 @@ public void RemoveAt(int index) | |
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); | ||
| LogWritePermissionError(); | ||
| return; | ||
| } | ||
|
|
||
| var value = m_List[index]; | ||
|
|
@@ -505,7 +510,8 @@ public T this[int index] | |
| // check write permissions | ||
| if (!CanClientWrite(m_NetworkBehaviour.NetworkManager.LocalClientId)) | ||
| { | ||
| throw new InvalidOperationException("Client is not allowed to write to this NetworkList"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious how come all of these exceptions have been removed?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see now.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| LogWritePermissionError(); | ||
| return; | ||
| } | ||
|
|
||
| var previousValue = m_List[index]; | ||
|
|
||
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.