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

Godot 4 Issue - Intellisense issue with variables inside Autoload Scripts #78454

Closed
SoldierCantKill opened this issue Jun 20, 2023 · 1 comment · Fixed by #87278
Closed

Godot 4 Issue - Intellisense issue with variables inside Autoload Scripts #78454

SoldierCantKill opened this issue Jun 20, 2023 · 1 comment · Fixed by #87278

Comments

@SoldierCantKill
Copy link

Godot version

4.0.3.stable.official [5222a99]

System information

Windows 10 - Godot 4.0.3.stable.official

Issue description

Godot 4's intellsense is very buggy, but I think Godot 4's issue with autoloads makes it majorly more difficult to code in lots of scenarios.

First, let's analyze the Godot 4 autoload to make sure there is nothing wrong with it:
image

As shown in the image, all (most) variables have been statically typed, so we should have no issues accessing them.

In Godot 4, variables inside of autoloads had no problem getting picked up by intellisense, as seen here:
image

As shown in the image, Godot 4 had no issues with loading the variables, it's just that trying to access the variables inside of these objects have issues.
image

Here's a temporary solution, but very hacky and kind of ruins the clear (I am an autoload) that autoload variables give:
image

Steps to reproduce

  1. Create a script that has a variable, give it a class name
  2. Create an autoload script, store a variable inside the autoload script that is statically casted to the script you created in step one
  3. Create another script, try to access the autoload's variable's variable, you will see that the variable inside the autoload is picked up by intellisense, but the variable inside of the variable is not picked up by intellisense.

Minimal reproduction project

autoload_intellisense_issue.zip

@SoldierCantKill SoldierCantKill changed the title Godot 4 Issue - Intellisense issue with variables inside uato Godot 4 Issue - Intellisense issue with variables inside Autoload Scripts Jun 20, 2023
@AThousandShips
Copy link
Member

AThousandShips commented Jun 20, 2023

Think I saw something similar somewhere, will see if I can find it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants