Other
PhotonMono spawns instead of player.
I cannot seem to get the player to spawn. It spawns something called "PhotonMono" instead. I am guessing this is spawned when it cannot find a prefab to spawn. Also when the PhotonMono, spawns it is not spawning in a spawnPoint that I have set through the PhotonGameSetup script displayed bellow. I have this gamesetup in the scene and I dragged all of the spawnpoint gameobjects into the array list. I also have the Photon Player script attached to the PhotonNetworkPlayer Prefab displayed in the picture.
YouTube tutorial that I was following: https://www.youtube.com/watch?v=JjfPaY57dDM&list=PLWeGoBm1YHVgXmitft-0jkvcTVhAtL9vG∈dex=6
using System.Collections; using System.Collections.Generic; using UnityEngine; using Photon.Pun; using System.IO;
public class PhotonGameSetup : MonoBehaviour {
public static PhotonGameSetup GS;
public Transform[] spawnPoints;
private void OnEnable()
{
if(PhotonGameSetup.GS == null)
{
PhotonGameSetup.GS = this;
}
}
}