So I am creating a multiplayer game with photon, following this tutorial: https://www.youtube.com/watch?v=93SkbMpWCGo&ab_channel=Blackthornprod
And I've reached step 5 (6-7 min) where I started to receive errors. To be specific 4 errors:
Assets\scripts\Multiplayer\CreateAndJoinRooms.cs(7,14): error CS0101: The namespace '<global namespace>' already contains a definition for 'CreateAndJoinRooms'
Assets\scripts\Multiplayer\CreateAndJoinRooms.cs(13,17):error CS0111: Type 'CreateAndJoinRooms' already defines a member called 'CreateRoom' with the same parameter types
Assets\scripts\Multiplayer\CreateAndJoinRooms.cs(18,17):error CS0111: Type 'CreateAndJoinRooms' already defines a member called 'JoinRoom' with the same parameter types
Assets\scripts\Multiplayer\CreateAndJoinRooms.cs(23,26):error CS0111: Type 'CreateAndJoinRooms' already defines a member called 'OnJoinedRoom' with the same parameter types
Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Photon.Pun;
public class CreateAndJoinRooms : MonoBehaviourPunCallbacks
{
public InputField createInput;
public InputField joinInput;
public void CreateRoom()
{
PhotonNetwork.CreateRoom(createInput.text);
}
public void JoinRoom()
{
PhotonNetwork.JoinRoom(joinInput.text);
}
public override void OnJoinedRoom()
{
PhotonNetwork.LoadLevel("TestGame");
}
}