- Home /
Network Event Timing
When exactly is OnPlayerDisconnected/etc called, in relation to other operations such as Update()? Is it effectively 'multithreaded' (runs immediately regardless of the current program state), or is it called before/after Update() (but never during)?
Case: OnPlayerDisconnected removes a disconnected player from an array of players[]. If the array happened to be in-use by other code (ex: changing values) or expected to not change (ex: anything after reading players.Length), it may break (either read/write to the wrong player or error/etc).
Upvoted, I assume right away, but I am not sure either.
Your answer
Follow this Question
Related Questions
Architecture for a network game- problems with events 0 Answers
IPointerClickHandler works until I add IPointerDownHandler 0 Answers
How to create an in game search engine? And how to select the searched object? 0 Answers
Dynamic skill system with scriptable objects 2 Answers
Can Editor be network-enabled? 1 Answer