Unable to detect error while using PhotonView.isMine method

543 views Asked by At
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
using System.IO;
using UnityEngine.UI;

public class PhotonPlayerSetup : MonoBehaviourPunCallbacks, IInRoomCallbacks
{
    private PhotonView PV;

    void Awake()
    {
        PV = GetComponent<PhotonView>();
    }

    void Start()
    {
        if(PV.isMine)
        {

        }
    }
}

While using above mentioned code this error appears:

"PhotonView does not contain a definition for isMine and no accessible extension method isMine accepting a first argument of type 'PhotonView' could be found (are you missing a using directive or an assembly reference?)"

1

There are 1 answers

0
JohnTube On BEST ANSWER

Thank you for choosing Photon!

PhotonView.isMine from PUN Classic was renamed to PhotonView.IsMine in PUN 2. Make sure to check out the Migration Notes.