コード例 #1
0
        public void TestValidateBuild()
        {
            Assert.False(GAValidator.ValidateBuild(""));
            Assert.False(GAValidator.ValidateBuild(null));
            Assert.False(GAValidator.ValidateBuild(GATestUtilities.GetRandomString(40)));

            Assert.True(GAValidator.ValidateBuild("alpha 1.2.3"));
            Assert.True(GAValidator.ValidateBuild("ALPHA 1.2.3"));
            Assert.True(GAValidator.ValidateBuild("TES# sdf.fd3"));
        }
コード例 #2
0
ファイル: GA_Wrapper.cs プロジェクト: DevilN31/Rush-Hour
        public static void SetBuild(string build)
        {
#if UNITY_EDITOR
            if (GAValidator.ValidateBuild(build))
            {
                configureBuild(build);
            }
#else
            configureBuild(build);
#endif
        }
コード例 #3
0
 public static void ConfigureBuild(string build)
 {
     GAThreading.PerformTaskOnGAThread("configureBuild", () =>
     {
         if (IsSdkReady(true, false))
         {
             GALogger.W("Build version must be set before SDK is initialized.");
             return;
         }
         if (!GAValidator.ValidateBuild(build))
         {
             GALogger.I("Validation fail - configure build: Cannot be null, empty or above 32 length. String: " + build);
             return;
         }
         GAState.Build = build;
     });
 }