plugin.gd now checks Engine.get_version_info() in _enter_tree and pushes a loud error if the engine is older than 4.6. Doesn't actually disable the addon's class_names (Godot parses those independently of EditorPlugin), but gives users a clear "this is the cause" signal before any cryptic downstream errors land. Also removes four add_autoload_singleton calls for gd-options-owned scripts (GameSettings, InputSettings, GraphicsSettings, AudioSettings). They were copy-paste leftovers from when this addon was forked; gd-options/plugin.gd already registers them, so this addon was double-registering — gd-dynamic- sound has no business owning those autoloads. README documents the 4.6 requirement near the top. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
14 lines
423 B
GDScript
14 lines
423 B
GDScript
@tool
|
|
extends EditorPlugin
|
|
|
|
const MIN_MAJOR : int = 4
|
|
const MIN_MINOR : int = 6
|
|
|
|
func _enter_tree() -> void:
|
|
var v : Dictionary = Engine.get_version_info()
|
|
if v.major < MIN_MAJOR or (v.major == MIN_MAJOR and v.minor < MIN_MINOR):
|
|
push_error("gd-dynamic-sound requires Godot %d.%d+ (running %s). Some classes may fail to load or behave incorrectly." % [MIN_MAJOR, MIN_MINOR, v.string])
|
|
|
|
func _exit_tree() -> void:
|
|
pass
|