Answer the question
In order to leave comments, you need to log in
Why can't 2 Photon libraries run at the same time in the same script?
Can't connect libraries using Photon.Pun; and using Photon.Realtime; at the same time. The wrong library didn't work at first, but I made one of the libraries work with File -> Move Script to -> "Library Name". But only one of the libraries works this way. How to make 2 libraries work at the same time?
Answer the question
In order to leave comments, you need to log in
Most likely, you somehow inattentively watched the lesson according to which you are doing the assignment.
I just specifically installed Unity and tried it on your own video
1. Install this: https://assetstore.unity.com/packages/tools/networ... by clicking on Add to My Assets -> Open In Unity
2. Import this , using the Import button.
3. Create a script in the Assets folder with the following content:
using Photon.Pun;
using UnityEngine.UI;
using Photon.Realtime;
public class MenuManager : MonoBehaviourPunCallbacks
{
public InputField createInput;
public InputField joinInput;
public void createRoom()
{
RoomOptions roomOptions = new RoomOptions();
roomOptions.MaxPlayers = 6;
PhotonNetwork.CreateRoom(createInput.text, roomOptions);
}
public void joinRoom()
{
PhotonNetwork.JoinRoom(joinInput.text);
}
public override void OnJoinedRoom()
{
PhotonNetwork.LoadLevel("Game");
}
}
but I got one of the libraries to work with File -> Move Script to -> "Library Name".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question