web-based Javascript -> unity3D

Hello everyone,

how can I communicate between webbased javascript and unity3d via photon (i already have the javascript sdk)? It's quite easy to start communication between Unity and Unity, but the documentation and the examples did'nt really help me.

I want to control events and movement through webbased interface via tablet / smartphone as an external controller. Can you give me a small thin example how i can transport a variable or an event from javascript to unity3d via photon? This could help me as a template which I could develope further.

Thank you very much in advance!


  • You can communicate between clients via events (client.raiseEvent in js and PhotonNetwork.RaiseEvent in PUN)
    But make sure that you are connected to the room of same app id and version. While app id is obvious, matching version is little bit tricky since PUN sends version to server as {appVersion}_{punVerison}.
    So set version in js client to something like 1.0_1.56