public void InitializeSdks() { #if UNITY_ANDROID sdk = new AndroidSDK(); #elif UNITY_IOS sdk = new IOSSDK(); #endif sdk.Initialize(); }
void Awake() { DontDestroyOnLoad(this); // class will be available after loading a new scene. #region Select platform #if UNITY_WEBGL && !UNITY_EDITOR SDK = new WebGLSDK(); #else SDK = new HttpSDK(this.gameObject); #endif #endregion }