how to handle Unity events from server ?

we have created a Teen Patti App which is on Unity. and we are now doing all activity using unity side we wants to do that activity using photon server. so please Guide me to do that.

Best Answers

Answers

  • Hello @JohnTube

    Thanks for replay.

    can you please send me the flow of plugin integration with unity app. coz i didn't get any sample code which is working with Unity App.
  • i have installed Server SDK and Plugin SDK also i run that given code.
    i am not sure how would i connect with my Unity app as i am new with photon. so can you please guide me to interact with unity via photon server.
  • JohnTube
    JohnTube ✭✭✭✭✭
    You need Plugins SDK only, no need for Server SDK.
    Which SDK do you use?
    You should use methods that accept server address (IP address or FQDN) instead of AppId when connecting.
    In PUN it's easier, since you choose Self Hosted from PhotonServerSettings.
  • Yes John i'm using Photon Server Plugin SDK
    and got help from readme-plugin-SDK.md

    # Quickstart of the Photon Server Plugin SDK
    and now i can successful run the code. TurnbasedConsole.exe and WebhooksPlugin.cs
    and i got result
    State: ConnectingToGameserver - 127.0.0.1:5056
    a[1]: joined

    now what should i need to do with my App and this plugin.
  • JohnTube
    JohnTube ✭✭✭✭✭
    now you need to follow the readme, the online docs and the webhooks plugin project example to make your first plugin.
  • but where i can connect with Unity App to the photon server. please help me
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2017
    do you use
    - PUN? check this doc section.
    - Photon Unity SDK? use Connect method that accept server address and use empty string for AppId or AppVersion.

    if you connect client and server in same machine then use "localhost" or "127.0.0.1" as address.
  • Ok let me try it.

    Thanks John
  • Hello @JohnTube

    i have some confusion, can you please take my system as remote so i can explain you the problem.

    Thanks
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @OmiAmarwal,

    No sorry we do not do that.
    Maybe someone else on the forum can help you or you can find some Photon expert who can work on this on the internet.