Quantcast
Channel: JavaScript and TypeScript — Photon Engine
Viewing all articles
Browse latest Browse all 162

JS CreateRoom plugins

$
0
0
I'm trying to create new room by js sdk 4.0.0.5

In docuentation says I can set plugin name in room options by
roomOptions.Plugins = new string[]

But I don't see it in photon-javascript_SDK.js-file
LoadBalancingClient.prototype.createRoom = function (roomName, options)

I'm trying to put
createRoom("name", {plugins: "MyPlugin"})
or
createRoom("name", {customGameProperties: {plugins: "MyPlugin"}})
but it's not work

My factory is

public IGamePlugin Create(IPluginHost gameHost, string pluginName, Dictionary<string, string> config, out string errorMsg)
{
gameHost.LogWarning("!!!: > " + pluginName + " <<");

IGamePlugin plugin;
switch (pluginName)
{
case "MyPlugin":
plugin = new MyPlugin();
break;
default:
plugin = new PluginBase(); // default
break;
}
return plugin.SetupInstance(gameHost, config, out errorMsg) ? plugin : null;
}
always empty in pluginName. Am I doing something wrong?

Viewing all articles
Browse latest Browse all 162

Trending Articles