-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Autocomplete methods from custom script for override #393
Comments
I agree. I don't know why I dont get autocomplete from inherited scripts. |
Isn't this more of a bug report? |
No, this is just not implemented. Probably because there's no way to mark a method in GDScript as "virtual" (while it is possible with core methods). Either "virtual" methods should be implemented or we could just use the underscore convention. |
Now that GDScript has annotations, we could have an explicit |
Closing in favor of #5896 |
Describe the project you are working on:
A game with lots of script inheritance going.
Describe the problem or limitation you are having in your project:
When you write
func
, you get a nice autocompletion list for virtual methods ready to be overriden. However these are only built-in methods. When inheriting a custom script, there's no list at all and there's no way to make the custom methods appear in the override list.I have e.g. an Enemy class with lots of callbacks. Not only I have to remember them all, I have to write them perfectly, otherwise the override will have no effect. The meh workaround is copy-pasting them from my Enemy script.
Describe how this feature / enhancement will help you overcome this problem or limitation:
It would be immensely useful for productivity if we could have autocomplete for custom "virtual" methods, from inherited user script. It could suggest all methods or methods starting with
_
, any way would be useful.Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
Describe implementation detail for your proposal (in code), if possible:
Just fill the func name autocompletion list with methods from inherited custom classes, not only built-in ones.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
You can't write Script Editor plugins.
Is there a reason why this should be core and not an add-on in the asset library?:
You can't write Script Editor plugins. And even if you could, it's a rather obvious usability thing to have.
The text was updated successfully, but these errors were encountered: