how to handle Unity events from server ?
Best Answers
-
Hi @OmiAmarwal,
You are already on the right path since you are asking about plugins on the other discussion which is the recommended way.
You will be able to receive client events usingOnRaiseEvent
plugin callback.5 -
There is no special flow for Unity clients.
- Make a plugin (start with simple one: e.g. log OnRaiseEvent calls to file)
- Build it
- Configure it
- Start server
- Connect client to server (e.g. connect from Unity Editor)
- See plugin in action
5 - Make a plugin (start with simple one: e.g. log OnRaiseEvent calls to file)
Answers
-
Hi @OmiAmarwal,
You are already on the right path since you are asking about plugins on the other discussion which is the recommended way.
You will be able to receive client events usingOnRaiseEvent
plugin callback.5 -
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.0 -
There is no special flow for Unity clients.
- Make a plugin (start with simple one: e.g. log OnRaiseEvent calls to file)
- Build it
- Configure it
- Start server
- Connect client to server (e.g. connect from Unity Editor)
- See plugin in action
5 - Make a plugin (start with simple one: e.g. log OnRaiseEvent calls to file)
-
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.
0 -
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.0 -
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.0 -
now you need to follow the readme, the online docs and the webhooks plugin project example to make your first plugin.0
-
but where i can connect with Unity App to the photon server. please help me0
-
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.0 -
Ok let me try it.
Thanks John0 -
Hello @JohnTube
i have some confusion, can you please take my system as remote so i can explain you the problem.
Thanks0 -
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.0