Balancy Adapter

Introduction

Balancy allows developers to:

  • Change the behaviour and appearance of the game remotely and do A/B testing.

Install LionSDK

Complete the steps in Getting Started.

Install Balancy

  • Go to Balancy Page here and follow Plugin Installation part only (skip everything else).

Setup

After installing Balancy SDK, open the LiveOps tab in LionStudios/Settings Manager. Select Balancy as LiveOpsType in LiveOps Settings tab.

To initialize balancy,

  • Check on “Auto Initialize” checkbox.
  • Enter the Game Id and Public Key of your game.

Implementation

Follow Balancy Documentation to know about Templates, user-properties and A/B testing in Balancy.

Implementation on Balancy side (Method-1) (Recommended):

Go to Balancy your project. Under Control/Data Structure, create a new template with type “Singleton” and name it “LionRemoteConfigs” . Create parameters, each column (parameter) means new remote config.

Template-Example (Method-1):

Data-Example (Method-1):

Implementation on Balancy side (Method-2)

Go to Balancy your project. Under Control/Data Structure, create a new template with type “Document” and name it “LionRemoteConfigs” . In this new template, create two parameters named “Key” and “Value”. Each row means new remote config. This template will act as key-value pair storage table (just like firebase where we put key w.r.t value)

Template-Example (Method-2):

Data-Example (Method-2):

Implementation on Unity side

Follow LiveOps “Usage” part which tells what type of functions are available.

Example:

void Awake(){    
		if (!LionCore.IsInitialized)    
		{        
				LionCore.OnInitialized += delegate        
				{            
						Debug.Log("Call LiveOps functions here"); 
				
						int health = LiveOpsController.GetValue("MaxHealth", -1);
						GunData gunData = LiveOpsController.
						GetValue("GunData", new GunData("MyGun", 5));
				};    
		}
}