jitspoe / godot_bsp_importer

An importer addon to import Quake BSP files.
MIT License
105 stars 10 forks source link

Why should post-import scripts be Node? #18

Open Yagich opened 10 months ago

Yagich commented 10 months ago

In BSPReader, the post-import script is assumed to be a Node:

https://github.com/Yagich/godot_bsp_importer/blob/main/addons/bsp_importer/bsp_reader.gd#L696-L700

I'm just curious why this is desired. It can be a RefCounted, which is how it's done with post-import scripts in the advanced importer: https://docs.godotengine.org/en/stable/classes/class_editorscenepostimport.html

jitspoe commented 10 months ago

I'm not sure if it has to be. If I recall correctly, I looked up how Godot handled the post-import scripts and it just created a node, attached the script, and ran it, so that's what I did. If there's a better way, feel free to do a PR. :)