예제 #1
0
        /// <summary>
        /// Performs the setup.  This is called externally to facilitate
        /// build automation.
        /// </summary>
        /// <param name="clientId">Client identifier.</param>
        /// <param name="bundleId">Bundle identifier.</param>
        /// <param name="nearbySvcId">Nearby connections service Id.</param>
        public static bool PerformSetup(string clientId, string bundleId, string nearbySvcId)
        {
            if (!GPGSUtil.LooksLikeValidClientId(clientId))
            {
                GPGSUtil.Alert(GPGSStrings.Setup.ClientIdError);
                return(false);
            }
            if (!GPGSUtil.LooksLikeValidBundleId(bundleId))
            {
                GPGSUtil.Alert(GPGSStrings.IOSSetup.BundleIdError);
                return(false);
            }

            // nearby is optional - only set it up if present.
            if (nearbySvcId != null)
            {
                bool ok = NearbyConnectionUI.PerformSetup(nearbySvcId, false);
                if (!ok)
                {
                    return(false);
                }
            }

            Save(clientId, bundleId);
            GPGSUtil.UpdateGameInfo();

            FillInAppData(GameInfoPath, GameInfoPath, clientId, bundleId);

            // Finished!
            GPGSProjectSettings.Instance.Set("ios.SetupDone", true);
            GPGSProjectSettings.Instance.Save();
            AssetDatabase.Refresh();
            return(true);
        }
예제 #2
0
        /// <summary>
        /// Performs the setup.  This is called externally to facilitate
        /// build automation.
        /// </summary>
        /// <param name="clientId">Client identifier.</param>
        /// <param name="bundleId">Bundle identifier.</param>
        public static void PerformSetup(string clientId, string bundleId)
        {
            if (!GPGSUtil.LooksLikeValidClientId(clientId))
            {
                GPGSUtil.Alert(GPGSStrings.IOSSetup.ClientIdError);
                return;
            }
            if (!GPGSUtil.LooksLikeValidBundleId(bundleId))
            {
                GPGSUtil.Alert(GPGSStrings.IOSSetup.BundleIdError);
                return;
            }

            Save(clientId, bundleId);
            GPGSUtil.UpdateGameInfo();

            FillInAppData(GameInfoPath, GameInfoPath, clientId, bundleId);

            // Finished!
            GPGSProjectSettings.Instance.Set("ios.SetupDone", true);
            GPGSProjectSettings.Instance.Save();
            AssetDatabase.Refresh();
            GPGSUtil.Alert(GPGSStrings.Success, GPGSStrings.IOSSetup.SetupComplete);
        }