-
Notifications
You must be signed in to change notification settings - Fork 446
Can't do operations on NetworkList
with no NetworkManager
(offline)
#2539
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
Comments
Bump! Do you really prefere throwing a |
@NoelStephensUnity |
glad im not crazy. This has been super frustrating few days trying to learn on my own how to fix this. |
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: