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

Add an ability to search for a function and a variable in Visual Script by double-clicking at their name in the members window #25

Open
archerallstars opened this issue Nov 5, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@archerallstars
Copy link

Describe the project you are working on:
I'm working on a 3D endless runner game. The project's code is quite complex than I originally thought.

Describe the problem or limitation you are having in your project:
When my coding in Visual Script is becoming more and more complex, I lost track of many functions and variables due to being unable to locate and find them, thus making my debug process a non-practical working pipeline.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
The ability to search for a function and a variable is very essential in the coding process, no matter what the programming language.

Currently, in Visual Script, the user can only search for a function by double-clicking at the function name in the members' window. However, it's being limited to the function's flow itself, not including when the function is being called elsewhere, for instance, if the function is being called in other functions, the user wouldn't know at all due to being unable to search and find them.

And the situation of the variable regarding this issue is even worse than the function because the user can't search for the variable that is being in use in the script at all. For instance, only 1 mistake connection can ruin the entire script, especially when it doesn't crash the script with an upfront error but just causing many weird/undesired behaviors that can't be detected by the engine's debugger. This could cost days to debug instead of just a few minutes if the user could search for the variable.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
image20

My attached mock-up is consisting of 3 things:

  1. Double-click at the function or the variable for searching.
  2. A popup appears with the corresponding function/variable name.
  • In this popup, the user can search for the function, starting at the function's flow (current implementation when the user double-clicked at the function name), then the nearest function that's being called in other places.
  • For the variable, the user can search for the nearest variable that's being used in every function.
  • And for the variable that the user only declared its default value but not using it anywhere, the resulting number will be shown as 0 results.
  1. Highlight/focus corresponding to the function or the variable in the searching, the same as the current implementation.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
This enhancement will be used as often as the ability to find text (ctrl+f) in GDScript. It's impossible to replicate this functionality with a few lines of script as it's at the engine core level.

Is there a reason why this should be core and not an add-on in the asset library?:
This is the core functionality.

@Calinou Calinou changed the title Add an ability to search for a function and a variable in Visual Script by double-clicking at their name in the members window. Add an ability to search for a function and a variable in Visual Script by double-clicking at their name in the members window Nov 5, 2020
@Gallilus
Copy link
Contributor

Related to godotengine/godot-proposals#3304

@fire
Copy link
Member

fire commented Jan 6, 2022

I wonder if we can reuse the dialog of godotengine/godot#56252 for this.

@fire
Copy link
Member

fire commented Jan 6, 2022

Opening a search is not so useful without documentation, so godotengine/godot-proposals#1239 is related.

@YuriSizov YuriSizov transferred this issue from godotengine/godot-proposals Aug 24, 2022
@YuriSizov YuriSizov added the enhancement New feature or request label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants