geekrelief / gdnim

godot-nim based bootstrapping framework supporting hot reloading
Other
55 stars 4 forks source link

gdnim/utils.nim#loadScene should execute at compileTime #24

Closed geekrelief closed 3 years ago

geekrelief commented 3 years ago

loadScene is a proc that uses findScene which calls walkDir. On Android (maybe iOS too) we can't assume access to the filesystem since the exported library is placed in a different file structure compared when we're developing in the editor.

loadScene should be a template and findScene should be a macro to execute at compile time.

geekrelief commented 3 years ago

For findScene to run at runtime we need to use the godot Directory API.

geekrelief commented 3 years ago

I might remove loadScene and findScene all together. The use for walking the app directories to find a scene has limited use.