When the master client walks into the level loader object. It only loads the person who isn’t the master client into the new scene. Does anyone know what could cause this?
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class LoadLevel : MonoBehaviour
{
public string levelName;
private void Start()
{
PhotonNetwork.AutomaticallySyncScene = true;
}
private void OnTriggerEnter(Collider other)
{
Debug.Log("Level loaded was triggered");
if ( other.CompareTag("Player") )
{
if ( !PhotonNetwork.IsMasterClient )
{
return;
}
Debug.Log("Loading new level");
PhotonNetwork.LoadLevel(levelName);
}
}
}