I can't set player names using input field (following tutorials in official web site)

Hello All

I am new to Unity. Most probably I miss very basic point but for the last few days I am stuck at this point and can't see the mistake. I hope someone can show me where it is.

I use PhotonNetwork PUN for a multiplayer game and I follow the tutorials on the PUN web site.
https://doc.photonengine.com/en-us/...al/lobby-ui#creating_the_playernameinputfield

I follow the code written in the web site above, but still couldn't make it. Probably, I do something wrong with Input Field and On Value Changed().

Here is my code:

using System.Collections;


I put input field object to On Value Changed () and choose SetPlayerNickName from the dropdown menu. (as i see in the web, there should be dynamic function section, but i can't see such section in the drop down).

Also i opened the demo scene imported with PUN. It is working in the demo scene but when i check the input field function part seems missing. I am really confused.
this image below is from demo scene of the tutorial.


basically i attach my script to inputfield object-->put inputfield object into the On Value Changed() in the inputfield object. and select function from the drop down. dropdown menu seems like this.


Can somebody show me where is my mistake please?

Comments

  • I have the same problem if someone can help us please tell me becose i can't continue with the tutorial right now.
  • I already fixed it, you need to use the method SetPlayerNickName WITHOUT parenthesees, There are two methods on the NicknameInputField, and is the one without the parenthesees "(string)".
Sign In or Register to comment.