#Auto-complete hints for StringName

8 messages · Page 1 of 1 (latest)

jagged marsh
#

When I use Input.action_pressed() method, I have autocomplete that proposes all the action names I have defined in my project.

In my project, I have a set of ids, that are strings, and I have some methods that take id in parameters. I there a way to have the same kind of autocomplete for these methods so that they can propose only the ids that are defined in the project?

How does the autocomplete work for action_pressed()? Is it some kind of internal editor behaviour?

twilit comet
#

If you are defining variable data type the ide can easily do

#

The auto completr

#

Something like this

#

Var abc:float=5.0

#

Dynamic typed with no data type assigned code generally is slow and confuses the ide too

#

I will suggest to avoid as much as you can

jagged marsh
#

Thanks but I'm not sure it answers my question.

I have a method foo, that takes an id that is a StringName. Somewhere in my project, I have a list of the different ids. When I call foo, I would like autocomplete to hint these ids.

I don't know if it is possible, but it seems that the method Input.is_action_pressed() can do it since when I write it the autocomplete suggests all the actions that are defined in the project.