Skip to main content
Version: 5.7.0

Initialize

Method initializes both BrainCloudWrapper and BrainCloudClient.

The parameters for this method vary by client (for example the Unity client takes none at all, as all data is pulled from the brainCloud editor menu data).

Method Parameters

ParameterDescription
serverURLThe URL to the brainCloud server
secretKeyThe secret key for your app
appIdThe app ID
versionThe app version
companyNameClient dependent - The company name used in the keychain for storing anonymous and profile IDs. You are free to pick anything you want.
appNameClient dependent - The app name used in the keychain for storing anonymous and profile IDs. You are free to pick anything you want.

Usage

http://localhost:3000
// Unity
GameObject go = new GameObject();
_bc = go.AddComponent<BrainCloudWrapper>();
_bc.WrapperName = _wrapperName; // optionally set a wrapper-name
_bc.Init(); // extra data, such as: _appId, _secret and _appVersion, is taken from the brainCloud Unity Plugin.
DontDestroyOnLoad(go); // keep the brainCloud game object through scene changes

// C#
string serverUrl = "https://api.braincloudservers.com/dispatcherv2";
string secret = "1234-1234-1234-1234";
string appId = "123456";
string version = "1.0.0";

_bc.Init(serverUrl, secret, appId, version);

JSON Response