![]() My position on the matter is that workflow is the highest priority, until such a time as the performance and memory consumption becomes an issue. You can convert the names into constant resources in a namespace script (an otherwise empty class_name script), but then you lose out on the benefits outlined in paragraph 2 while still incurring the negatives of paragraph 1. On the downside, all of these types also pollute the global namespace of the engine, so it can be troublesome if your types start running into namespace issues. You could also write your own tools - for example, using godot-next - which can give you a dropdown of typenames that extend a particular script, but only if you've actually assigned names to those types. If you want a quick and easy workflow, then you need to be able to access them from there. Now, I would assume that, for the most part, any given script resource will be relatively inexpensive to load (just a bit of text after all), but that may not always be the case depending on how many resource constants it also loads and how much memory those take up, etc.Īnother factor is whether you want your typenames to be accessible from the CreateDialog. This is great for code clarity and quick access to typenames, but it also involves never unloading the Script resource that contains the information about the class. If you use class_name, then you are forcing the script to always be loaded as a global variable under an assumed name.
0 Comments
Leave a Reply. |