Skip to content

Improve autoload #48

@wantg

Description

@wantg

project.godot will be rewritten every time when reopen project because duplicate registration autoload

change anima_plugin.gd

func _enter_tree():
	add_autoload_singleton("ANIMA", 'res://addons/anima/core/constants.gd')

to

func _enter_tree():
	if not ProjectSettings.has_setting("autoload/ANIMA"):
		add_autoload_singleton("ANIMA", 'res://addons/anima/core/constants.gd')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions