Photon Plugins FAQs
Photon Plugins are available only for Enterprise Cloud or self-hosted Photon Server v4.
Configuration
How to configure custom plugins for Photon Server?
You should add the Plugin XML node in the app.config.
Here are the minimal required elements:
XML
<PluginSettings Enabled="true">
<Plugins>
<Plugin
AssemblyName="{filename}.dll"
Version=""
Type="{namespace}.PluginFactory" />
</Plugins>
</PluginSettings>
Here is an example of configuration for WebHooks plugin:
XML
<PluginSettings Enabled="true">
<Plugins>
<Plugin
Name="WebHooks"
Version=""
AssemblyName="PhotonHive.WebhooksPlugin.dll"
Type="Photon.Hive.Plugin.WebHooks.PluginFactory"
BaseUrl="<custom webhooks base url>"
IsPersistent="true"
HasErrorInfo="true"
PathClose="GameClose"
PathCreate="GameCreate"
PathEvent="GameEvent"
PathGameProperties="GameProperties"
PathJoin="GameJoin"
PathLeave="GameLeave"
PathLoad="GameCreate" />
</Plugins>
</PluginSettings>
For more information, read the "Configuration" section in the Plugins Manual.
Does Photon support multiple plugins?
Only one plugins assembly (DLL) or plugins factory can be configured at a time per application.
In this DLL you can have as many plugins as you want.
Only one plugin will be loaded and instantiated upon room creation.
There is a 1 to 1 relationship between room and instance of a plugin - so each room has its own instance of a plugin.
The following configuration is not allowed: