-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
feat(NetworkIdentity): Reuse Network IDs #3734
base: master
Are you sure you want to change the base?
Conversation
MrGadget1024
commented
Jan 12, 2024
•
edited
Loading
edited
- Uses a Queue (FIFO) with delay time in seconds
- Configurable in Network Manager (Enabled & Delay)
- Queue shown in NI Info Panel
- Uses a Queue (FIFO) with delay time in seconds - Configurable in Network Manager (Enabled & Delay) - Pool shown in NI Info Panel
- Also changed header and range upper limit
I realized talking to someone on Discord this PR may have an effect on the guarantee that OnStartClient be called on the client during initial spawn in the order in which objects where spawned on the server: Mirror/Assets/Mirror/Core/NetworkClient.cs Line 1314 in 8dc4b61
|
Wouldn't make any difference than current state of affairs today...scene objects would still be the lowest ID's because they get theirs first before spawned objects and players. Obviously if a scene object got unspawned or destroyed, the ID would be recycled with this PR, and given to the next spawned thing, and if the scene object were respawned it would get a much higher ID in either case, separating it from the initial block of ID's of the remaining scene objects. Also, if player objects are carried through a scene change in DDOL, the scene objects in the new scene would all have ID's higher than that of the player object in current Mirror and would be more likely to get lower ID's if recycled. Bottom line is that while that OrderBy attempts to spawn players after scene objects so attempts to get references to them from the player object succeed, that is breakable by circumstances described above, with or without this PR. |