On unity 2020.3.44f1 i have installed photon pun 2 and when i went to script a script for it and finnished it i got this error.
Assets\Scripts\Lobby\LobbyManager.cs(6,36): error CS0234: The type or namespace name ‘PunBehaviour’ does not exist in the namespace ‘Photon’ (are you missing an assembly reference?)
I have used the Photon.PunBehaviour in the public class And i have re imported the entire project then the library folder then the ScriptAssemblies folder Now i lost the Assembly-C#.dll file from that. Nothing worked. I even re downloaded and imported the package from the package manager. When i import it it says all assets from this package are already in your project. Nothing to import. It only shows Pun 2 package in the my assets sction of the package manager. But not the in project. I have literly ran out of options on how to fix it. I cant find specific fix for it online. My assistant keeps telling me to download the unity package from the photon web site but it onlys redirects me to the unity asset store. Do you know how to fix it?
this is the code is it wrong?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class LobbyManager : Photon.PunBehaviour
{
string GameVersion = '1';
// Start is called before the first frame update
void Start()
{
if (!PhotonNetwork.connected)
{
PhotonNetwork.autoJoinLobby = false;
PhotonNetwork.automaticallySyncScene = true;
PhotonNetwork.ConnectUsingSettings(GameVersion);
}
}
public override void OnConnectedToMaster()
{
print("Connected to Master");
PhotonNectwork.JoinLobby();
}
public override void OnJoinedLobby()
{
print("Connected to Lobby");
}
}