Skip to content

"Lookup Symbol" or "Ctrl+LMB" not working for functions defined in script of another node #82258

Closed
@nagidev

Description

@nagidev

Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

v4.2.beta1.official [b137180]

System information

Windows 10 - Godot v4.1.1.stable.official

Issue description

Lookup symbol option not available

Including a reference to a child node, and accessing a function on the child node works in game.
However, trying to use the "Lookup symbol" option or CTRL+LMB on the function from the script editor does not work at all.

This works fine in Godot 3.5.

Additionally, the functions defined in the child node are not suggested in auto-complete in the parent node's script.

Steps to reproduce

  1. Create a scene with a parent node and a child node (type does not matter).
    ParentNode
    ChildNode
  2. Attach scripts to both nodes.
  3. Define a function (say, foo) in the child node's script.
  4. Reference the child node in the parent node's script (say, @onready var child = $ChildNode) Note: the issue only happens when onready is used.
  5. Call the function foo from the child anywhere in the parent node's script.
  6. Firstly, the function "foo" is not suggested in the auto-complete. Second, "lookup symbol" or "CTRL+LMB" don't open the function definition.

Minimal reproduction project

lookupBug.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions