diff --git a/Assets/BuildPipeline/Editor/AddressableImportSettings.cs b/Assets/BuildPipeline/Editor/AddressableImportSettings.cs deleted file mode 100644 index 7021163..0000000 --- a/Assets/BuildPipeline/Editor/AddressableImportSettings.cs +++ /dev/null @@ -1,99 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEditor.AddressableAssets; -using System.Collections.Generic; -using System.Linq; -using System.IO; - -#if ODIN_INSPECTOR -using Sirenix.OdinInspector; -#endif - -public class AddressableImportSettings : ScriptableObject -{ - [Tooltip("Toggle rules enabled state")] - [SerializeField] - public bool rulesEnabled = true; - - [Tooltip("Creates a group if the specified group doesn't exist.")] - public bool allowGroupCreation = false; - - //[Space] - //[Tooltip("Rules for managing imported assets.")] -#if ODIN_INSPECTOR - [ListDrawerSettings(HideAddButton = false,Expanded = false,DraggableItems = true,HideRemoveButton = false)] - [Searchable(FilterOptions = SearchFilterOptions.ISearchFilterableInterface)] -#endif - //public List rules = new List(); - - public static object AddressableImportSettingsList { get; private set; } - - [ButtonMethod] - public void Save() - { - AssetDatabase.SaveAssets(); - } - - [ButtonMethod] - public void Documentation() - { - Application.OpenURL("https://github.com/favoyang/unity-addressable-importer/blob/master/Documentation~/AddressableImporter.md"); - } - - [ButtonMethod] - public void CleanEmptyGroup() - { - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - { - return; - } - var dirty = false; - var emptyGroups = settings.groups.Where(x => x.entries.Count == 0 && !x.IsDefaultGroup()).ToArray(); - for (var i = 0; i < emptyGroups.Length; i++) - { - dirty = true; - settings.RemoveGroup(emptyGroups[i]); - } - if (dirty) - { - AssetDatabase.SaveAssets(); - } - } - - /// - /// Create AddressableImportSettings and add it to AddressableImportSettingsList - /// - [MenuItem("Assets/Create/Addressables/Import Settings", false, 50)] - public static void CreateAsset() - { - string directoryPath = "Assets/"; - string fileName = "AddressableImportSettings.asset"; - - foreach (var obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets)) - { - var assetPath = AssetDatabase.GetAssetPath(obj); - var assetDirectoryPath = AssetDatabase.IsValidFolder(assetPath) ? assetPath : Path.GetDirectoryName(assetPath); - if (AssetDatabase.IsValidFolder(assetDirectoryPath)) - { - directoryPath = assetDirectoryPath; - } - } - AddressableImportSettings settings = ScriptableObject.CreateInstance(); - var filePath = AssetDatabase.GenerateUniqueAssetPath(Path.Combine(directoryPath, fileName)); - AssetDatabase.CreateAsset(settings, filePath); - Debug.LogFormat("Created AddressableImportSettings at path: {0}", filePath); - - //if (!AddressableImportSettingsList.Instance.SettingList.Contains(settings)) - //{ - // AddressableImportSettingsList.Instance.SettingList.Add(settings); - //} - - AssetDatabase.SaveAssets(); - Selection.activeObject = settings; - } -} - -internal class ButtonMethodAttribute : System.Attribute -{ -} \ No newline at end of file diff --git a/Assets/BuildPipeline/Editor/AddressableImportSettings.cs.meta b/Assets/BuildPipeline/Editor/AddressableImportSettings.cs.meta deleted file mode 100644 index 660a516..0000000 --- a/Assets/BuildPipeline/Editor/AddressableImportSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eba0a9ba9ee05014887ef91eaa1bc1ee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/BuildPipeline/Editor/WolffunAzureDevops.cs b/Assets/BuildPipeline/Editor/WolffunAzureDevops.cs index 2b7239e..3696767 100644 --- a/Assets/BuildPipeline/Editor/WolffunAzureDevops.cs +++ b/Assets/BuildPipeline/Editor/WolffunAzureDevops.cs @@ -720,11 +720,11 @@ public static void SetupAddressableRule() { if (enableAddressableRule == "true") { - var result = AssetDatabase.LoadAssetAtPath(addressableRule); - if (result) - { - result.rulesEnabled = false; - } + // var result = AssetDatabase.LoadAssetAtPath(addressableRule); + //if (result) + //{ + // result.rulesEnabled = false; + //} } return; }