You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a bunch of scripts (all statically typed) that we want to give access to through an Autoload. So we have properties on our autoload script for each of these scripts. However, even if we statically type these properties, auto-completion will NOT suggest any members of these scripts when accessed through the autoload.
So this doesn't work:
Dialogic.Text. # gives only Node and Object suggestions
But strangely enough this does:
(DialogicasDialogicGameHandler).Text. # gives suggestions of text script members.
I've tried the following ways of defining the properties (on the Dialogic autoload script which has the DialogicGameHandler class name):
varText:=preload("res://text_script.gd").new()
constTextScript:=preload("res://text_script.gd").new()
varText:=TextScript.new()
varText : TextClass=preload("res://text_script.gd").new() # requires the class name on the script oc
Steps to reproduce
In the MRP below you can find the scripts: some_object.gd
Defines some object with a signal and method
autoload.gd
Is setup as an Autoload Singleton in the Project settings
has a class name MyAutoload
has an object property of type some_object.gd
feel free to do static typing with a class name, it doesn't help.
game_script.gd
Try to get auto-completions for the Autoload.object property here
Notice how you do NOT get suggestions for the signal and method defined in the some_object.gd script
gdscript somehow CAN get them when the class is specified (Autoload as MyAutoload).object
and also tells us that Autoload.object is a safe line
Tested versions
System information
Windows 10
Issue description
Similar to what has been described in #77643 and #74888, but more specific I think.
Project: Dialogic Plugin
We have a bunch of scripts (all statically typed) that we want to give access to through an Autoload. So we have properties on our autoload script for each of these scripts. However, even if we statically type these properties, auto-completion will NOT suggest any members of these scripts when accessed through the autoload.
So this doesn't work:
But strangely enough this does:
I've tried the following ways of defining the properties (on the Dialogic autoload script which has the DialogicGameHandler class name):
Steps to reproduce
In the MRP below you can find the scripts:
some_object.gd
autoload.gd
MyAutoload
object
property of typesome_object.gd
game_script.gd
some_object.gd
script(Autoload as MyAutoload).object
Minimal reproduction project (MRP)
AutoCompletionMRP.zip
The text was updated successfully, but these errors were encountered: