KoBeWi / Godot-Action-Icon

GUI node for Godot that displays the key associated with input action.
https://godotengine.org/asset-library/asset/1431
MIT License
73 stars 9 forks source link

inheriting ActionIcon breaks _base_path #12

Open Pheubel opened 3 hours ago

Pheubel commented 3 hours ago

godot version 4.3

Whenever you create a script that inherits from the ActionIcon script, it can cause _base_path to be set to the wrong value and whenever the icon get's changed, it will no longer point to the right directory.

Possible Solution

instead of making _base_path a static variable that you set inside of the _init() function, couldn't it be set as a constant instead? since the script already relies on being a in a specific path (the icon for the script has a fully defined path). Trying this locally seems to work just fine

KoBeWi commented 3 hours ago

tbh I don't remember why I made it static variable. It allows to move the addon (except the icon, but it's not important), however it's not very useful 🤔