OnPlayerEnteredRoom not working

I have a script on my GameManager, which makes boundaries larger when a new player joins, but for some reason I get a compiler error: GameManage.OnPlayerEnteredRoom(Player)': no suitable method found to override

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using Photon.Pun;

public class GameManage : MonoBehaviourPunCallbacks


void SetBoundary(int player_count)


walls[0].transform.localScale = new Vector2(player_count*boundary_size_per_player*2 + 2, 1);

walls[1].transform.localScale = new Vector2(player_count*boundary_size_per_player*2 + 2, 1);

walls[2].transform.localScale = new Vector2(1, player_count*boundary_size_per_player*2 + 2);

walls[3].transform.localScale = new Vector2(1, player_count*boundary_size_per_player*2 + 2);

walls[0].transform.position = new Vector2(0, player_count*boundary_size_per_player + 0.5f);

walls[1].transform.position = new Vector2(0, -player_count*boundary_size_per_player - 0.5f);

walls[2].transform.position = new Vector2(-player_count*boundary_size_per_player - 0.5f, 0);

walls[3].transform.position = new Vector2(player_count*boundary_size_per_player + 0.5f, 0);


void Awake()




public override void OnPlayerEnteredRoom(Player new_player)






  • This is odd. The override itself looks fine and also inheriting from MonoBehaviourPunCallbacks.

    Maybe Unity messed the import of PUN or didn't create a proper solution / project file for VS?! Some versions had those issues. You can try to recreate the project files (Unity has a button to do this in the preferences) or use a newer build in the same LTS major.minor version.