-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Remove support for built-in scripts in the editor #54553
Conversation
Built-in scripts have many limitations that users tend to discover late in their project. This causes a lot of pain as scripts must be replaced by their non-built-in variants one by one. Note that this only unexposes the ability to create and edit built-in scripts from the editor. It's still possible to save a scene that contains executable built-in scripts using PackedScene or external tools. This is a compatibility-breaking change, as built-in scripts need to be turned into non-built-in-scripts before upgrading a project to Godot 4.0.
I don't think the feature should be removed as many users find it useful (as exemplified by @KoBeWi's extensive use case), and the issues it has are fairly benign. Several of those could likely be fixed easily, e.g. #29863 should be simple - if it's a builtin script, ignore the external editor setting. What built-in scripts need is maybe a maintainer that cares about this (wink wink KoBeWi). |
Built-in scripts do still have inherent limitations due to not being files in the file system. They do not work with external tools in any way, shape or form. They only support GDScript. They cannot be globally registered with So even though they may help with some project organization, their usability is very low. If we are to keep them, they need to be improved significantly in a way that guides inexperienced users instead of leaving them confused like it is now. |
This is fine. If you use external tools, you just can't use built-in scripts, you need to use built-in script editor for that (I mean, this even makes sense if you look at it this way xd).
We should also have an error message about that in script create dialog, if there isn't one already. btw VisualScripts also can be built-in, and it's the only way to have them saved as text.
You are given an explicit error if you try to use I'd actually like to see a list of features not supported by built-in scripts, to see what is fixable and what needs to be better documented. |
I use GDScript all the time, and I always like use built-in script, for example: I want make a ui diaplay much of info, like FPS, mem use etc. If use built-in, I only 1 file info.tscn and I write code in each Label's built-in, If no built-in, I have 2 choose:
IMO, I accept built-in miss some feature, like no class name, I use built-in in a lots of case, It is a good feature!!! |
Something that I like about Gamemaker is the "Creation Code" script that you can attach to any object without creating any additional file, sometimes it's faster/less messy to set up variables or execute a function at the start of the game by code rather than exporting variables. |
@KoBeWi I’m not arguing if the limitations are fine or not right now, so there is no reason to dispute them. They are there and they trip people. We get user support requests from people using built-in scripts without realizing it all the time. I believe that you find them useful and are satisfied with them, but we do have a lot of users who get into problems from using them, often using them accidentally. In other words, we make it too easy to use them without realizing what that implies. This is what I’d like to see addressed instead of providing a rationale why no support for external tools is actually OK. PS. Didn’t actually know it was possible to store VS in a text form. Still, we had a person ask for built-in C# the other day 👀 |
Does it still happen after we added the warning label? I'm thinking, maybe we could hide the option to create built-in scripts behind an editor setting, if it's really that advanced feature? |
Yes, there are definitely people running into that after 3.2.2 🙃 I was thinking maybe we could add an icon or a badge to the script editor that would appear for built-in scripts and when clicked open a short explanation to the nature of the beast? Tool scripts could also use such a badge. The idea is that when people work on a script, they may pay more attention than when they create it. Plus it can fit more details there about present problems. |
Closing due to lack of support. |
I would suggest making a tracker for actual issues with built-in scripts, so that we can see how to solve or document them all. To be honest usability has improved a lot already and I haven't seen many user reports that would point otherwise in the past year or two (at least on GitHub, there might be more confused users on Discord/Reddit/Q&A). |
commonly, a snippet of game logic exclusively pertains to one specific node of one specific scene. personally, if it weren't for the various bugs/limitations, then I'd likely default to built-in scripts for every script that isn't registered (contains
there may be more that doesn't come to mind right now but I think that summarizes it quite nicely. |
you can extend a built-in script if you set its |
Built-in scripts have many limitations that users tend to discover late in their project. This causes a lot of pain as scripts must be replaced by their non-built-in variants one by one.
Note that this only unexposes the ability to create and edit built-in scripts from the editor. It's still possible to save a scene that contains executable built-in scripts using PackedScene or external tools. (Removing support for built-in script resources is likely more involved, but it would be useful to make sending PackedScenes over the network more secure.)
This is a compatibility-breaking change, as built-in scripts need to be turned into non-built-in-scripts before upgrading a project to Godot 4.0.
This closes #31758, closes #5535, closes #29863, and closes #31364.