The Catoff Unity SDK enables Unity developers to easily integrate with the Catoff Challenge Platform and perform key operations like:
- Creating & joining challenges
- Updating player scores
- Fetching challenge leaderboards
- Sending Solana transactions (e.g., SOL transfers, staking)
- Working with escrow-like flows
- Open your Unity project.
- Go to Window > Package Manager.
- Click the + button and select Add package from git URL...
- Enter the repository URL:
https://github.com/CatoffGaming/catoff-unity-sdk.git
- Click Add.
This SDK depends on the Solana.Unity-SDK.
If it's not already included automatically, add it manually:
- Open Unity → Window → Package Manager
- Click + → Add package from Git URL
- Paste: https://github.com/magicblock-labs/Solana.Unity-SDK.git
- Download the latest
.unitypackage
from the Releases. - Open your Unity project.
- Drag and drop the
.unitypackage
file into Unity. - Import all files.
using CatoffSDK;
ChallengeSDK sdk = new ChallengeSDK("https://stagingapi2.catoff.xyz/", "YOUR_API_KEY");
CreateChallengeDto challenge = new CreateChallengeDto {
ChallengeName = "Ultimate Race",
ChallengeDescription = "Complete the race in record time",
StartDate = 1695408000000,
EndDate = 1696000000000,
GameID = 10,
Wager = 0.5,
ChallengeCategory = "GAMING",
Currency = "SOL",
UserAddress = "0x1234567890abcdef"
};
string response = await sdk.CreateChallenge(challenge);
Debug.Log(response);
string response = await sdk.CreatePlayer(123, "0xPlayerWalletAddress");
Debug.Log(response);
string response = await sdk.UpdatePlayerScore(123, 500, "0xPlayerWalletAddress");
Debug.Log(response);
string leaderboardData = await sdk.GetLeaderboard(123);
Debug.Log(leaderboardData);
var solanaService = new SolanaTransactionService(mnemonic);
string txSignature = await solanaService.TransferSol(
fromIndex: 0,
toIndex: 1,
lamports: 1000000,
memo: "Challenge Wager"
);
- Unity 2021 or later
- .NET Standard 2.0+
- Newtonsoft.Json (included in Unity 2021+)
This project is licensed under the MIT License.
Feel free to submit pull requests or open issues in the GitHub repository.