Почему выводит ошибки Assets\scripts\PL.cs(31,26): error CS0115: 'PL.OnLeftRoom()': no suitable method found to override и (25,26) и как решить?
кодusing System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
using TMPro;
public class PL : MonoBehaviour
{
private TMP_Text playerName;
private Player _player;
private void Start()
{
playerName = GetComponent<TMP_Text>();
}
public void SetUp(Player player)
{
_player = player;
playerName.text = player.NickName;
}
public override void OnPlayerLeftRoom(Player otherPlayer)
{
if(_player == otherPlayer)
Destroy(gameObject);
}
public override void OnLeftRoom()
{
Destroy(gameObject);
}
}