Setup Candy Machine
Last updated
Last updated
Solana Godot SDK features implementation of Metaplex Core Candymachine, which allows minting generated Assets from a premade collection, with Candy Guard support!
This is one of the most powerful features in the SDK, allowing developers to setup a much more interactive and interesting Asset minting experience using Godot game engine.
Before implementing your NFT collection's minting inside Godot, you need to set it up first. Once you have created a new Candy Machine and the necessary candy guards, you can bring it to Godot for minting.
We have prepared a very convenient class for setting candy guards in Godot, which you can create by right-clicking in the project's FileSystem, and choosing Create New -> Resource. Then, search for CandyGuardData.
If you have set your Candy Guards when initializing the collection, this class will be very familiar: you have all the different guards on a Default guard group, and for any additional groups, you can just tick "Enable Groups" and create new CandyGuardData in the Groups section!
What you need to do is copy the guards here exactly how you did when creating the candy machine and save this file. You will need it to pass in later.
With CORE Candy Machine, you can optionally pass in Plugins file, which will add all those plugins on the newly-minted Asset. This is great for adding royalties, verified creators and other plugins that may suit your project.
The easiest way to set Plugins is to create a MintAssetArgs resource and manually setup all the desired plugins, which will be passed into minting script.
You can also create the resource in-script, which can be useful if you want the minted assets to have different attributes, which get determined in the game project
For your convenience, we have a script called CoreMintManager which makes setting up your candy machine trivial if you have all the required resources. check SolanaSDK -> Demos -> CandyMachineDemo in the imported SolanaSDK addon!