From 3d148e1c7dd51739866f8e13ab869a347e897846 Mon Sep 17 00:00:00 2001 From: AnnulusGames Date: Fri, 16 Feb 2024 21:45:12 +0900 Subject: [PATCH] Remove: Alchemy.Editor.Internal namespace --- Alchemy/Assets/Alchemy/Editor/AlchemyEditor.cs | 3 +-- .../Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs | 5 ++--- Alchemy/Assets/Alchemy/Editor/BuiltinGroupDrawers.cs | 1 - .../Alchemy/Editor/Elements/AlchemyPropertyField.cs | 1 - Alchemy/Assets/Alchemy/Editor/Elements/ClassField.cs | 3 --- .../Assets/Alchemy/Editor/Elements/DictionaryField.cs | 1 - .../Assets/Alchemy/Editor/Elements/GenericField.cs | 1 - .../Assets/Alchemy/Editor/Elements/HashSetField.cs | 1 - .../Editor/Elements/InlineEditorObjectField.cs | 1 - Alchemy/Assets/Alchemy/Editor/Elements/ListField.cs | 1 - .../Assets/Alchemy/Editor/Elements/MethodButton.cs | 2 -- .../Alchemy/Editor/Elements/PropertyListView.cs | 2 -- .../Assets/Alchemy/Editor/Elements/ReflectionField.cs | 1 - .../Editor/Elements/SerializeReferenceField.cs | 1 - .../Alchemy/Editor/Hierarchy/HierarchyDrawer.cs | 1 - .../Alchemy/Editor/Hierarchy/HierarchyToggleDrawer.cs | 1 - .../Assets/Alchemy/Editor/Internal/EditorColors.cs | 2 +- Alchemy/Assets/Alchemy/Editor/Internal/EditorIcons.cs | 2 +- Alchemy/Assets/Alchemy/Editor/Internal/GUIHelper.cs | 2 +- .../Assets/Alchemy/Editor/Internal/InspectorHelper.cs | 2 +- .../Alchemy/Editor/Internal/InternalAPIHelper.cs | 4 ++-- .../Alchemy/Editor/Internal/MemberInfoExtensions.cs | 4 ++-- .../Alchemy/Editor/Internal/ReflectionHelper.cs | 5 ++--- .../Editor/Internal/SerializeReferenceDropdown.cs | 6 +++--- .../Editor/Internal/SerializedObjectExtensions.cs | 11 ----------- .../Internal/SerializedObjectExtensions.cs.meta | 11 ----------- .../Editor/Internal/SerializedPropertyExtensions.cs | 4 ++-- Alchemy/Assets/Alchemy/Editor/Internal/TypeHelper.cs | 2 +- 28 files changed, 19 insertions(+), 62 deletions(-) delete mode 100644 Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs delete mode 100644 Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs.meta diff --git a/Alchemy/Assets/Alchemy/Editor/AlchemyEditor.cs b/Alchemy/Assets/Alchemy/Editor/AlchemyEditor.cs index aa4c63c..d160d46 100644 --- a/Alchemy/Assets/Alchemy/Editor/AlchemyEditor.cs +++ b/Alchemy/Assets/Alchemy/Editor/AlchemyEditor.cs @@ -1,10 +1,9 @@ using System.Reflection; using UnityEditor; +using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; using Alchemy.Inspector; -using Alchemy.Editor.Internal; -using UnityEditor.UIElements; #if ALCHEMY_SUPPORT_SERIALIZATION using Alchemy.Serialization; #endif diff --git a/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs b/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs index e304af6..3d3ecab 100644 --- a/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs +++ b/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs @@ -1,9 +1,8 @@ using UnityEngine; using UnityEngine.UIElements; -using Alchemy.Inspector; -using Alchemy.Editor.Internal; -using Alchemy.Editor.Elements; using UnityEditor; +using Alchemy.Inspector; +using Alchemy.Editor.Elements; namespace Alchemy.Editor.Drawers { diff --git a/Alchemy/Assets/Alchemy/Editor/BuiltinGroupDrawers.cs b/Alchemy/Assets/Alchemy/Editor/BuiltinGroupDrawers.cs index 8b03da5..fc5dabe 100644 --- a/Alchemy/Assets/Alchemy/Editor/BuiltinGroupDrawers.cs +++ b/Alchemy/Assets/Alchemy/Editor/BuiltinGroupDrawers.cs @@ -6,7 +6,6 @@ using UnityEngine.UIElements; using UnityEditor; using UnityEditor.UIElements; using Alchemy.Inspector; -using Alchemy.Editor.Internal; using Alchemy.Editor.Elements; namespace Alchemy.Editor.Drawers diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs index 5513e12..41564cc 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/AlchemyPropertyField.cs @@ -2,7 +2,6 @@ using System; using UnityEditor; using UnityEditor.UIElements; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; using Alchemy.Inspector; namespace Alchemy.Editor.Elements diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/ClassField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/ClassField.cs index 21b68e2..28e7284 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/ClassField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/ClassField.cs @@ -1,9 +1,6 @@ using System; -using System.Linq; using System.Reflection; -using UnityEditor; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; using Alchemy.Inspector; namespace Alchemy.Editor.Elements diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/DictionaryField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/DictionaryField.cs index e1731b6..052cc86 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/DictionaryField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/DictionaryField.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Alchemy.Editor.Internal; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs index a44dff0..3b551d3 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs @@ -5,7 +5,6 @@ using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; namespace Alchemy.Editor.Elements { diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/HashSetField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/HashSetField.cs index de1a53d..a13b551 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/HashSetField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/HashSetField.cs @@ -1,7 +1,6 @@ using UnityEditor; using UnityEngine; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; namespace Alchemy.Editor.Elements { diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/InlineEditorObjectField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/InlineEditorObjectField.cs index 0b2909e..05943a6 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/InlineEditorObjectField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/InlineEditorObjectField.cs @@ -3,7 +3,6 @@ using UnityEngine.Assertions; using UnityEngine.UIElements; using UnityEditor; using UnityEditor.UIElements; -using Alchemy.Editor.Internal; namespace Alchemy.Editor.Elements { diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/ListField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/ListField.cs index 46c4015..81bd1cd 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/ListField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/ListField.cs @@ -3,7 +3,6 @@ using System.Collections; using UnityEngine; using UnityEngine.UIElements; using UnityEngine.Assertions; -using Alchemy.Editor.Internal; namespace Alchemy.Editor.Elements { diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/MethodButton.cs b/Alchemy/Assets/Alchemy/Editor/Elements/MethodButton.cs index 82ebb70..d2f2713 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/MethodButton.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/MethodButton.cs @@ -1,6 +1,4 @@ -using System; using System.Reflection; -using Alchemy.Editor.Internal; using UnityEditor; using UnityEngine.UIElements; diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs b/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs index d55babe..a82221a 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs @@ -1,10 +1,8 @@ -using System; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.Assertions; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; namespace Alchemy.Editor.Elements { diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/ReflectionField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/ReflectionField.cs index 631c5ec..8cfa518 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/ReflectionField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/ReflectionField.cs @@ -3,7 +3,6 @@ using System.Reflection; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; using Alchemy.Inspector; namespace Alchemy.Editor.Elements diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/SerializeReferenceField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/SerializeReferenceField.cs index 943d898..f3b68f9 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/SerializeReferenceField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/SerializeReferenceField.cs @@ -6,7 +6,6 @@ using UnityEditor.IMGUI.Controls; using UnityEngine; using UnityEngine.Assertions; using UnityEngine.UIElements; -using Alchemy.Editor.Internal; namespace Alchemy.Editor.Elements { diff --git a/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyDrawer.cs b/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyDrawer.cs index 2dde0cf..4c8ded5 100644 --- a/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyDrawer.cs +++ b/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyDrawer.cs @@ -1,6 +1,5 @@ using UnityEditor; using UnityEngine; -using Alchemy.Editor.Internal; namespace Alchemy.Editor { diff --git a/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyToggleDrawer.cs b/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyToggleDrawer.cs index f2c1ac1..59a5e2d 100644 --- a/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyToggleDrawer.cs +++ b/Alchemy/Assets/Alchemy/Editor/Hierarchy/HierarchyToggleDrawer.cs @@ -2,7 +2,6 @@ using System.Linq; using UnityEditor; using UnityEngine; using Alchemy.Hierarchy; -using Alchemy.Editor.Internal; namespace Alchemy.Editor { diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/EditorColors.cs b/Alchemy/Assets/Alchemy/Editor/Internal/EditorColors.cs index d73984e..3533bfb 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/EditorColors.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/EditorColors.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEditor; using System; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { // Rererence: https://www.foundations.unity.com/fundamentals/color-palette diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/EditorIcons.cs b/Alchemy/Assets/Alchemy/Editor/Internal/EditorIcons.cs index bfe155d..3047973 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/EditorIcons.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/EditorIcons.cs @@ -1,7 +1,7 @@ using UnityEditor; using UnityEngine; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { internal static class EditorIcons { diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/GUIHelper.cs b/Alchemy/Assets/Alchemy/Editor/Internal/GUIHelper.cs index 4e70d92..3acf018 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/GUIHelper.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/GUIHelper.cs @@ -6,7 +6,7 @@ using UnityEngine.Assertions; using Alchemy.Inspector; using System; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { internal static class GUIHelper { diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/InspectorHelper.cs b/Alchemy/Assets/Alchemy/Editor/Internal/InspectorHelper.cs index 35f23c1..d29b605 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/InspectorHelper.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/InspectorHelper.cs @@ -12,7 +12,7 @@ using Alchemy.Editor.Elements; using Alchemy.Serialization; #endif -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { internal static class InspectorHelper { diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/InternalAPIHelper.cs b/Alchemy/Assets/Alchemy/Editor/Internal/InternalAPIHelper.cs index c6cfeed..47a5379 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/InternalAPIHelper.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/InternalAPIHelper.cs @@ -2,14 +2,14 @@ using System; using System.Reflection; using UnityEngine.UIElements; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { using Editor = UnityEditor.Editor; /// /// Call the Unity internal API using reflection. This may not work depending on your Unity version. /// - public static class InternalAPIHelper + internal static class InternalAPIHelper { static readonly Assembly EditorAssembly = Assembly.GetAssembly(typeof(Editor)); diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/MemberInfoExtensions.cs b/Alchemy/Assets/Alchemy/Editor/Internal/MemberInfoExtensions.cs index a8dcf81..a8cb6e6 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/MemberInfoExtensions.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/MemberInfoExtensions.cs @@ -1,9 +1,9 @@ using System; using System.Reflection; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { - public static class MemberInfoExtensions + internal static class MemberInfoExtensions { public static bool HasCustomAttribute(this MemberInfo memberInfo) where T : Attribute { diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/ReflectionHelper.cs b/Alchemy/Assets/Alchemy/Editor/Internal/ReflectionHelper.cs index 9367eb6..1bf6344 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/ReflectionHelper.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/ReflectionHelper.cs @@ -4,11 +4,10 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -using UnityEngine; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { - public static class ReflectionHelper + internal static class ReflectionHelper { static readonly Dictionary<(Type, string, BindingFlags, bool), FieldInfo> cacheFieldInfo = new(); static readonly Dictionary<(Type, string, BindingFlags, bool), MethodInfo> cacheMethodInfo = new(); diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/SerializeReferenceDropdown.cs b/Alchemy/Assets/Alchemy/Editor/Internal/SerializeReferenceDropdown.cs index 6f419d0..75dcaf4 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/SerializeReferenceDropdown.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/SerializeReferenceDropdown.cs @@ -5,9 +5,9 @@ using UnityEngine; using UnityEditor; using UnityEditor.IMGUI.Controls; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { - public sealed class SerializeReferenceDropdownItem : AdvancedDropdownItem + internal sealed class SerializeReferenceDropdownItem : AdvancedDropdownItem { public readonly Type type; public SerializeReferenceDropdownItem(Type type, string name) : base(name) @@ -17,7 +17,7 @@ namespace Alchemy.Editor.Internal } } - public sealed class SerializeReferenceDropdown : AdvancedDropdown + internal sealed class SerializeReferenceDropdown : AdvancedDropdown { private static readonly float headerHeight = EditorGUIUtility.singleLineHeight * 2f; private static readonly int maxNamespaceNestCount = 16; diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs b/Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs deleted file mode 100644 index 6fc0bcb..0000000 --- a/Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Reflection; -using UnityEditor; - -namespace Alchemy.Editor.Internal -{ - public static class SerializedObjectExtensions - { - - } -} \ No newline at end of file diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs.meta b/Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs.meta deleted file mode 100644 index 96f679f..0000000 --- a/Alchemy/Assets/Alchemy/Editor/Internal/SerializedObjectExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e70b6aca000bb4a698521391868e2f98 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/SerializedPropertyExtensions.cs b/Alchemy/Assets/Alchemy/Editor/Internal/SerializedPropertyExtensions.cs index 352de72..f5a1a01 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/SerializedPropertyExtensions.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/SerializedPropertyExtensions.cs @@ -7,9 +7,9 @@ using System.Text.RegularExpressions; using UnityEngine; using UnityEditor; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { - public static class SerializedPropertyExtensions + internal static class SerializedPropertyExtensions { public static bool TryGetAttribute(this SerializedProperty property, out TAttribute result) where TAttribute : Attribute { diff --git a/Alchemy/Assets/Alchemy/Editor/Internal/TypeHelper.cs b/Alchemy/Assets/Alchemy/Editor/Internal/TypeHelper.cs index 5585a6a..8915fbc 100644 --- a/Alchemy/Assets/Alchemy/Editor/Internal/TypeHelper.cs +++ b/Alchemy/Assets/Alchemy/Editor/Internal/TypeHelper.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace Alchemy.Editor.Internal +namespace Alchemy.Editor { internal static class TypeHelper {