Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.15k stars 435 forks source link

Exception:Failed to find any loaded scene named "XXXX" #1417

Closed Wenzy-- closed 2 years ago

Wenzy-- commented 3 years ago

After some debugging. I find the Networkmanage 's gameObject can't be a child of another gameObject. otherwise will show this issue

"Exception:Failed to find any loaded scene named "XXXX""

and everything related to the network will not working. This issue only happen in the new version (1.00) , old version(0.1.0) is fine

NoelStephensUnity commented 2 years ago

Hi @Wenzy-- The fix for this is in review and once approved will be updated in the next patch or two (depending upon when it is reviewed and merged).

NoelStephensUnity commented 2 years ago

@Wenzy-- The fix for this issue will be applied in the next Netcode for GameObjects update (v1.0.0-pre.4). Thank you for taking time to submit this issue.

Cheers! -N

shreyyasm commented 1 year ago

@NoelStephensUnity Hello, I'm having the same problem " Exception: Failed to find any loaded scene named Game! Unity.Netcode.NetworkSceneManager.GetAndAddNewlyLoadedSceneByName (System.String scene name) " but my network manager's game object is not a child of another game object. I've tried everything but couldn't find the solution! If you can help that would be great! Thanks Relay version: 1.0.4 Netcode Version: 1.0.2

NoelStephensUnity commented 1 year ago

@shreyyasm Is the scene you are trying to load added to the Project Build Settings---> Scenes in Build list?

shreyyasm commented 1 year ago

@NoelStephensUnity yeah! it is in the build settings.

NoelStephensUnity commented 1 year ago

@shreyyasm Ok, Then if you could share your project (i.e. Github branch or the like) it would greatly help me understand where the issue might be (or possibly find a bug).
If that is not possible then could you file a bug report in the Unity Editor (this will include your project automatically as a zip) and send me the CASE number you should receive in the bug report confirmation email? (i.e. CASE IN-####)?

AllexNogue commented 1 year ago

Has anyone managed to resolve? I just got this error and my scene is already in build settings.

And besides that I'm using the SceneManager from unity not from Netcode

NoelStephensUnity commented 1 year ago

@AllexNogue What version of NGO are you using? Could you post the error message you are getting and describe when it happens? (i.e. a client connects after loading a scene using the normal SceneManager and the following error occurs) Some additional things to check to narrow down the issue: