fix: Don't let exceptions in OnNetworkSpawn/OnNetworkDespawn block processing of the next callback. [MTT-1378]
MTT-1378
Changelog
com.unity.netcode.gameobjects
- Fixed: Fixed throwing an exception in OnNetworkUpdate causing other OnNetworkUpdate calls to not be executed.
Testing and Documentation
- Includes integration tests.
- No documentation changes or additions were necessary.
+1 for
Debug.LogException()instead ofNetworkLog.LogError()both in spawn and despawn flows.also
LogAssert.Expectexists, that'd potentially make tests simpler too.
Surley we want to use NetworkLog though? Perhaps adding NetworkLog.LogException
Otherwise NetworkLog is incomplete if only half the logs are networked.
+1 for
Debug.LogException()instead ofNetworkLog.LogError()both in spawn and despawn flows. alsoLogAssert.Expectexists, that'd potentially make tests simpler too.Surley we want to use NetworkLog though? Perhaps adding NetworkLog.LogException
Otherwise NetworkLog is incomplete if only half the logs are networked.
I see your point @TwoTenPvP but I think NetworkLog & NetworkLog.LogException needs a separate conversation. We might come back to this to update once we have that other discussion.
+1 for
Debug.LogException()instead ofNetworkLog.LogError()both in spawn and despawn flows.also
LogAssert.Expectexists, that'd potentially make tests simpler too.Surley we want to use NetworkLog though? Perhaps adding NetworkLog.LogException
Otherwise NetworkLog is incomplete if only half the logs are networked.
I see your point @TwoTenPvP but I think
NetworkLog&NetworkLog.LogExceptionneeds a separate conversation. We might come back to this to update once we have that other discussion.
Personally I prefer a bit worse log messages than an incomplete feature. NetworkLog.LogError / Debug.LogException.
I think using NetworkLog.LogError is the best choice if NetworkLog.LogException is out of the question
Closed and re-opened to fix the JIRA association. Please make sure to add the JIRA ticket to the title upon PR creation in the future.