I am making a multiplayer horror game, and I have came across a problem. I am currently making a map select. This is the code I am using for when you select a map.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class Map : MonoBehaviour, IPointerDownHandler
{
public string thisMap;
public void OnPointerDown(PointerEventData eventData)
{
Launcher.Instance.selectedMap = thisMap;
Debug.Log("Selected " + thisMap);
}
}
This is the code that loads the map.
PhotonNetwork.LoadLevel(selectedMap);
Now it works fine, but the only issue is it only loads the scene if the Build Index for that certain scene is 1. If it isn’t 1, it just bugs out and doesn’t load the scene. Is there any fix for this? Or is there any way for me to set the buildIndex to 1?