How can I access each other’s objects / variables / functions?
The call of MyClass.test() leads to an error cause “MyClass” is undefined. I’ve included the external events into the main events, but this doesn’t work. The scope seems to be separated. What is the way to go?
Note that window is not a guaranteed global scope. In the future, the game might run in an environment where window is not the global scope, sou you should always attach your stuff to the gdjs global object instead, as that one is always guaranteed to be defined in a GDevelop game.