How to fix: MainLoop type doesn't exist: MyMainLoop

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By grumblygibson

I’m trying to provide my own main loop instance, but the method to do this from code scraps I can find online is not obvious and everything I’ve tried results in the stated error.

Project Settings > General > Application > Run > Main Loop Type: I set this to, supposedly, the class name of my own MainLoop instance (inheriting from MainLoop). As far as I know, the only way to “name a class” is to make a variable and preload a gdscript file into that variable name, but this seems not to work either. Nether does the name of the gdscript with or without extension, or resource path of the file…

Any help is appreciated!

For some context, I think by passing a script that extends MainLoop I can have my own main loop, but now I’m trying to figure out how to call PhysicsServer.step() in my _iteration() function, in c++ it’s PhysicsServer::get_singleton()->step(afloat); but it doesn’t seem to be available in gdscript… maybe in the GDNative API it is available, but I haven’t found it there either.

Is supplying a script at CLI runtime effecting the same thing?

grumblygibson | 2018-09-26 14:41