playMaker

Author Topic: Photon Network Get Players Properties doesn't work on Android  (Read 1695 times)

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 48
Photon Network Get Players Properties doesn't work on Android
« on: October 07, 2021, 01:45:50 PM »
The PUN2 action Photon Network Get Players Properties seems to work in Editor, but not on an android build.

gregacuna

  • Full Member
  • ***
  • Posts: 142
Re: Photon Network Get Players Properties doesn't work on Android
« Reply #1 on: November 02, 2021, 03:02:38 PM »
@mrphilipjoel Did you find out anything about this? I'm still having problems getting Player Properties from PUN in my WebGL game. Sorry to see there's been no response to your question from over three weeks ago.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Get Players Properties doesn't work on Android
« Reply #2 on: November 09, 2021, 02:33:41 AM »
Hi,

 Is it possible that it's not the plaform but when you start testing with multiple player instances?

The action itself is using the pun api directly, so it's unlikely a problem with the action itself.

which player you are trying to get properties from? the local player or another one? how do you reference the player you want to get properties from?

Bye,

 Jean

gregacuna

  • Full Member
  • ***
  • Posts: 142
Re: Photon Network Get Players Properties doesn't work on Android
« Reply #3 on: November 12, 2021, 09:33:19 PM »
DARN...I thought I posted this a few days ago and when I returned to the browser tab there was an error message saying it had timed out and the message hadn't been sent. Sure hope you see this soon. I really need help on this one.

Hey Jean,

Thanks for your reply. Here's what I'm doing...

1. The Admin/Guide of the game signs on first with their name and passcode which when they click "Play" creates a lobby, then a room named with the string from the name/passcode. That activates a "Start Game" button which they only press after all the players have joined.

2. Player loads WebGL page and after title screen they click "Sign On" button which loads a sign on screen which asks for "Guide's Name," "Passcode" and their "First Name" and "Last Name." Only after they have filled in those inputs and chosen a spaceship sprite is the "Play" button activated.

3. When each player clicks "Play" they connect to the room after which they send an RPC to the Master with their Name.

4. When the Master receives the Player's name an Int counter assigns the name to a HashTable with the counter as the key.

5. When the Admin/Guide clicks "Start Game" all players change to the next scene.

NOTE: I have all the basics working including players can see each other's player sprites, moves, dice rolls, cards drawn.

I have tried to use the Photon Network Get Players Properties both in the initial connection scene and in the next scene. I'm doing it so that each player is getting their own properties and then I have a UI Text object which is updating every frame with the variables for the Actor Number and/or User ID. When I run this in the Unity Editor those variables update properly and are visible.

When I have created my WebGL builds the player properties are not visible though strangely in the browser developer console I can see the data is being received. Here is the message for the User ID:

Received your UserID from server. Updating local value to: f026aadd-25e2-4042-8e1c-c7d1cdd36b39
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Even though I'm creating my own Player Number when each player signs on I've realized I must have the User ID in order to deal with what happens when player leaves the game, is disconnected, etc.

I sure hope you have some ideas because I've been stuck on this for almost two weeks now and it's a showstopper.

MANY THANKS!!!

IIKII

  • Full Member
  • ***
  • Posts: 137
  • Lonely developer
    • Patreon
Re: Photon Network Get Players Properties doesn't work on Android
« Reply #4 on: December 03, 2021, 07:54:15 PM »
I got a same problem with getting player properties in built game for PC.

In my case, I was testing to try to get my nickname and it gives off a blank result but it worked fine in my editor so I have no idea what's wrong.

Using PUN 2.
Support me on Patreon for free adventure games and development insights - https://www.patreon.com/koexstudio