Replies: 3 comments
-
I'm working on a code generator and would also love to be able to list InputMaps like this. I really appreciate you sharing the work around, I'll see how far I can get using that. |
Beta Was this translation helpful? Give feedback.
-
Another usecase: I am making a plugin for easy input remapping at runtime. For this I let the developer choose in the editor which input actions to expose to the end user. Currently parsing the ProjectSettings is a bit cumbersome (but possible): for setting in ProjectSettings.get_property_list():
if setting.name.begins_with('input/'):
prints(setting.name, ProjectSettings.get_setting(setting.name)) It think the project settings could benefit from a general purpose method |
Beta Was this translation helpful? Give feedback.
-
Created a formal proposal #8464 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The
InputMap
documentation says that trying to access it inside the editor returns events for the editor, and that the mapping for the project itself must be accessed using theinput/*
settings fromProjectSettings
instead.However, the following only works if the list of actions is known:
...and so there seems to be no way to emulate the functionality of
InputMap.get_actions()
within the editor.Being able to call something like
ProjectSettings.get_actions()
orProjectSettings.get_settings("input/")
would enable developers to use the contents of theInputMap
inside of anEditorPlugin
or inside of a script's_get_property_list()
function. In my case, it would enable me to configure a drop-down box in the inspector that allows the user to select an action.EDIT: I've just discovered that it's possible to work around this by iterating through
ProjectSettings.get_property_list()
, which wasn't obvious. If this is the intended solution, I'll open an issue against the documentation instead.Beta Was this translation helpful? Give feedback.
All reactions