Exemplo n.º 1
0
        public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
        {
            if (buildTarget == BuildTarget.iOS)
            {
#if UNITY_IOS
                Yodo1AdSettings settings = Yodo1AdSettingsSave.Load();
                if (CheckConfiguration_iOS(settings))
                {
                    UpdateIOSPlist(pathToBuiltProject, settings);
                    UpdateIOSProject(pathToBuiltProject);
                }
#endif
            }
            if (buildTarget == BuildTarget.Android)
            {
#if UNITY_ANDROID
                Yodo1AdSettings settings = Yodo1AdSettingsSave.Load();
                if (CheckConfiguration_Android(settings))
                {
#if UNITY_2019_1_OR_NEWER
#else
                    ValidateManifest(settings);
#endif
                }
#endif
            }
        }
Exemplo n.º 2
0
        private void SaveConfig()
        {
            if (selectPlarformTab == PlatfromTab.Android)
            {
                if (Yodo1PostProcess.CheckConfiguration_Android(this.adSettings))
                {
#if UNITY_2019_1_OR_NEWER
#else
                    Yodo1PostProcess.ValidateManifest(this.adSettings);
#endif
                }
                else
                {
                    return;
                }
            }
            if (selectPlarformTab == PlatfromTab.iOS)
            {
                if (!Yodo1PostProcess.CheckConfiguration_iOS(this.adSettings))
                {
                    return;
                }
            }

            Yodo1AdSettingsSave.Save(this.adSettings);
            Yodo1AdSettingsSave.UpdateDependencies(this.adSettings);
        }
Exemplo n.º 3
0
        private void SaveConfig()
        {
            if (selectPlarformTab == PlatfromTab.Android)
            {
//#if UNITY_ANDROID
                if (Yodo1PostProcess.CheckConfiguration_Android(this.adSettings))
                {
                    Yodo1PostProcess.ValidateManifest(this.adSettings);
                }
                else
                {
                    return;
                }
//#endif
            }
            if (selectPlarformTab == PlatfromTab.iOS)
            {
//#if UNITY_IOS
                if (!Yodo1PostProcess.CheckConfiguration_iOS(this.adSettings))
                {
                    return;
                }
//#endif
            }

            Yodo1AdSettingsSave.Save(this.adSettings);
            Yodo1AdSettingsSave.UpdateDependencies(this.adSettings);
        }
 void OnPreprocessAsset()
 {
     if (assetPath.Contains("Version.md"))
     {
         //DeleteFiles_Deprecated();
         Yodo1AdSettings settings = Yodo1AdSettingsSave.Load();
         Yodo1AdSettingsSave.UpdateDependencies(settings);
     }
 }
Exemplo n.º 5
0
        static void Yodo1ValidateManifest(string path)
        {
            var mainfestPath = Path.Combine(path, "src/main/AndroidManifest.xml");

            if (mainfestPath.Contains("unityLibrary"))
            {
                mainfestPath = mainfestPath.Replace("unityLibrary", "launcher");
            }

            if (File.Exists(mainfestPath))
            {
                Yodo1AdSettings settings = Yodo1AdSettingsSave.Load();
                if (Yodo1PostProcess.CheckConfiguration_Android(settings))
                {
                    ValidateManifest(mainfestPath, settings);
                }
            }
        }
Exemplo n.º 6
0
 private void OnEnable()
 {
     this.adSettings = Yodo1AdSettingsSave.Load();
 }