You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a NetworkList with no NetworkManager in scene (in my solo mode), operations on the list (add, insert, remove, clear...) throws an NullReferenceException.
This is because of the use of m_NetworkBehaviour that hasn't been initialized.
Bump!
I don't understand why it takes so long for this simple bug I reported and provided a solution. My PR is now waiting for 4 months...
Do you really prefere throwing a NullRefException (breaking code flow, so potentially other things) instead of doing the operation and showing the warning you wrote specially for this case?
Description
When using a
NetworkList
with noNetworkManager
in scene (in my solo mode), operations on the list (add, insert, remove, clear...) throws an NullReferenceException.This is because of the use of
m_NetworkBehaviour
that hasn't been initialized.NetworkVariable<T>
doesn't suffer from this behaviour because a check on m_NetworkBehaviour is made.Actual Outcome
A null reference exception is thrown an the operation is not done.
Expected Outcome
The operation is done.
Environment
The text was updated successfully, but these errors were encountered: