Hello recently I have been having this issue and sorry is i miss any information out, I would not cast myself as an expert on this stuff. So I have been using Phonton Unity Networking however my player won’t spawn. I have not recived any errors in the console but I did get a message that said "Udp PhontonNetwork.connected: False UnityEngine.Debug:Log(Object). I have placed my prefab in a resources folder and I have, of course, done all the basic steps. If i could get any help that would be much appreciated. Thanks.
My Code:
using UnityEngine;
using System.Collections;
public class NetworkManager : MonoBehaviour
{
const string VERSION = “v0.0.1”;
public string roomName = “VVR”;
public string playerPrefabName = “FPSController”;
public Transform spawnPoint;
void Start()
{
PhotonNetwork.ConnectUsingSettings(VERSION);
}
void OnjoinedLobby()
{
RoomOptions roomOptions = new RoomOptions() { isVisible = false, maxPlayers = 4 };
PhotonNetwork.JoinOrCreateRoom(roomName, roomOptions, TypedLobby.Default);
}
void OnJoinedRoom()
{
PhotonNetwork.Instantiate(playerPrefabName,
spawnPoint.position,
spawnPoint.rotation,
0);
}
}
Tutorial I am watching : 5. Unity Tutorial - Creating A Multiplayer game with Photon Unity Network (PUN) - YouTube