From be75f116abc6dc7a6395da24bae4d9263803afda Mon Sep 17 00:00:00 2001 From: Harrison Hough Date: Tue, 19 Dec 2023 15:22:31 +0200 Subject: [PATCH] chore: more reorg --- Editor/AvatarCreator/AssetTypeFilterDrawer.cs | 8 ++++---- .../ReadyPlayerMe.AvatarCreator.Editor.asmdef | 7 +++++-- Editor/Core/Scripts/ReadyPlayerMe.Core.Editor.asmdef | 2 +- ...rCreator.asmdef => ReadyPlayerMe.AvatarCreator.asmdef} | 4 ++-- ...smdef.meta => ReadyPlayerMe.AvatarCreator.asmdef.meta} | 0 .../ReadyPlayerMe.Core.LegacyAvatarCreator.Editor.asmdef | 6 +++--- .../Scripts/ReadyPlayerMe.Core.LegacyAvatarCreator.asmdef | 4 ++-- Tests/Editor/AuthTests.cs | 3 +-- Tests/Editor/ReadyPlayerMe.Core.Editor.Tests.asmdef | 4 ++-- 9 files changed, 20 insertions(+), 18 deletions(-) rename Runtime/AvatarCreator/Scripts/{ReadyPlayerMe.Core.AvatarCreator.asmdef => ReadyPlayerMe.AvatarCreator.asmdef} (87%) rename Runtime/AvatarCreator/Scripts/{ReadyPlayerMe.Core.AvatarCreator.asmdef.meta => ReadyPlayerMe.AvatarCreator.asmdef.meta} (100%) diff --git a/Editor/AvatarCreator/AssetTypeFilterDrawer.cs b/Editor/AvatarCreator/AssetTypeFilterDrawer.cs index 3c7141b4..33667484 100644 --- a/Editor/AvatarCreator/AssetTypeFilterDrawer.cs +++ b/Editor/AvatarCreator/AssetTypeFilterDrawer.cs @@ -3,7 +3,7 @@ using UnityEditor; using UnityEngine; -namespace ReadyPlayerMe.AvatarCreator +namespace ReadyPlayerMe.AvatarCreator.Editor { [CustomPropertyDrawer(typeof(AssetTypeFilterAttribute))] public class AssetTypeFilterDrawer : PropertyDrawer @@ -27,14 +27,14 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten var enumFieldInfo = typeof(AssetType).GetField(enumName); var enumAttribute = (AssetTypeFilterAttribute) Attribute.GetCustomAttribute(enumFieldInfo, typeof(AssetTypeFilterAttribute)); if (enumAttribute == null) continue; - - var filter =(AssetFilter) Enum.Parse(typeof(AssetFilter), enumAttribute.filter.ToString()); + + var filter = (AssetFilter) Enum.Parse(typeof(AssetFilter), enumAttribute.filter.ToString()); if (filter == assetTypeAttribute?.filter) { filteredEnumNames.Add(enumName); } } - + // Display the dropdown with filtered enum values var newIndex = EditorGUI.Popup(position, label.text, Array.IndexOf(filteredEnumNames.ToArray(), currentEnumValue.ToString()), filteredEnumNames.ToArray()); diff --git a/Editor/AvatarCreator/ReadyPlayerMe.AvatarCreator.Editor.asmdef b/Editor/AvatarCreator/ReadyPlayerMe.AvatarCreator.Editor.asmdef index c1bdcf0a..0e3cbfd4 100644 --- a/Editor/AvatarCreator/ReadyPlayerMe.AvatarCreator.Editor.asmdef +++ b/Editor/AvatarCreator/ReadyPlayerMe.AvatarCreator.Editor.asmdef @@ -2,9 +2,12 @@ "name": "ReadyPlayerMe.AvatarCreator.Editor", "rootNamespace": "", "references": [ - "ReadyPlayerMe.Core.AvatarCreator" + "ReadyPlayerMe.Core", + "ReadyPlayerMe.AvatarCreator" + ], + "includePlatforms": [ + "Editor" ], - "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, "overrideReferences": false, diff --git a/Editor/Core/Scripts/ReadyPlayerMe.Core.Editor.asmdef b/Editor/Core/Scripts/ReadyPlayerMe.Core.Editor.asmdef index 18a1ea32..5cc3d39a 100644 --- a/Editor/Core/Scripts/ReadyPlayerMe.Core.Editor.asmdef +++ b/Editor/Core/Scripts/ReadyPlayerMe.Core.Editor.asmdef @@ -3,7 +3,7 @@ "rootNamespace": "", "references": [ "ReadyPlayerMe.Core", - "ReadyPlayerMe.Core.AvatarCreator" + "ReadyPlayerMe.AvatarCreator" ], "includePlatforms": [ "Editor" diff --git a/Runtime/AvatarCreator/Scripts/ReadyPlayerMe.Core.AvatarCreator.asmdef b/Runtime/AvatarCreator/Scripts/ReadyPlayerMe.AvatarCreator.asmdef similarity index 87% rename from Runtime/AvatarCreator/Scripts/ReadyPlayerMe.Core.AvatarCreator.asmdef rename to Runtime/AvatarCreator/Scripts/ReadyPlayerMe.AvatarCreator.asmdef index e03178c7..27c47a0a 100644 --- a/Runtime/AvatarCreator/Scripts/ReadyPlayerMe.Core.AvatarCreator.asmdef +++ b/Runtime/AvatarCreator/Scripts/ReadyPlayerMe.AvatarCreator.asmdef @@ -1,5 +1,5 @@ { - "name": "ReadyPlayerMe.Core.AvatarCreator", + "name": "ReadyPlayerMe.AvatarCreator", "rootNamespace": "", "references": [ "ReadyPlayerMe.Core" @@ -13,4 +13,4 @@ "defineConstraints": [], "versionDefines": [], "noEngineReferences": false -} +} \ No newline at end of file diff --git a/Runtime/AvatarCreator/Scripts/ReadyPlayerMe.Core.AvatarCreator.asmdef.meta b/Runtime/AvatarCreator/Scripts/ReadyPlayerMe.AvatarCreator.asmdef.meta similarity index 100% rename from Runtime/AvatarCreator/Scripts/ReadyPlayerMe.Core.AvatarCreator.asmdef.meta rename to Runtime/AvatarCreator/Scripts/ReadyPlayerMe.AvatarCreator.asmdef.meta diff --git a/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Editor/ReadyPlayerMe.Core.LegacyAvatarCreator.Editor.asmdef b/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Editor/ReadyPlayerMe.Core.LegacyAvatarCreator.Editor.asmdef index 32804e2e..c5c6355b 100644 --- a/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Editor/ReadyPlayerMe.Core.LegacyAvatarCreator.Editor.asmdef +++ b/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Editor/ReadyPlayerMe.Core.LegacyAvatarCreator.Editor.asmdef @@ -2,9 +2,9 @@ "name": "ReadyPlayerMe.Core.LegacyAvatarCreator.Editor", "rootNamespace": "", "references": [ - "ReadyPlayerMe.Core.AvatarCreator", "ReadyPlayerMe.Core", - "ReadyPlayerMe.Core.LegacyAvatarCreator" + "ReadyPlayerMe.Core.LegacyAvatarCreator", + "ReadyPlayerMe.AvatarCreator" ], "includePlatforms": [ "Editor" @@ -17,4 +17,4 @@ "defineConstraints": [], "versionDefines": [], "noEngineReferences": false -} +} \ No newline at end of file diff --git a/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Scripts/ReadyPlayerMe.Core.LegacyAvatarCreator.asmdef b/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Scripts/ReadyPlayerMe.Core.LegacyAvatarCreator.asmdef index f4d5cd7b..cb3f0dab 100644 --- a/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Scripts/ReadyPlayerMe.Core.LegacyAvatarCreator.asmdef +++ b/Samples~/AvatarCreatorSamples/LegacyAvatarCreator/Scripts/ReadyPlayerMe.Core.LegacyAvatarCreator.asmdef @@ -2,8 +2,8 @@ "name": "ReadyPlayerMe.Core.LegacyAvatarCreator", "rootNamespace": "", "references": [ - "ReadyPlayerMe.Core.AvatarCreator", - "ReadyPlayerMe.Core" + "ReadyPlayerMe.Core", + "ReadyPlayerMe.AvatarCreator" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Tests/Editor/AuthTests.cs b/Tests/Editor/AuthTests.cs index be039c0e..71a20acc 100644 --- a/Tests/Editor/AuthTests.cs +++ b/Tests/Editor/AuthTests.cs @@ -1,8 +1,7 @@ using System.Threading.Tasks; using NUnit.Framework; -using ReadyPlayerMe.AvatarCreator; -namespace ReadyPlayerMe.Core.Tests +namespace ReadyPlayerMe.AvatarCreator.Tests { public class AuthTests { diff --git a/Tests/Editor/ReadyPlayerMe.Core.Editor.Tests.asmdef b/Tests/Editor/ReadyPlayerMe.Core.Editor.Tests.asmdef index 66c516a3..46bdc7ab 100644 --- a/Tests/Editor/ReadyPlayerMe.Core.Editor.Tests.asmdef +++ b/Tests/Editor/ReadyPlayerMe.Core.Editor.Tests.asmdef @@ -4,7 +4,7 @@ "references": [ "ReadyPlayerMe.Core", "ReadyPlayerMe.Core.Editor", - "ReadyPlayerMe.Core.AvatarCreator" + "ReadyPlayerMe.AvatarCreator" ], "includePlatforms": [ "Editor" @@ -21,4 +21,4 @@ ], "versionDefines": [], "noEngineReferences": false -} +} \ No newline at end of file