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
Autocompletion doesn't work if other scene is opened #28008
Comments
This is somewhat intended behavior. Node autocompletion works only for currently opened and only if there's a node in the scene that contains this script. Although it should be possible to check all opened scenes to find a node with this script and then fail only when the script is used multiple times. |
@KoBeWi I wonder if there could be a way to make the editor warn about this? So people aren't caught off-guard. |
To put it in perspective, it would be possible to make autocompletion for this work, but this is what it would involve...
Not only would this be ridiculously taxing to do the larger your project is (and probably resulting in some form of lag for the autocompletion list itself), it would also be far more confusing to the user who suddenly sees not just the NodePaths for the scene they are thinking of, but also the NodePaths for all scenes everywhere, for all nodes with that script or any of its derivatives, everywhere. lol It's....kinda crazy. XD |
Well, now one idea I just thought of would be this: what if we made the editor cache which scripts' last-opened scene was? So, the autocompletion for any given script would be active not on the current scene, but on whatever scene most recently opened contained that script. This would confine the list to a single scene, wouldn't be very taxing, but would also help solve OP's problem. Eh? Sound like a possibility? |
This is still valid in 3.2.3 rc3, although this sounds more like missing feature than a bug. |
Godot version:
3.1 stable
OS/device including version:
Windows 7 x64
Steps to reproduce:
Prerequisite: 2 scenes, one of them should have at least one node
Ex.:
$
/get_node("
in _readyIntermediate result: autocompletion suggest you Node. Fine.
Result: no autocompletion list
Expected: autocompletion list with Node
Minimal reproduction project:
test14042019.zip
The text was updated successfully, but these errors were encountered: