public static void showPoptart() { if (_instance != null) { KiipShim.showPoptart(); } }
public static void saveMoment(string momentId, double val) { if (_instance != null) { KiipShim.saveMoment(momentId, val); } }
void OnApplicationPause(bool didPause) { if (didPause) { if (_instance != null) { KiipShim.endSession(); } } else { if (_instance != null) { KiipShim.startSession(); } } }
void Awake() { // collect our key and secret DontDestroyOnLoad(this); string appKey = string.Empty; string appSecret = string.Empty; #if UNITY_ANDROID appKey = androidAppKey; appSecret = androidAppSecret; #elif UNITY_IPHONE appKey = iOSappKey; appSecret = iOSappSecret; #endif if (appKey.Length == 0 || appSecret.Length == 0) { Debug.LogError("Enter your appKey and appSecret in the Kiip inspector for any platforms you support!"); Destroy(gameObject); return; } // enforce one Kiip object var kiipObjects = FindObjectsOfType(typeof(Kiip)); if (kiipObjects.Length > 1) { Destroy(gameObject); return; } _instance = this; DontDestroyOnLoad(gameObject); name = "Kiip"; // start up the SDK KiipShim.init(appKey, appSecret); }