File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
com.unity.netcode.gameobjects/Runtime/SceneManagement Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -719,14 +719,17 @@ internal void GenerateScenesInBuild()
719719 /// <summary>
720720 /// Register scene from outside of build (e.g. from an Addressables group).
721721 /// </summary>
722- /// <param name="scenePaths">The paths of the external scenes to register.</param>
722+ /// <param name="addressablePath">The addressable path to the scene</param>
723+ /// <param name="editorScenePath">The asset path to the scene</param>
723724 public void RegisterAddressableScene ( string addressablePath , string editorScenePath )
724725 {
725726 Debug . Log ( $ "Registering addressable scene: { addressablePath } with editor scene path: { editorScenePath } ") ;
726727 var hash = XXHash . Hash32 ( addressablePath ) ;
727- HashToAddressableName . Add ( hash , addressablePath ) ;
728- AddressableNameOrScenePathToHash . Add ( editorScenePath , hash ) ;
729- AddressableNameOrScenePathToHash . Add ( addressablePath , hash ) ;
728+ HashToAddressableName [ hash ] = addressablePath ;
729+
730+ // We add both here because scene.path can be different in editor and in build, depending on addressable naming settings.
731+ AddressableNameOrScenePathToHash [ editorScenePath ] = hash ;
732+ AddressableNameOrScenePathToHash [ addressablePath ] = hash ;
730733 }
731734
732735 /// <summary>
You can’t perform that action at this time.
0 commit comments