Shin-NiL / Godot-Android-Share-Plugin

Android share plugin for Godot Game Engine 3.2 or higher
MIT License
52 stars 16 forks source link

What must I autoload? #13

Open MaaaxiKing opened 3 years ago

MaaaxiKing commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Shin-NiL commented 3 years ago

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