-
Notifications
You must be signed in to change notification settings - Fork 449
SceneName in SceneEvent contains inconsistent values #3418
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
The By calling Do you have further details on the issue you're encountering here? |
Wouldn't it make more sense to make sure that Alternatively I suppose to avoid breaking changes, perhaps documentation needs more clarification on this, since I was confused for a couple of hours when testing this as my loading state would hang as it was not cleaning up due to intermixed paths/names. |
That is a good point. The issue is marked for import. For your use case (and to avoid potentially breaking other projects), would a reasonable compromise be to provide an additional "ScenePath" string within the SceneEvent so you have (consistently) the SceneName and ScenePath populated? |
Having a |
<!-- Replace this block with what this PR does and why. Describe what you'd like reviewers to know, how you applied the engineering principles, and any interesting tradeoffs made. Delete bullet points below that don't apply, and update the changelog section as appropriate. --> <!-- Add short version of the JIRA ticket to the PR title (e.g. "feat: new shiny feature [MTT-123]") --> [MTTB-1278](https://jira.unity3d.com/browse/MTTB-1273) fixes: #3418 ## Changelog - Added: A `ScenePath` field on the `SceneEvent` returned by the `OnSceneEvent` callback. - Fixed: Various bugs around the `OnSceneEvent` callback. ## Testing and Documentation - Includes unit tests. <!-- Uncomment and mark items off with a * if this PR deprecates any API: ### Deprecated API - [ ] An `[Obsolete]` attribute was added along with a `(RemovedAfter yyyy-mm-dd)` entry. - [ ] An [api updater] was added. - [ ] Deprecation of the API is explained in the CHANGELOG. - [ ] The users can understand why this API was removed and what they should use instead. --> ## Backport <!-- If this is a backport: - Add the following to the PR title: "\[Backport\] ..." . - Link to the original PR. If this needs a backport - state this here If a backport is not needed please provide the reason why. If the "Backports" section is not present it will lead to a CI test failure. --> Backport not yet created. --------- Co-authored-by: Noel Stephens <[email protected]>
This issue is resolved in NGO v2.4.0 which is now public. |
Uh oh!
There was an error while loading. Please reload this page.
Description
When using automatic scene management,
SceneName
is inconsistently reported inNetworkSceneManager.OnSceneEvent
.Reproduce Steps
NetworkSceneManager.OnSceneEvent
innetworkManager.OnClientStarted
NetworkSceneManager
by passing in a full scene path (e.g.,Assets/Scenes/GameScene_02.unity
)SceneEvent.SceneName
andSceneEvent.Scene
arguments inOnSceneEvent
callbackActual Outcome
SceneEvent.SceneName
in some event types contains the full scene path, in some only the scene name.Expected Outcome
SceneEvent.SceneName
should always be consistent - contain the full scene path or the scene name all the time.Environment
6000.0.47f1
com.unity.netcode.gameobjects
version:2.3.2
com.unity.services.multiplayer
version:1.1.2
Additional Context
I'm using distributed authority:
Loading the scene as follows:
Tracking the
OnSceneEvent
the following way:Log lines that get printed:
The text was updated successfully, but these errors were encountered: