protected override void Apply()
        {
            base.Apply();
            foreach (var imp in importers)
            {
                if (m_CompatibleWithAnyPlatform > Compatibility.Mixed)
                {
                    imp.SetCompatibleWithAnyPlatform(m_CompatibleWithAnyPlatform == Compatibility.Compatible);
                }
                if (m_CompatibleWithEditor > Compatibility.Mixed)
                {
                    imp.SetCompatibleWithEditor(m_CompatibleWithEditor == Compatibility.Compatible);
                }

                foreach (BuildTarget platform in GetValidBuildTargets())
                {
                    if (m_CompatibleWithPlatform[(int)platform] > Compatibility.Mixed)
                    {
                        imp.SetCompatibleWithPlatform(platform, m_CompatibleWithPlatform[(int)platform] == Compatibility.Compatible);
                    }
                }

                if (m_CompatibleWithEditor > Compatibility.Mixed)
                {
                    imp.SetExcludeEditorFromAnyPlatform(m_CompatibleWithEditor == Compatibility.NotCompatible);
                }

                foreach (BuildTarget platform in GetValidBuildTargets())
                {
                    if (m_CompatibleWithPlatform[(int)platform] > Compatibility.Mixed)
                    {
                        imp.SetExcludeFromAnyPlatform(platform, m_CompatibleWithPlatform[(int)platform] == Compatibility.NotCompatible);
                    }
                }
            }

            if (!IsEditingPlatformSettingsSupported())
            {
                return;
            }

            foreach (var extension in additionalExtensions)
            {
                extension.Apply(this);
            }

            foreach (BuildTarget platform in GetValidBuildTargets())
            {
                IPluginImporterExtension extension = ModuleManager.GetPluginImporterExtension(platform);
                if (extension != null)
                {
                    extension.Apply(this);
                }
            }
        }
Example #2
0
 internal override void Apply()
 {
     base.Apply();
     PluginImporter[] importers = this.importers;
     for (int i = 0; i < importers.Length; i++)
     {
         PluginImporter pluginImporter = importers[i];
         if (this.m_CompatibleWithAnyPlatform > PluginImporterInspector.Compatibility.Mixed)
         {
             pluginImporter.SetCompatibleWithAnyPlatform(this.m_CompatibleWithAnyPlatform == PluginImporterInspector.Compatibility.Compatible);
         }
         if (this.m_CompatibleWithEditor > PluginImporterInspector.Compatibility.Mixed)
         {
             pluginImporter.SetCompatibleWithEditor(this.m_CompatibleWithEditor == PluginImporterInspector.Compatibility.Compatible);
         }
         foreach (BuildTarget current in PluginImporterInspector.GetValidBuildTargets())
         {
             if (this.m_CompatibleWithPlatform[(int)current] > PluginImporterInspector.Compatibility.Mixed)
             {
                 pluginImporter.SetCompatibleWithPlatform(current, this.m_CompatibleWithPlatform[(int)current] == PluginImporterInspector.Compatibility.Compatible);
             }
         }
         if (this.m_CompatibleWithEditor > PluginImporterInspector.Compatibility.Mixed)
         {
             pluginImporter.SetExcludeEditorFromAnyPlatform(this.m_CompatibleWithEditor == PluginImporterInspector.Compatibility.NotCompatible);
         }
         foreach (BuildTarget current2 in PluginImporterInspector.GetValidBuildTargets())
         {
             if (this.m_CompatibleWithPlatform[(int)current2] > PluginImporterInspector.Compatibility.Mixed)
             {
                 pluginImporter.SetExcludeFromAnyPlatform(current2, this.m_CompatibleWithPlatform[(int)current2] == PluginImporterInspector.Compatibility.NotCompatible);
             }
         }
     }
     if (this.IsEditingPlatformSettingsSupported())
     {
         IPluginImporterExtension[] additionalExtensions = this.additionalExtensions;
         for (int j = 0; j < additionalExtensions.Length; j++)
         {
             IPluginImporterExtension pluginImporterExtension = additionalExtensions[j];
             pluginImporterExtension.Apply(this);
         }
         foreach (BuildTarget current3 in PluginImporterInspector.GetValidBuildTargets())
         {
             IPluginImporterExtension pluginImporterExtension2 = ModuleManager.GetPluginImporterExtension(current3);
             if (pluginImporterExtension2 != null)
             {
                 pluginImporterExtension2.Apply(this);
             }
         }
     }
 }
Example #3
0
 internal override void Apply()
 {
     base.Apply();
     foreach (PluginImporter importer in this.importers)
     {
         if (this.m_CompatibleWithAnyPlatform > Compatibility.Mixed)
         {
             importer.SetCompatibleWithAnyPlatform(this.m_CompatibleWithAnyPlatform == Compatibility.Compatible);
         }
         if (this.m_CompatibleWithEditor > Compatibility.Mixed)
         {
             importer.SetCompatibleWithEditor(this.m_CompatibleWithEditor == Compatibility.Compatible);
         }
         foreach (BuildTarget target in GetValidBuildTargets())
         {
             if (this.m_CompatibleWithPlatform[(int)target] > Compatibility.Mixed)
             {
                 importer.SetCompatibleWithPlatform(target, this.m_CompatibleWithPlatform[(int)target] == Compatibility.Compatible);
             }
         }
         if (this.m_CompatibleWithEditor > Compatibility.Mixed)
         {
             importer.SetExcludeEditorFromAnyPlatform(this.m_CompatibleWithEditor == Compatibility.NotCompatible);
         }
         foreach (BuildTarget target2 in GetValidBuildTargets())
         {
             if (this.m_CompatibleWithPlatform[(int)target2] > Compatibility.Mixed)
             {
                 importer.SetExcludeFromAnyPlatform(target2, this.m_CompatibleWithPlatform[(int)target2] == Compatibility.NotCompatible);
             }
         }
     }
     if (this.IsEditingPlatformSettingsSupported())
     {
         foreach (IPluginImporterExtension extension in this.additionalExtensions)
         {
             extension.Apply(this);
         }
         foreach (BuildTarget target3 in GetValidBuildTargets())
         {
             IPluginImporterExtension pluginImporterExtension = ModuleManager.GetPluginImporterExtension(target3);
             if (pluginImporterExtension != null)
             {
                 pluginImporterExtension.Apply(this);
             }
         }
     }
 }
