Skip to content

Repository files navigation

Rownd SDK for Unity

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.

Features

  • User authentication
  • User profile management
  • Meta (Oculus) platform integration
  • Secure data handling

Installation

  1. Clone this repository
  2. Open your Unity project
  3. 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.unitypackage from the cloned repository

Quick Start

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}");}}}

Meta (Oculus) Platform Integration

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");}}

Usage Examples

Get User Data

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";}}}

Support

If you encounter any issues or need assistance:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages