kingpirux
> I found out that the plugin in Construct3 works as charm but it is incompatible with the worker. If you deactivate worker it goes fine.
What do you do exactly? What's in your logs? Can you provide a repro project, preferably modified demo from Photon plugin package.
Hello ThePhotons, Luca from Rising Pixel here, the error in the console is
Uncaught (in promise) TypeError: Cannot read property 'ConnectionProtocol' of undefined
at new PhotonInstance (1bf167ca-039d-4121-8cc2-b030b1eb8a55:176)
at Function.New (jsutil.js:9)
at Instance._CreateSdkInstance (instance.js:7)
at ObjectClass._CreateSingleGlobalInstance (objectClass.js:12)
at new ObjectClass (objectClass.js:7)
at Function.New (jsutil.js:9)
at Function.Create (objectClass.js:7)
at C3Runtime._LoadDataJson (runtime.js:28)
at C3Runtime.Init (runtime.js:21)
at async InitRuntime (2094b93e-dfc2-40ac-8f0d-d26af86f456f:4)
I've created an empty (but working) demo from Photon demo to show the issue.
github.com/tatosgames/testphoton
It can be workarounded disabling web workers in construct 3 but this will affect the performance in the whole game.
The issues are that in the instance.js you create all Photon stuff in the constructor when the base Photon couldn't be already initialized. May I suggest adding an new explicit init action in action.js where load balancer and Photon instance can be created?