Open CosmicStud opened 2 years ago
To fix, I had to override the NetworkSceneManager, SceneNameFromHash return value, and hardcode a name :(
Hi @thecosmicstudios , Did you have NGO installed as a package when you built those scenes as Addressables?
@lpmaurice, Hey, yes, installed via package manager. I am using the latest develop up until the date May 9th, 1.0.0.pre.8 . As well as netcode worked before I made the upgrade from 1.0.0.pre.6. Possibly some changes were done that now causes this issue with addressable scenes
To fix, I had to override the NetworkSceneManager, SceneNameFromHash return value, and hardcode a name :(
@thecosmicstudios Did you use reflection to set your overridden NetworkSceneManager into the SceneManager property (private set) of the NetworkManager component ?
Not at all, I have a fresh copy of Netcode using github, the develop branch, edited the script to just hardcode the scene name at line 520
Loading scenes from addressables is currently not supported. This is more of a feature request. Thanks for reporting.
@thecosmicstudios As an alternative, would it even be possible to make the larger assets in your scene addressable prefabs? If so, then for non-NetworkObject prefabs it should "just work" and for the addessable network prefabs you could have a networkbehaviour that handles spawning them as needed.
Description
I do believe since my gameserver scene is downloaded from the addressables remote location. Not present in the build at all produces this issue. I am developing for Android and Quest. I cannot have a large scene included in the build due to the app stores size limitations. Currently, Netcode blocks scenes not present in the build on the Android platform. Scene Management is enabled. The error happens immediately after StartClient is called, and is present only on the client
I find that the scene path is loaded from the SceneUtility in the NetworkSceneManager script on line 529, throws exception fail otherwise. Addressables scenes are not included in this at all, I do believe, thereby making all scenes that are remotely downloaded unable to be used. How do I fix?
Actual Outcome
Error Unity Exception: Scene Hash 2244099311 does not exist in the HashToBuildIndex table! Verify that all scenes requiring server to client synchronization are in the scenes in build list.
2022/05/09 19:54:34.366 1555 1603 Error Unity Exception: Scene Hash 2244099311 does not exist in the HashToBuildIndex table! Verify that all scenes requiring server to client synchronization are in the scenes in build list. 2022/05/09 19:54:34.366 1555 1603 Error Unity at Unity.Netcode.NetworkSceneManager.ScenePathFromHash (System.UInt32 sceneHash) [0x00027] in /Volumes/SSD1/Source/.../CustomLibrary/com.unity.netcode.gameobjects/com.unity.netcode.gameobjects/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs:533 2022/05/09 19:54:34.366 1555 1603 Error Unity at Unity.Netcode.NetworkSceneManager.SceneNameFromHash (System.UInt32 sceneHash) [0x00012] in /Volumes/SSD1/Source/.../CustomLibrary/com.unity.netcode.gameobjects/com.unity.netcode.gameobjects/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs:519 2022/05/09 19:54:34.366 1555 1603 Error Unity at Unity.Netcode.NetworkSceneManager.HandleSceneEvent (System.UInt64 clientId, Unity.Netcode.FastBufferReader reader) [0x00021] in /Volumes/SSD1/Source/.../CustomLibrary/com.unity.netcode.game
Expected Outcome
Scene loads normally, player starts client sucessfully
Environment