Is possible to include other js libraries in GDevelop?

e.g. Vector2


I can edit and include the index.html to be published, but it will be overridden in the next publish…


Not easily. There is a feature request on the roadmap:

You can always copy paste the whole file in a JS event that you execute only at the beginning of the game though :slight_smile:


beginning of the game? beginning of the scene? is’t the same?
I know is “runtimeScene.getTimerManager().isFirstFrame()”.

I also do this.
In External Events…

if (runtimeScene.getTimeManager(). isFirstFrame()) {
runtimeScene.mylib = {};
var mylib = runtimeScene.mylib;
mylib.getMyVector2 = function() {…}

…then link this External Events at the beginning of each scene.