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")); }
public static void SetBuild(string build) { #if UNITY_EDITOR if (GAValidator.ValidateBuild(build)) { configureBuild(build); } #else configureBuild(build); #endif }
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; }); }