Installation
Last updated
Last updated
Step 0: Download Godot!
That's kind of obvious, but you do need Godot game engine installed in your computer! You can download the latest version here
CAUTION: Godot 4.3+ Version needed for the SDK to work
Download the latest version of Godot Solana SDK from the Godot editor:
Search for "solana" and you will find this Addon:
Importing the SDK is as simple as downloading the addon.
CAUTION: Make sure to install it in "addons" folder in root of the project. Any plugins that are not in this specific folder will not be recognized by godot! You can press "Change Install Folder" and then create "addons" if it doesn't exist in your project yet
After importing the SDK to your project, you may encounted a bunch of errors. That's just because the addon expect certain scripts to be present, which you can do by enabling the plugin!
Inside Godot, go to Project -> Project Settings -> Plugins and you should see SolanaSDK plugin there. Enable the checkmark to enable the plugin and that should make the errors go away.
To make sure the plugin worked, head over to "Autoload" section in the same Project Settings window and check if there are the following Autoload Scene added:
This is an important singleton scene which will be autoloaded every time you go into play mode. Having SolanaService always available from autoload section allows for easy calls from any part of your code for anything web3 related.
In the next section, you will see what SolanaService does and how you can configure it to your liking.