Photon JS Communication to PUN

edited February 2019 in JavaScript and TypeScript
Hello, I was wondering if there is an example on how to communicate locally between photon js SDK and PUN.
The workflow I want to use is:
Unity game starts -> sends message to javascript side
JS side sends the login token -> PUN logs in with given token


  • So currently I am cheating and using arguments to pass in the playfabid and playfab auth token, but this really needs to be changed to IPC. I see some libraries out there than manages IPC, is that the direction I need to go?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @RacerDelux,

    PUN client and Photon JS client can communicate with each other once joined to the same room via properties or events.
    Read this first and in general the "Matchmaking Checklist".
  • Thanks, I figured that one out. It looks like I need to either use named pipes (if unity mono supports it) or TCP to do the type of communication I need.
  • JohnTube
    JohnTube ✭✭✭✭✭
    It's still not clear to me what you are trying to achieve.
    You want clients to communicate outside of rooms?
    What does PlayFab auth parameters have anything to do with this?
  • The client (written on electron with node) launches the game. I need the game to reach out to the client and get the photon auth code and playfab token so it can automatically log into the photon servers without needing user input.

    At that point I need to send some information back and forth - like if the game is still running. If it is, the client will disable the play button.