How do I get a callback when the server starts?
Comments
-
hey, hey, @HackersOnTheFly
use your plugin factory constructor. it is called once before all plugins
best,
ilya0 -
hey, hey, @HackersOnTheFly
use your plugin factory constructor. it is called once before all plugins
best,
ilya
I thought it was called once per plugin instantiation? Doesn't one room = one plugin instance? So in this case the plugin factory constructor would be called once for each room? I need something that is called once when the server is first started.0 -
@HackersOnTheFly Plugin's constructor is called every time when room is created. PluginFactory's constructor (class that creates plugin instances) is called once
best,
ilya0 -
@HackersOnTheFly Plugin's constructor is called every time when room is created. PluginFactory's constructor (class that creates plugin instances) is called once
best,
ilya
oh gotcha! Makes sense, thanks! How can I log there? Usually I would use pluginHost.LogInfo(), but pluginHost doesn't appear to be available in the PluginFactory constructor.0 -
hi, @HackersOnTheFly
there is no good way right now provided by us. only what you will find out your self
best,
ilya0 -
Hi @HackersOnTheFly,
Thank you for choosing Photon!
If you use IFactoryPlugin2 interface from Photon Server v5 you can do more.
Read more here.0