Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Photon issue

Discussion in 'Multiplayer' started by stefan_loefven, Sep 25, 2022.

  1. stefan_loefven

    stefan_loefven

    Joined:
    Nov 9, 2020
    Posts:
    1
    I have a problem with my photon. I was following this tutorial:
    and reached 4 minutes where a problem occured. It doesn't load into the lobby scene. The scene's name is correct and everything and I have tried everything I could come up with.

    Here is my script and I hoping one of you guys could help me find the issue

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Photon.Pun;
    using UnityEngine.SceneManagement;

    public class ConnectToServer : MonoBehaviourPunCallbacks
    {

    private void start()
    {
    PhotonNetwork.ConnectUsingSettings();
    }

    public override void OnConnectedToMaster()
    {
    PhotonNetwork.JoinLobby();
    }

    public override void OnJoinedLobby()
    {
    SceneManager.LoadScene("Lobby");
    }

    }
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    Maybe the Scene is not in the Level Index? Check the build settings.