Import script parameters

Godot Version



Hi, is there any way to add parameters to import script? I kind of expected that when import script has @export annotated properties, those would appear in the import dialog, but unfortunately they do not.

Is there any other way to modify import script’s functionality on per-imported resource basis? The only workaround I came up with is using some kind of custom metadata stored in the GLTF instead.

For context my use-case is an import script used for GLTFs with single mesh, where the script makes the mesh instance the scene’s parent and I would like to assign this mesh a material based on that input so I don’t need to create another scene which just instantiates this mesh and adds the material for every such mesh.

Thank you.

I don’t think simple import scripts can take any parameters

1 Like

I see, thank you. Guess it’s time to get into editor extensions.

You may want to look at import plugins. They are more powerful than import scripts, but also a lot more complex to write.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.