Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why should post-import scripts be Node? #18

Open
Yagich opened this issue Jan 6, 2024 · 1 comment
Open

Why should post-import scripts be Node? #18

Yagich opened this issue Jan 6, 2024 · 1 comment

Comments

@Yagich
Copy link
Contributor

Yagich commented Jan 6, 2024

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
Copy link
Owner

jitspoe commented Jan 8, 2024

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants