Skip to content
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

MultiplayerService.CreateOrJoinSessionAsync sometimes returns before SceneManager is ready #3146

Open
afarchy opened this issue Dec 2, 2024 · 0 comments
Labels
stat:awaiting triage Status - Awaiting triage from the Netcode team. type:bug Bug Report

Comments

@afarchy
Copy link

afarchy commented Dec 2, 2024

Description

I'm hitting an error here that I don't understand in joining a distributed authority session, where after the session joins, the SceneManager is null.

  • This doesn't always happen.
  • Never seen this in editor, only on device. We're using Meta Quest 2/3.
var options = new SessionOptions()
{
    Name = sessionName,
    MaxPlayers = 64,
}.WithDistributedAuthorityNetwork();

_currentSession = await MultiplayerService.Instance.CreateOrJoinSessionAsync(sessionName, options);

if (NetworkManager.Singleton.SceneManager == null)
{
    Debug.LogError("Why is this happening?");
}

Reproduce Steps

  1. See code above

Actual Outcome

NetworkManager.Singleton.SceneManager is null.

Expected Outcome

NetworkManager.Singleton.SceneManager is not null.

Environment

  • OS: Meta Quest 2/3 (Android)
  • Unity Version: 6000.0.23f1
  • Netcode Version: 2.1.1
  • Netcode Commit: [e.g. https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/commit/d218b2992ddb98f2eb1a06b9085724ca33352865]
@afarchy afarchy added stat:awaiting triage Status - Awaiting triage from the Netcode team. type:bug Bug Report labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting triage Status - Awaiting triage from the Netcode team. type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

1 participant