The Rownd SDK for Unity enables user authentication and profile management in Unity applications. This package provides a seamless way to integrate Rownd's authentication services into your Unity projects.
- User authentication
- User profile management
- Meta (Oculus) platform integration
- Secure data handling
- Clone this repository
- Open your Unity project
- Import the Rownd SDK package:
- In the Unity Editor, right-click on the Assets folder
- Select "Import Package" -> "Custom Package"
- Navigate to and select
rownd-unity-plugin.unitypackagefrom the cloned repository
Initialize the SDK in your main scene. Here's a basic example:
usingRownd;publicclassRowndInitializer:MonoBehaviour{asyncvoidStart(){try{awaitRowndInstance.Instance.InitializeAsync("YOUR_ROWND_APP_KEY");Debug.Log("Rownd SDK initialized successfully");}catch(System.Exceptionex){Debug.LogError($"Failed to initialize Rownd SDK: {ex.Message}");}}}If you're developing for Meta Quest, here's how to integrate both platforms:
usingRownd;usingMeta.Platform;publicclassMetaAuthSignIn:MonoBehaviour{asyncvoidStart(){awaitInitializePlatform();}privateasyncTaskInitializePlatform(){try{// Initialize Meta PlatformstringmetaHorizonAppId="YOUR_META_HORIZON_APP_ID";Core.Initialize(metaHorizonAppId);Debug.Log("Meta Platform initialized successfully");// Initialize Rownd SDKawaitRowndInstance.Instance.InitializeAsync("YOUR_ROWND_APP_KEY");Debug.Log("Rownd SDK initialized successfully");LoadStatusScene();}catch(System.Exceptionex){Debug.LogError($"Failed to initialize platforms: {ex.Message}");LoadStatusScene();}}privatevoidLoadStatusScene(){SceneManager.LoadScene("AuthStatusScene");}}usingUnityEngine;usingTMPro;usingRownd;publicclassAuthStatusDisplay:MonoBehaviour{publicTMP_TextemailText;publicTMP_TextuserIdText;voidStart(){varuser=RowndInstance.Instance.State.User;stringemail=user.Email;stringuserId=user.UserId;stringappId=RowndInstance.Instance.State.AppConfig.App.Id;if(appId!=null){emailText.text="user email: "+email;userIdText.text="user id: "+userId;}else{emailText.text="no app id";userIdText.text="no app id";}}}If you encounter any issues or need assistance:
- Open an issue in this repository
- Contact support at support@rownd.io