BrainCloudWrapper
Overview
- C#
- C++
- Objective-C
- Java
- JavaScript
// Unity
//Note: Ensure of have selected your app using the brainCloud Unity Plugin
using UnityEngine;
public class BCConfig : MonoBehaviour {
private BrainCloudWrapper _bc;
public BrainCloudWrapper Get()
{
return _bc;
}
void Awake ()
{
DontDestroyOnLoad(gameObject);
_bc = gameObject.AddComponent<BrainCloudWrapper>();
_bc.WrapperName = gameObject.name; // Optional: Set a wrapper name
_bc.Init(); // Init data is taken from the brainCloud Unity Plugin
}
}
// C#
_bc = new BrainCloudWrapper("_mainWrapper");
_bc = new BrainCloudWrapper("_mainWrapper");
_bc = [[BrainCloudWrapper alloc] init: @"_mainWrapper"]
_bc = new BrainCloudWrapper("_mainWrapper");
_bc = new BrainCloudWrapper("_mainWrapper");
The BrainCloudWrapper class provides an easier way for developers to handle user authentication when they are getting started with the authentication system. This includes persisting authentication data between application runs.
By using the wrapper authentication methods, the anonymous and profile IDs will be automatically persisted upon successful authentication. When authenticating, any stored anonymous/profile IDs will be sent to the server. This strategy is useful when using Anonymous authentication.
Note - you should initialize the wrapper before using it. It will in turn initialize the brainCloud client for you - don't do both!
Method Parameters
| Parameter | Description |
|---|---|
| wrapperName | Distincts saved wrapper data. Use when using more than one instance of brainCloud |
📄️ AuthenticateAdvanced
Overview
📄️ AuthenticateAnonymous
Overview
📄️ AuthenticateApple
Overview
📄️ AuthenticateEmailPassword
Overview
📄️ AuthenticateExternal
Overview
📄️ AuthenticateFacebook
Overview
📄️ AuthenticateFacebookLimited
Overview
📄️ AuthenticateGameCenter
Overview
📄️ AuthenticateGoogle
Overview
📄️ AuthenticateGoogleOpenId
Overview
📄️ AuthenticateNintendo
Overview
📄️ AuthenticateOculus
Overview
📄️ AuthenticatePlaystationNetwork
Overview
📄️ AuthenticateSteam
Overview
📄️ AuthenticateTwitter
Overview
📄️ AuthenticateUltra
Overview
📄️ AuthenticateUniversal
Overview
📄️ GetAlwaysAllowProfileSwitch
Overview
📄️ GetStoredAnonymousId
Overview
📄️ GetStoredProfileId
Overview
📄️ Initialize
Overview
📄️ InitializeWithApps
Overview
📄️ Reconnect
Overview
📄️ ResetEmailPassword
Overview
📄️ ResetEmailPasswordAdvanced
Overview
📄️ ResetStoredAnonymousId
Overview
📄️ ResetStoredProfileId
Overview
📄️ RunCallbacks
Overview
📄️ SetAlwaysAllowProfileSwitch
Overview
📄️ SetStoredAnonymousId
Overview
📄️ SetStoredProfileId
Overview
📄️ SmartSwitchAuthenticateAdvanced
Overview
📄️ SmartSwitchAuthenticateApple
Overview
📄️ SmartSwitchAuthenticateEmailPassword
Overview
📄️ SmartSwitchAuthenticateExternal
Overview
📄️ SmartSwitchAuthenticateFacebook
Overview
📄️ SmartSwitchAuthenticateFacebookLimited
Overview
📄️ SmartSwitchAuthenticateGameCenter
Overview
📄️ SmartSwitchAuthenticateGoogle
Overview
📄️ SmartSwitchAuthenticateGoogleOpenId
Overview
📄️ SmartSwitchAuthenticateNintendo
Overview
📄️ SmartSwitchAuthenticateOculus
Overview
📄️ SmartSwitchAuthenticatePlaystation5
Overview
📄️ SmartSwitchAuthenticatePlaystationNetwork
Overview
📄️ SmartSwitchAuthenticateSteam
Overview
📄️ SmartSwitchAuthenticateTwitter
Overview
📄️ SmartSwitchAuthenticateUltra
Overview
📄️ SmartSwitchAuthenticateUniversal
Overview