I use Photon 4 Plugins to extend the Game/Room behavior.
Here is how i use it:
1. I save the room data in Plugin, i think one plugin one room, is that right?
2. I override OnRaiseEvent() to deal all custom logic, and use data that was saved in the plugin.
Do i need to consider multi-threaded or Asynchronous task problem?
Here is how i use it:
1. I save the room data in Plugin, i think one plugin one room, is that right?
2. I override OnRaiseEvent() to deal all custom logic, and use data that was saved in the plugin.
Do i need to consider multi-threaded or Asynchronous task problem?
public override void OnRaiseEvent(Photon.Hive.Plugin.IRaiseEventCallInfo info)
{
if (info.Request.EvCode == ClientReuestTask)
{
//Do many task.
//What will happen if i sleep here? Other room logic will stop?
info.Cancel();
}
else
{
base.OnRaiseEvent(info);
}
}