Example #4
0
 internal override void Apply()
 {
     base.Apply();
     foreach (PluginImporter importer in this.importers)
     {
         if (this.m_CompatibleWithAnyPlatform > -1)
         {
             importer.SetCompatibleWithAnyPlatform(this.m_CompatibleWithAnyPlatform == 1);
         }
         if (this.m_CompatibleWithEditor > -1)
         {
             importer.SetCompatibleWithEditor(this.m_CompatibleWithEditor == 1);
         }
         using (List <BuildTarget> .Enumerator enumerator = PluginImporterInspector.GetValidBuildTargets().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 BuildTarget current = enumerator.Current;
                 if (this.m_CompatibleWithPlatform[(int)current] > -1)
                 {
                     importer.SetCompatibleWithPlatform(current, this.m_CompatibleWithPlatform[(int)current] == 1);
                 }
             }
         }
     }
     if (!this.IsEditingPlatformSettingsSupported())
     {
         return;
     }
     foreach (IPluginImporterExtension additionalExtension in this.additionalExtensions)
     {
         additionalExtension.Apply(this);
     }
     using (List <BuildTarget> .Enumerator enumerator = PluginImporterInspector.GetValidBuildTargets().GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             IPluginImporterExtension importerExtension = ModuleManager.GetPluginImporterExtension(enumerator.Current);
             if (importerExtension != null)
             {
                 importerExtension.Apply(this);
             }
         }
     }
 }
Example #5
0
 internal override void Apply()
 {
     base.Apply();
     this.importer.SetCompatibleWithAnyPlatform(this.compatibleWithAnyPlatform);
     this.importer.SetCompatibleWithEditor(this.compatibleWithEditor);
     this.importer.SetIsPreloaded(this.isPreloaded);
     IPluginImporterExtension[] additionalExtensions = this.additionalExtensions;
     for (int i = 0; i < additionalExtensions.Length; i++)
     {
         IPluginImporterExtension pluginImporterExtension = additionalExtensions[i];
         pluginImporterExtension.Apply(this);
     }
     foreach (BuildTarget current in PluginImporterInspector.GetValidBuildTargets())
     {
         this.importer.SetCompatibleWithPlatform(current, this.compatibleWithPlatform[(int)current]);
         IPluginImporterExtension pluginImporterExtension2 = ModuleManager.GetPluginImporterExtension(current);
         if (pluginImporterExtension2 != null)
         {
             pluginImporterExtension2.Apply(this);
         }
     }
 }
Example #6
0
        protected override void Apply()
        {
            var constraints = m_DefineConstraintState.Where(x => x.displayValue > Compatibility.Mixed).Select(x => x.name).ToArray();

            foreach (var imp in importers)
            {
                imp.DefineConstraints = constraints;

                if (m_CompatibleWithAnyPlatform > Compatibility.Mixed)
                {
                    imp.SetCompatibleWithAnyPlatform(m_CompatibleWithAnyPlatform == Compatibility.Compatible);
                }
                if (m_CompatibleWithEditor > Compatibility.Mixed)
                {
                    imp.SetCompatibleWithEditor(m_CompatibleWithEditor == Compatibility.Compatible);
                }

                if (m_AutoReferenced > Compatibility.Mixed)
                {
                    imp.IsExplicitlyReferenced = m_AutoReferenced != Compatibility.Compatible;
                }

                if (m_ValidateReferences > Compatibility.Mixed)
                {
                    imp.ValidateReferences = m_ValidateReferences == Compatibility.Compatible;
                }

                foreach (BuildTarget platform in GetValidBuildTargets())
                {
                    if (m_CompatibleWithPlatform[(int)platform] > Compatibility.Mixed)
                    {
                        imp.SetCompatibleWithPlatform(platform, m_CompatibleWithPlatform[(int)platform] == Compatibility.Compatible);
                    }
                }

                if (m_CompatibleWithEditor > Compatibility.Mixed)
                {
                    imp.SetExcludeEditorFromAnyPlatform(m_CompatibleWithEditor == Compatibility.NotCompatible);
                }

                foreach (BuildTarget platform in GetValidBuildTargets())
                {
                    if (m_CompatibleWithPlatform[(int)platform] > Compatibility.Mixed)
                    {
                        imp.SetExcludeFromAnyPlatform(platform, m_CompatibleWithPlatform[(int)platform] == Compatibility.NotCompatible);
                    }
                }

                if (m_Preload > Compatibility.Mixed)
                {
                    imp.isPreloaded = (m_Preload == Compatibility.Compatible);
                }
            }

            if (IsEditingPlatformSettingsSupported())
            {
                foreach (var extension in additionalExtensions)
                {
                    extension.Apply(this);
                }

                foreach (BuildTarget platform in GetValidBuildTargets())
                {
                    IPluginImporterExtension extension = ModuleManager.GetPluginImporterExtension(platform);
                    if (extension != null)
                    {
                        extension.Apply(this);
                    }
                }
            }

            serializedObject.Update();
            base.Apply();

            m_HasModified = false;
        }