Environment:
Unity Version: 2022.3.32f1
FishNet Version: 4.5.2
Description:
I encountered a potential issue related to how the server-side SceneManager handles _globalSceneLoadData.
From my understanding, _globalSceneLoadData is overwritten whenever a new global scene is loaded. This value is later used during client validation when new players join.
Problem Scenario:
- The server starts with a main global scene using
ReplaceOption.All.
- During gameplay, a secondary global scene (e.g., a shop scene) is loaded using
ReplaceOption.None.
- The shop scene is then unloaded.
- A new client attempts to join the server.
At this point, _globalSceneLoadData still reflects the last loaded global scene (shop scene), meaning ReplaceOption.None is used instead of the expected ReplaceOption.All.
As a result, the newly joining player does not load scenes as intended.
Question / Suggestion:
Would it be more appropriate to manage global scene load data using a structure such as a stack (or similar), rather than a single overwritten value?
For example, when a temporary global scene (like the shop) is unloaded, it seems more intuitive for the SceneManager to revert to the previous global scene's ReplaceOption, instead of retaining the last overwritten value.
Additional Thoughts:
In the current behavior, even after the shop scene is unloaded, its ReplaceOption.None still affects newly joining clients, which feels unintuitive from a scene lifecycle perspective.
Closing:
I might be misunderstanding the intended design, so I would really appreciate any clarification or guidance on this behavior.
Thank you for your time and for maintaining FishNet!
Environment:
Unity Version: 2022.3.32f1
FishNet Version: 4.5.2
Description:
I encountered a potential issue related to how the server-side SceneManager handles
_globalSceneLoadData.From my understanding,
_globalSceneLoadDatais overwritten whenever a new global scene is loaded. This value is later used during client validation when new players join.Problem Scenario:
ReplaceOption.All.ReplaceOption.None.At this point,
_globalSceneLoadDatastill reflects the last loaded global scene (shop scene), meaningReplaceOption.Noneis used instead of the expectedReplaceOption.All.As a result, the newly joining player does not load scenes as intended.
Question / Suggestion:
Would it be more appropriate to manage global scene load data using a structure such as a stack (or similar), rather than a single overwritten value?
For example, when a temporary global scene (like the shop) is unloaded, it seems more intuitive for the SceneManager to revert to the previous global scene's ReplaceOption, instead of retaining the last overwritten value.
Additional Thoughts:
In the current behavior, even after the shop scene is unloaded, its
ReplaceOption.Nonestill affects newly joining clients, which feels unintuitive from a scene lifecycle perspective.Closing:
I might be misunderstanding the intended design, so I would really appreciate any clarification or guidance on this behavior.
Thank you for your time and for maintaining FishNet!