Almost There! One line complaining!
Options
Greetings,
I've happily added photon chat to our app, and upon configuring it, using the demo scene as a guide/template, appear to have everything working, except the "send" button for sending a line of text to the chat room.
My username is good/reported, the "session/room" is created/joined/ showchannel is run, shows the correct channel. Everything seems connected, but when I type a message and press Enter or click "Send" I get this error below:
NullReferenceException: Object reference not set to an instance of an object
related to line in chatgui.cs
: bool doingPrivateChat = this.chatClient.PrivateChannels.ContainsKey(this.selectedChannelName);
alternately as a test, I write in the chat text area: test and get this error:
NullReferenceException: Object reference not set to an instance of an object
related to line:
this.chatClient.SendPrivateMessage(this.chatClient.AuthValues.UserId, this.testBytes, true);
I've spent about 4 hours combing the code and Inspector to find out what's not been run/ what's missing, but I cannot locate it.
If the lines of code throwing the error are any indicator, it's something in ChatClient's ? AuthValues? or PrivateChannel values? that's missing/null?
Anyone know what object / variables / parameters are missing, or what I'm failing to run to get everything together and working?
Thanks in advance.
I've happily added photon chat to our app, and upon configuring it, using the demo scene as a guide/template, appear to have everything working, except the "send" button for sending a line of text to the chat room.
My username is good/reported, the "session/room" is created/joined/ showchannel is run, shows the correct channel. Everything seems connected, but when I type a message and press Enter or click "Send" I get this error below:
NullReferenceException: Object reference not set to an instance of an object
related to line in chatgui.cs
: bool doingPrivateChat = this.chatClient.PrivateChannels.ContainsKey(this.selectedChannelName);
alternately as a test, I write in the chat text area: test and get this error:
NullReferenceException: Object reference not set to an instance of an object
related to line:
this.chatClient.SendPrivateMessage(this.chatClient.AuthValues.UserId, this.testBytes, true);
I've spent about 4 hours combing the code and Inspector to find out what's not been run/ what's missing, but I cannot locate it.
If the lines of code throwing the error are any indicator, it's something in ChatClient's ? AuthValues? or PrivateChannel values? that's missing/null?
Anyone know what object / variables / parameters are missing, or what I'm failing to run to get everything together and working?
Thanks in advance.
0
Comments
-
**
Further testing shows: this.chatClient.AuthValues.UserId doesn't seem to exist, even at the time that chatgui.Connect() Is called.
0 -
Would like to figure out, where the authentication is failling to record/occur... cannot seem to locate.
0