private void SetGamebaseConfiguration(GamebaseRequest.GamebaseConfiguration configuration)
 {
     GamebaseUnitySDK.AppID                      = configuration.appID;
     GamebaseUnitySDK.AppVersion                 = configuration.appVersion;
     GamebaseUnitySDK.ZoneType                   = configuration.zoneType;
     GamebaseUnitySDK.DisplayLanguageCode        = configuration.displayLanguageCode;
     GamebaseUnitySDK.EnablePopup                = configuration.enablePopup;
     GamebaseUnitySDK.EnableLaunchingStatusPopup = configuration.enableLaunchingStatusPopup;
     GamebaseUnitySDK.EnableBanPopup             = configuration.enableBanPopup;
     GamebaseUnitySDK.EnableKickoutPopup         = configuration.enableKickoutPopup;
     GamebaseUnitySDK.FcmSenderId                = configuration.fcmSenderId;
     GamebaseUnitySDK.StoreCode                  = configuration.storeCode;
 }
        private GamebaseRequest.GamebaseConfiguration GetGamebaseConfiguration()
        {
            var configuration = new GamebaseRequest.GamebaseConfiguration();

            configuration.appID                      = GamebaseUnitySDK.AppID;
            configuration.appVersion                 = GamebaseUnitySDK.AppVersion;
            configuration.zoneType                   = GamebaseUnitySDK.ZoneType;
            configuration.displayLanguageCode        = GamebaseUnitySDK.DisplayLanguageCode;
            configuration.enablePopup                = GamebaseUnitySDK.EnablePopup;
            configuration.enableLaunchingStatusPopup = GamebaseUnitySDK.EnableLaunchingStatusPopup;
            configuration.enableBanPopup             = GamebaseUnitySDK.EnableBanPopup;
            configuration.enableKickoutPopup         = GamebaseUnitySDK.EnableKickoutPopup;
            configuration.fcmSenderId                = GamebaseUnitySDK.FcmSenderId;
            configuration.storeCode                  = GamebaseUnitySDK.StoreCode;

            return(configuration);
        }
        public void Initialize(GamebaseRequest.GamebaseConfiguration configuration, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Launching.LaunchingInfo> callback)
        {
            var sb = new StringBuilder();

            sb.AppendLine(string.Format("Gamebase VERSION:{0}", GamebaseUnitySDK.SDKVersion));
            sb.AppendLine(string.Format("Gamebase Configuration:{0}", JsonMapper.ToJson(configuration)));
            GamebaseLog.Debug(string.Format("{0}", sb), this, "Initialize");

            if (true == string.IsNullOrEmpty(GamebaseUnitySDK.ObjectName))
            {
                GamebaseLog.Error(GamebaseStrings.NOT_FOUND_GAMEOBJECT, this, "Initialize");
                return;
            }

            InitializeUnitySDK();
            SetGamebaseConfiguration(configuration);

            GamebaseCallback.GamebaseDelegate <GamebaseResponse.Launching.LaunchingInfo> initializeCallback = (launchingInfo, error) =>
            {
                GamebaseWaterMark.ShowWaterMark();

                IndicatorReport.Instance.SendIndicator(
                    IndicatorReport.Level.DEBUG,
                    IndicatorReport.FieldName.UNITY_EDITOR_VERSION,
                    new Dictionary <string, string> {
                    { IndicatorReport.SEND_DATA_KEY_UNITY_EDITOR_VERSION, Application.unityVersion }
                }
                    );

                callback(launchingInfo, error);
            };

            int handle = GamebaseCallbackHandler.RegisterCallback(initializeCallback);

            sdk.Initialize(configuration, handle);
        }