示例#1
0
 public static void ConfigureSdkGameEngineVersion(string sdkGameEngineVersion)
 {
     GAThreading.PerformTaskOnGAThread("configureSdkGameEngineVersion", () =>
     {
         if (IsSdkReady(true, false))
         {
             return;
         }
         if (!GAValidator.ValidateSdkWrapperVersion(sdkGameEngineVersion))
         {
             GALogger.I("Validation fail - configure sdk version: Sdk version not supported. String: " + sdkGameEngineVersion);
             return;
         }
         GADevice.SdkGameEngineVersion = sdkGameEngineVersion;
     });
 }
示例#2
0
        public void TestValidateSdkWrapperVersion()
        {
            Assert.False(GAValidator.ValidateSdkWrapperVersion("123"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("test 1.2.x"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("unkfalsewn 1.5.6"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("unity 1.2.3.4"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("Unity 1.2"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("corona1.2.3"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("unity x.2.3"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("unity 1.x.3"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("unity 1.2.x"));

            Assert.True(GAValidator.ValidateSdkWrapperVersion("unity 1.2.3"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("marmalade 1.2.3"));
            Assert.False(GAValidator.ValidateSdkWrapperVersion("corona 1.2.3"));
            Assert.True(GAValidator.ValidateSdkWrapperVersion("unity 1233.101.0"));
        }