Add in json extensions a "Constructor" function

A function called once when the extension is initialised. Useful to for example set an object in gdjs to store JavaScript variables and share functions. Like onCreated for behaviors but for GDevelop Functions.

Bump. Because it still would be very usefull.

Seems that you’re confusing JS and JSON.
Can you post a screenshot or an example of what you’re mentioning? JS extensions do have constructor (these kind of extensions GDevelop/Extensions/ExampleJsExtension at master · 4ian/GDevelop · GitHub) but I’m afraid you’re confusing JS, JSON and extensions inside GDevelop and JS events?

With json extensions I mean the ones hosted on your github repo GDevelop-extensions for example. As far as I know, they don’t have “Constructors”.

Right so they are simply called “Extensions” :wink:

So yeah I see your point. Could you describe a bit more why you would need this? What is your use case?

I am using almost exclusively js events in this extensions and to have my variables, objects etc shared I create a new object gdjs. and store evrything here. But creating this and loading some libs just have to happen one time, and I have an Init function that the user must call, and It’s not good for the ease to use.