photonView.Owner.NickName produces NullReferenceException error

Kind of flabbergasted by this. I followed that beginner tutorial two months ago that has a section for displaying player names and it worked fine. I've been coding away on other stuff and I came back to it, commented it out, and tried to change it. I get "NullReferenceException - Object reference not set to an instance of an object" any time I try to use photonView.Owner.NickName now. I uncommented the original code and it produces the error now too.

Example of code I tried to run that gives the error:
string test = photonView.Owner.NickName;

Original code followed this tutorial:
https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/pun-basics-tutorial/player-ui-prefab
Line that produces an error now is:

playerNameText.text = this.target.photonView.Owner.NickName;
Sign In or Register to comment.