void StartSDK() { #if UNITY_IOS // You must call set environment in UnityAppController.mm SDKManager.InitStartSDK(); #endif #if UNITY_ANDROID SDKManager.SetEnvironment(SDKManager.ENVIRONMENT_SANDBOX); using (AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { using (AndroidJavaObject activity = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity")) { SDKManager.InitStartSDK(activity); } } #endif }