Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What must I autoload? #13

Open
MaaaxiKing opened this issue Feb 5, 2021 · 3 comments
Open

What must I autoload? #13

MaaaxiKing opened this issue Feb 5, 2021 · 3 comments

Comments

@MaaaxiKing
Copy link

I have the files in the plugins directory but in the demo you wrote "
if Engine.has_singleton("GodotShare"):
share = Engine.get_singleton("GodotShare")
". But what can I autoload, there is no script. What am I missing or overlooking?

@Shin-NiL
Copy link
Owner

Shin-NiL commented Feb 7, 2021

To use autoload (singleton) you can create an autoload script and then use the same logic that was on the demo. This way you can access the share property in any of your script.

@MaaaxiKing
Copy link
Author

So making an empty script and autoload it? That can't be, can it?

@Shin-NiL
Copy link
Owner

Yeah, it's how the Godot autload works :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants