From cb8e947fdf3dfb2f819d2aff35a39b8a3ebd5261 Mon Sep 17 00:00:00 2001 From: Sinai Date: Wed, 26 May 2021 17:40:09 +1000 Subject: [PATCH] Namespace/structure cleanup --- src/Core/SceneHandler.cs | 177 ------------------ src/Core/Tests/TestClass.cs | 2 +- src/UI/CacheObject/CacheKeyValuePair.cs | 3 +- src/UI/CacheObject/CacheListEntry.cs | 2 +- src/UI/CacheObject/CacheMember.cs | 3 +- src/UI/CacheObject/CacheObjectBase.cs | 5 +- .../IValues/InteractiveColor.cs | 2 +- .../IValues/InteractiveDictionary.cs | 3 +- .../IValues/InteractiveEnum.cs | 2 +- .../IValues/InteractiveList.cs | 3 +- .../IValues/InteractiveString.cs | 2 +- .../IValues/InteractiveValue.cs | 4 +- .../IValues/InteractiveValueStruct.cs | 3 +- .../Views/CacheKeyValuePairCell.cs | 2 +- .../CacheObject/Views/CacheListEntryCell.cs | 2 +- src/UI/CacheObject/Views/CacheObjectCell.cs | 4 +- src/UI/CacheObject/Views/EvaluateWidget.cs | 3 +- src/UI/Inspectors/GameObjectInspector.cs | 7 +- src/UI/Inspectors/InspectorBase.cs | 2 +- src/UI/Inspectors/InspectorManager.cs | 2 +- src/UI/Inspectors/InspectorTab.cs | 2 +- src/UI/Inspectors/ReflectionInspector.cs | 2 - .../{ => Models}/ObjectPool/IPooledObject.cs | 2 +- src/UI/{ => Models}/ObjectPool/Pool.cs | 2 +- src/UI/ObjectExplorer/ObjectSearch.cs | 3 - src/UI/Panels/CSConsolePanel.cs | 2 +- src/UI/Panels/ObjectExplorerPanel.cs | 1 - src/UI/Panels/UIPanel.cs | 1 - src/UI/UIFactory.cs | 1 - src/UI/UIManager.cs | 1 - .../Widgets/AutoComplete/AutoCompleteModal.cs | 1 - src/UI/Widgets/AutoComplete/TypeCompleter.cs | 1 - src/UI/Widgets/AutoSliderScrollbar.cs | 2 +- src/UI/Widgets/ButtonList/ButtonCell.cs | 1 - .../Widgets/ButtonList/ButtonListHandler.cs | 3 - src/UI/Widgets/InputFieldScroller.cs | 2 +- src/UI/Widgets/ScrollPool/ICell.cs | 2 +- src/UnityExplorer.csproj | 20 +- 38 files changed, 40 insertions(+), 242 deletions(-) delete mode 100644 src/Core/SceneHandler.cs rename src/UI/{ => CacheObject}/IValues/InteractiveColor.cs (99%) rename src/UI/{ => CacheObject}/IValues/InteractiveDictionary.cs (99%) rename src/UI/{ => CacheObject}/IValues/InteractiveEnum.cs (99%) rename src/UI/{ => CacheObject}/IValues/InteractiveList.cs (99%) rename src/UI/{ => CacheObject}/IValues/InteractiveString.cs (98%) rename src/UI/{ => CacheObject}/IValues/InteractiveValue.cs (96%) rename src/UI/{ => CacheObject}/IValues/InteractiveValueStruct.cs (99%) rename src/UI/{ => Models}/ObjectPool/IPooledObject.cs (89%) rename src/UI/{ => Models}/ObjectPool/Pool.cs (98%) diff --git a/src/Core/SceneHandler.cs b/src/Core/SceneHandler.cs deleted file mode 100644 index dd0363d..0000000 --- a/src/Core/SceneHandler.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using UnityEngine; -using UnityEngine.SceneManagement; - -namespace UnityExplorer.Core -{ - public static class SceneHandler - { - /// - /// The currently inspected Scene. - /// - public static Scene? SelectedScene - { - get => m_selectedScene; - internal set - { - if (m_selectedScene != null && m_selectedScene?.handle == value?.handle) - return; - m_selectedScene = value; - OnInspectedSceneChanged?.Invoke((Scene)m_selectedScene); - } - } - private static Scene? m_selectedScene; - - /// - /// The GameObjects in the currently inspected scene. - /// - public static ReadOnlyCollection CurrentRootObjects => new ReadOnlyCollection(rootObjects); - private static GameObject[] rootObjects = new GameObject[0]; - - /// - /// All currently loaded Scenes. - /// - public static ReadOnlyCollection LoadedScenes => new ReadOnlyCollection(allLoadedScenes); - private static readonly List allLoadedScenes = new List(); - - /// - /// The names of all scenes in the build settings, if they could be retrieved. - /// - public static ReadOnlyCollection AllSceneNames => new ReadOnlyCollection(allScenesInBuild); - private static readonly List allScenesInBuild = new List(); - - /// - /// Whether or not we successfuly retrieved the names of the scenes in the build settings. - /// - public static bool WasAbleToGetScenesInBuild => gotAllScenesInBuild; - private static bool gotAllScenesInBuild = true; - - /// - /// Invoked when the currently inspected Scene changes. The argument is the new scene. - /// - public static event Action OnInspectedSceneChanged; - - /// - /// Invoked whenever the list of currently loaded Scenes changes. The argument contains all loaded scenes after the change. - /// - public static event Action> OnLoadedScenesChanged; - - /// - /// Equivalent to + 2, to include 'DontDestroyOnLoad'. - /// - public static int LoadedSceneCount => SceneManager.sceneCount + 2; - - internal static Scene DontDestroyScene => DontDestroyMe.scene; - internal static int DontDestroyHandle => DontDestroyScene.handle; - - internal static GameObject DontDestroyMe - { - get - { - if (!dontDestroyObject) - { - dontDestroyObject = new GameObject("DontDestroyMe"); - GameObject.DontDestroyOnLoad(dontDestroyObject); - } - return dontDestroyObject; - } - } - private static GameObject dontDestroyObject; - - public static bool InspectingAssetScene => !SelectedScene?.IsValid() ?? false; - - internal static void Init() - { - // Try to get all scenes in the build settings. This may not work. - try - { - Type sceneUtil = ReflectionUtility.GetTypeByName("UnityEngine.SceneManagement.SceneUtility"); - if (sceneUtil == null) - throw new Exception("This version of Unity does not ship with the 'SceneUtility' class, or it was not unstripped."); - - var method = sceneUtil.GetMethod("GetScenePathByBuildIndex", ReflectionUtility.FLAGS); - int sceneCount = SceneManager.sceneCountInBuildSettings; - for (int i = 0; i < sceneCount; i++) - { - var scenePath = (string)method.Invoke(null, new object[] { i }); - allScenesInBuild.Add(scenePath); - } - } - catch (Exception ex) - { - gotAllScenesInBuild = false; - ExplorerCore.LogWarning($"Unable to generate list of all Scenes in the build: {ex}"); - } - } - - internal static void Update() - { - int curHandle = SelectedScene?.handle ?? -1; - // DontDestroyOnLoad always exists, so default to true if our curHandle is that handle. - // otherwise we will check while iterating. - bool inspectedExists = curHandle == DontDestroyHandle || curHandle == 0; - - // Quick sanity check if the loaded scenes changed - bool anyChange = LoadedSceneCount != allLoadedScenes.Count; - // otherwise keep a lookup table of the previous handles to check if the list changed at all. - HashSet previousHandles = null; - if (!anyChange) - previousHandles = new HashSet(allLoadedScenes.Select(it => it.handle)); - - allLoadedScenes.Clear(); - - for (int i = 0; i < SceneManager.sceneCount; i++) - { - Scene scene = SceneManager.GetSceneAt(i); - if (scene == default || !scene.isLoaded) - continue; - - // If no changes yet, ensure the previous list contained this handle. - if (!anyChange && !previousHandles.Contains(scene.handle)) - anyChange = true; - - // If we have not yet confirmed inspectedExists, check if this scene is our currently inspected one. - if (curHandle != -1 && !inspectedExists && scene.handle == curHandle) - inspectedExists = true; - - allLoadedScenes.Add(scene); - } - - // Always add the DontDestroyOnLoad scene and the "none" scene. - allLoadedScenes.Add(DontDestroyScene); - allLoadedScenes.Add(default); - - // Default to first scene if none selected or previous selection no longer exists. - if (!inspectedExists) - { - SelectedScene = allLoadedScenes.First(); - } - - // Notify on the list changing at all - if (anyChange) - { - OnLoadedScenesChanged?.Invoke(LoadedScenes); - } - - // Finally, update the root objects list. - if (SelectedScene != null && ((Scene)SelectedScene).IsValid()) - rootObjects = RuntimeProvider.Instance.GetRootGameObjects((Scene)SelectedScene); - else - { - var allObjects = RuntimeProvider.Instance.FindObjectsOfTypeAll(typeof(GameObject)); - var list = new List(); - foreach (var obj in allObjects) - { - var go = obj.TryCast(); - if (go.transform.parent == null && !go.scene.IsValid()) - list.Add(go); - } - rootObjects = list.ToArray(); - } - } - } -} diff --git a/src/Core/Tests/TestClass.cs b/src/Core/Tests/TestClass.cs index f60aea6..db82efe 100644 --- a/src/Core/Tests/TestClass.cs +++ b/src/Core/Tests/TestClass.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; -using UnityExplorer.UI.IValues; +using UnityExplorer.UI.CacheObject.IValues; using System.Reflection; using UnityExplorer.UI; #if CPP diff --git a/src/UI/CacheObject/CacheKeyValuePair.cs b/src/UI/CacheObject/CacheKeyValuePair.cs index e50a872..7f97afb 100644 --- a/src/UI/CacheObject/CacheKeyValuePair.cs +++ b/src/UI/CacheObject/CacheKeyValuePair.cs @@ -3,8 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using UnityExplorer.UI.CacheObject.Views; -using UnityExplorer.UI.IValues; -using UnityExplorer.UI.Utility; +using UnityExplorer.UI.CacheObject.IValues; namespace UnityExplorer.UI.CacheObject { diff --git a/src/UI/CacheObject/CacheListEntry.cs b/src/UI/CacheObject/CacheListEntry.cs index be9c736..0fdfef4 100644 --- a/src/UI/CacheObject/CacheListEntry.cs +++ b/src/UI/CacheObject/CacheListEntry.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using UnityExplorer.UI.CacheObject.Views; -using UnityExplorer.UI.IValues; +using UnityExplorer.UI.CacheObject.IValues; namespace UnityExplorer.UI.CacheObject { diff --git a/src/UI/CacheObject/CacheMember.cs b/src/UI/CacheObject/CacheMember.cs index 928582c..5c7f10f 100644 --- a/src/UI/CacheObject/CacheMember.cs +++ b/src/UI/CacheObject/CacheMember.cs @@ -7,8 +7,7 @@ using UnityEngine; using UnityExplorer.Core.Runtime; using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.UI.Inspectors; -using UnityExplorer.UI.ObjectPool; -using UnityExplorer.UI.Utility; +using UnityExplorer.UI.Models; namespace UnityExplorer.UI.CacheObject { diff --git a/src/UI/CacheObject/CacheObjectBase.cs b/src/UI/CacheObject/CacheObjectBase.cs index ad623ac..02d57a2 100644 --- a/src/UI/CacheObject/CacheObjectBase.cs +++ b/src/UI/CacheObject/CacheObjectBase.cs @@ -8,9 +8,8 @@ using UnityEngine; using UnityEngine.UI; using UnityExplorer.Core.Runtime; using UnityExplorer.UI.CacheObject.Views; -using UnityExplorer.UI.IValues; -using UnityExplorer.UI.ObjectPool; -using UnityExplorer.UI.Utility; +using UnityExplorer.UI.CacheObject.IValues; +using UnityExplorer.UI.Models; namespace UnityExplorer.UI.CacheObject { diff --git a/src/UI/IValues/InteractiveColor.cs b/src/UI/CacheObject/IValues/InteractiveColor.cs similarity index 99% rename from src/UI/IValues/InteractiveColor.cs rename to src/UI/CacheObject/IValues/InteractiveColor.cs index 3778b49..bb078d5 100644 --- a/src/UI/IValues/InteractiveColor.cs +++ b/src/UI/CacheObject/IValues/InteractiveColor.cs @@ -6,7 +6,7 @@ using UnityEngine; using UnityEngine.UI; using UnityExplorer.UI.CacheObject; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public class InteractiveColor : InteractiveValue { diff --git a/src/UI/IValues/InteractiveDictionary.cs b/src/UI/CacheObject/IValues/InteractiveDictionary.cs similarity index 99% rename from src/UI/IValues/InteractiveDictionary.cs rename to src/UI/CacheObject/IValues/InteractiveDictionary.cs index 7c4de88..62a614e 100644 --- a/src/UI/IValues/InteractiveDictionary.cs +++ b/src/UI/CacheObject/IValues/InteractiveDictionary.cs @@ -9,10 +9,9 @@ using UnityExplorer.UI.CacheObject; using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.UI.Inspectors; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public class InteractiveDictionary : InteractiveValue, ICellPoolDataSource, ICacheObjectController { diff --git a/src/UI/IValues/InteractiveEnum.cs b/src/UI/CacheObject/IValues/InteractiveEnum.cs similarity index 99% rename from src/UI/IValues/InteractiveEnum.cs rename to src/UI/CacheObject/IValues/InteractiveEnum.cs index bcf1fab..e2f643d 100644 --- a/src/UI/IValues/InteractiveEnum.cs +++ b/src/UI/CacheObject/IValues/InteractiveEnum.cs @@ -7,7 +7,7 @@ using UnityEngine; using UnityEngine.UI; using UnityExplorer.UI.CacheObject; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public class InteractiveEnum : InteractiveValue { diff --git a/src/UI/IValues/InteractiveList.cs b/src/UI/CacheObject/IValues/InteractiveList.cs similarity index 99% rename from src/UI/IValues/InteractiveList.cs rename to src/UI/CacheObject/IValues/InteractiveList.cs index f14b38c..88c27fe 100644 --- a/src/UI/IValues/InteractiveList.cs +++ b/src/UI/CacheObject/IValues/InteractiveList.cs @@ -9,10 +9,9 @@ using UnityExplorer.UI.CacheObject; using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.UI.Inspectors; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public class InteractiveList : InteractiveValue, ICellPoolDataSource, ICacheObjectController { diff --git a/src/UI/IValues/InteractiveString.cs b/src/UI/CacheObject/IValues/InteractiveString.cs similarity index 98% rename from src/UI/IValues/InteractiveString.cs rename to src/UI/CacheObject/IValues/InteractiveString.cs index 1a0c8a7..3ea426e 100644 --- a/src/UI/IValues/InteractiveString.cs +++ b/src/UI/CacheObject/IValues/InteractiveString.cs @@ -9,7 +9,7 @@ using UnityExplorer.Core.Config; using UnityExplorer.UI.CacheObject; using UnityExplorer.UI.Widgets; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public class InteractiveString : InteractiveValue { diff --git a/src/UI/IValues/InteractiveValue.cs b/src/UI/CacheObject/IValues/InteractiveValue.cs similarity index 96% rename from src/UI/IValues/InteractiveValue.cs rename to src/UI/CacheObject/IValues/InteractiveValue.cs index 80f5000..1fda917 100644 --- a/src/UI/IValues/InteractiveValue.cs +++ b/src/UI/CacheObject/IValues/InteractiveValue.cs @@ -5,9 +5,9 @@ using System.Text; using UnityEngine; using UnityEngine.UI; using UnityExplorer.UI.CacheObject; -using UnityExplorer.UI.ObjectPool; +using UnityExplorer.UI.Models; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public abstract class InteractiveValue : IPooledObject { diff --git a/src/UI/IValues/InteractiveValueStruct.cs b/src/UI/CacheObject/IValues/InteractiveValueStruct.cs similarity index 99% rename from src/UI/IValues/InteractiveValueStruct.cs rename to src/UI/CacheObject/IValues/InteractiveValueStruct.cs index adbc56f..a414014 100644 --- a/src/UI/IValues/InteractiveValueStruct.cs +++ b/src/UI/CacheObject/IValues/InteractiveValueStruct.cs @@ -6,9 +6,8 @@ using System.Text; using UnityEngine; using UnityEngine.UI; using UnityExplorer.UI.CacheObject; -using UnityExplorer.UI.Utility; -namespace UnityExplorer.UI.IValues +namespace UnityExplorer.UI.CacheObject.IValues { public class InteractiveValueStruct : InteractiveValue { diff --git a/src/UI/CacheObject/Views/CacheKeyValuePairCell.cs b/src/UI/CacheObject/Views/CacheKeyValuePairCell.cs index 3b1b8af..ae2599a 100644 --- a/src/UI/CacheObject/Views/CacheKeyValuePairCell.cs +++ b/src/UI/CacheObject/Views/CacheKeyValuePairCell.cs @@ -5,7 +5,7 @@ using System.Text; using UnityEngine; using UnityEngine.UI; using UnityExplorer.UI.Inspectors; -using UnityExplorer.UI.IValues; +using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.CacheObject.Views diff --git a/src/UI/CacheObject/Views/CacheListEntryCell.cs b/src/UI/CacheObject/Views/CacheListEntryCell.cs index 16341fe..27c0b46 100644 --- a/src/UI/CacheObject/Views/CacheListEntryCell.cs +++ b/src/UI/CacheObject/Views/CacheListEntryCell.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using UnityEngine; using UnityEngine.UI; -using UnityExplorer.UI.IValues; +using UnityExplorer.UI.CacheObject.IValues; namespace UnityExplorer.UI.CacheObject.Views { diff --git a/src/UI/CacheObject/Views/CacheObjectCell.cs b/src/UI/CacheObject/Views/CacheObjectCell.cs index afb029c..a13e5ea 100644 --- a/src/UI/CacheObject/Views/CacheObjectCell.cs +++ b/src/UI/CacheObject/Views/CacheObjectCell.cs @@ -5,9 +5,7 @@ using System.Text; using UnityEngine; using UnityEngine.UI; using UnityExplorer.UI.Inspectors; -using UnityExplorer.UI.IValues; -using UnityExplorer.UI.ObjectPool; -using UnityExplorer.UI.Utility; +using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.CacheObject.Views diff --git a/src/UI/CacheObject/Views/EvaluateWidget.cs b/src/UI/CacheObject/Views/EvaluateWidget.cs index 46d8cf9..8896aea 100644 --- a/src/UI/CacheObject/Views/EvaluateWidget.cs +++ b/src/UI/CacheObject/Views/EvaluateWidget.cs @@ -5,8 +5,7 @@ using System.Reflection; using System.Text; using UnityEngine; using UnityEngine.UI; -using UnityExplorer.UI.ObjectPool; -using UnityExplorer.UI.Utility; +using UnityExplorer.UI.Models; using UnityExplorer.UI.Widgets.AutoComplete; namespace UnityExplorer.UI.CacheObject.Views diff --git a/src/UI/Inspectors/GameObjectInspector.cs b/src/UI/Inspectors/GameObjectInspector.cs index 7848298..07ba961 100644 --- a/src/UI/Inspectors/GameObjectInspector.cs +++ b/src/UI/Inspectors/GameObjectInspector.cs @@ -6,9 +6,8 @@ using System.Text; using UnityEngine; using UnityEngine.UI; using UnityExplorer.Core.Input; -using UnityExplorer.UI.ObjectPool; +using UnityExplorer.UI.Models; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets.AutoComplete; @@ -221,8 +220,8 @@ namespace UnityExplorer.UI.Inspectors public override GameObject CreateContent(GameObject parent) { - UIRoot = UIFactory.CreateVerticalGroup(Pool.Instance.InactiveHolder, - "GameObjectInspector", true, false, true, true, 5, new Vector4(4, 4, 4, 4), new Color(0.065f, 0.065f, 0.065f)); + UIRoot = UIFactory.CreateVerticalGroup(parent, "GameObjectInspector", true, false, true, true, 5, + new Vector4(4, 4, 4, 4), new Color(0.065f, 0.065f, 0.065f)); var scrollObj = UIFactory.CreateScrollView(UIRoot, "GameObjectInspector", out Content, out var scrollbar, new Color(0.065f, 0.065f, 0.065f)); diff --git a/src/UI/Inspectors/InspectorBase.cs b/src/UI/Inspectors/InspectorBase.cs index 0634bac..8623f5c 100644 --- a/src/UI/Inspectors/InspectorBase.cs +++ b/src/UI/Inspectors/InspectorBase.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using UnityEngine; using UnityEngine.UI; -using UnityExplorer.UI.ObjectPool; +using UnityExplorer.UI.Models; using UnityExplorer.UI.Panels; namespace UnityExplorer.UI.Inspectors diff --git a/src/UI/Inspectors/InspectorManager.cs b/src/UI/Inspectors/InspectorManager.cs index c1dffe0..e6eda65 100644 --- a/src/UI/Inspectors/InspectorManager.cs +++ b/src/UI/Inspectors/InspectorManager.cs @@ -7,7 +7,7 @@ using UnityEngine.UI; using UnityExplorer.UI; using UnityExplorer.UI.CacheObject; using UnityExplorer.UI.Inspectors; -using UnityExplorer.UI.ObjectPool; +using UnityExplorer.UI.Models; using UnityExplorer.UI.Panels; namespace UnityExplorer diff --git a/src/UI/Inspectors/InspectorTab.cs b/src/UI/Inspectors/InspectorTab.cs index ae8f22a..045dfa0 100644 --- a/src/UI/Inspectors/InspectorTab.cs +++ b/src/UI/Inspectors/InspectorTab.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using UnityEngine; using UnityEngine.UI; -using UnityExplorer.UI.ObjectPool; +using UnityExplorer.UI.Models; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.Inspectors diff --git a/src/UI/Inspectors/ReflectionInspector.cs b/src/UI/Inspectors/ReflectionInspector.cs index 9caee23..5d86bae 100644 --- a/src/UI/Inspectors/ReflectionInspector.cs +++ b/src/UI/Inspectors/ReflectionInspector.cs @@ -12,9 +12,7 @@ using UnityExplorer.Core.Config; using UnityExplorer.Core.Runtime; using UnityExplorer.UI.CacheObject; using UnityExplorer.UI.CacheObject.Views; -using UnityExplorer.UI.ObjectPool; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.Inspectors diff --git a/src/UI/ObjectPool/IPooledObject.cs b/src/UI/Models/ObjectPool/IPooledObject.cs similarity index 89% rename from src/UI/ObjectPool/IPooledObject.cs rename to src/UI/Models/ObjectPool/IPooledObject.cs index 3b08751..9ffd3b6 100644 --- a/src/UI/ObjectPool/IPooledObject.cs +++ b/src/UI/Models/ObjectPool/IPooledObject.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using UnityEngine; -namespace UnityExplorer.UI.ObjectPool +namespace UnityExplorer.UI.Models { public interface IPooledObject { diff --git a/src/UI/ObjectPool/Pool.cs b/src/UI/Models/ObjectPool/Pool.cs similarity index 98% rename from src/UI/ObjectPool/Pool.cs rename to src/UI/Models/ObjectPool/Pool.cs index 497c99d..1ab92f3 100644 --- a/src/UI/ObjectPool/Pool.cs +++ b/src/UI/Models/ObjectPool/Pool.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using UnityEngine; -namespace UnityExplorer.UI.ObjectPool +namespace UnityExplorer.UI.Models { // Abstract non-generic class, handles the pool dictionary and interfacing with the generic pools. public abstract class Pool diff --git a/src/UI/ObjectExplorer/ObjectSearch.cs b/src/UI/ObjectExplorer/ObjectSearch.cs index e09145b..d5d4377 100644 --- a/src/UI/ObjectExplorer/ObjectSearch.cs +++ b/src/UI/ObjectExplorer/ObjectSearch.cs @@ -4,11 +4,8 @@ using System.Linq; using System.Text; using UnityEngine; using UnityEngine.UI; -using UnityExplorer.UI.Inspectors; using UnityExplorer.UI.Models; -using UnityExplorer.UI.ObjectPool; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets.AutoComplete; diff --git a/src/UI/Panels/CSConsolePanel.cs b/src/UI/Panels/CSConsolePanel.cs index 0ed4612..a6a7846 100644 --- a/src/UI/Panels/CSConsolePanel.cs +++ b/src/UI/Panels/CSConsolePanel.cs @@ -7,7 +7,7 @@ using UnityEngine.EventSystems; using UnityEngine.UI; using UnityExplorer.Core.Config; using UnityExplorer.UI.CSConsole; -using UnityExplorer.UI.Utility; +using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.Panels { diff --git a/src/UI/Panels/ObjectExplorerPanel.cs b/src/UI/Panels/ObjectExplorerPanel.cs index 1158122..c37ded0 100644 --- a/src/UI/Panels/ObjectExplorerPanel.cs +++ b/src/UI/Panels/ObjectExplorerPanel.cs @@ -12,7 +12,6 @@ using UnityExplorer.Core; using UnityExplorer.Core.Config; using UnityExplorer.UI.Models; using UnityExplorer.UI.ObjectExplorer; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.Panels diff --git a/src/UI/Panels/UIPanel.cs b/src/UI/Panels/UIPanel.cs index d8c40f8..ca3f996 100644 --- a/src/UI/Panels/UIPanel.cs +++ b/src/UI/Panels/UIPanel.cs @@ -8,7 +8,6 @@ using UnityEngine.UI; using UnityExplorer.Core.Config; using UnityExplorer.Core.Input; using UnityExplorer.UI.Models; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.Panels diff --git a/src/UI/UIFactory.cs b/src/UI/UIFactory.cs index 914e14c..bb8aa73 100644 --- a/src/UI/UIFactory.cs +++ b/src/UI/UIFactory.cs @@ -5,7 +5,6 @@ using UnityEngine.UI; using UnityExplorer.Core.Config; using UnityExplorer.Core.Runtime; using UnityExplorer.UI.Models; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI diff --git a/src/UI/UIManager.cs b/src/UI/UIManager.cs index cfcc566..caec768 100644 --- a/src/UI/UIManager.cs +++ b/src/UI/UIManager.cs @@ -12,7 +12,6 @@ using UnityExplorer.UI.CSConsole; using UnityExplorer.UI.Inspectors; using UnityExplorer.UI.Models; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets.AutoComplete; diff --git a/src/UI/Widgets/AutoComplete/AutoCompleteModal.cs b/src/UI/Widgets/AutoComplete/AutoCompleteModal.cs index 4380ea1..e412aa1 100644 --- a/src/UI/Widgets/AutoComplete/AutoCompleteModal.cs +++ b/src/UI/Widgets/AutoComplete/AutoCompleteModal.cs @@ -7,7 +7,6 @@ using UnityEngine.UI; using UnityExplorer.Core.Input; using UnityExplorer.Core.Runtime; using UnityExplorer.UI; -using UnityExplorer.UI.ObjectPool; using UnityExplorer.UI.Panels; namespace UnityExplorer.UI.Widgets.AutoComplete diff --git a/src/UI/Widgets/AutoComplete/TypeCompleter.cs b/src/UI/Widgets/AutoComplete/TypeCompleter.cs index 80a1a8f..df83c2c 100644 --- a/src/UI/Widgets/AutoComplete/TypeCompleter.cs +++ b/src/UI/Widgets/AutoComplete/TypeCompleter.cs @@ -9,7 +9,6 @@ using UnityExplorer.Core.Input; using UnityExplorer.Core.Runtime; using UnityExplorer.UI.Models; using UnityExplorer.UI.Panels; -using UnityExplorer.UI.Utility; namespace UnityExplorer.UI.Widgets.AutoComplete { diff --git a/src/UI/Widgets/AutoSliderScrollbar.cs b/src/UI/Widgets/AutoSliderScrollbar.cs index 86b92d4..5f4c12d 100644 --- a/src/UI/Widgets/AutoSliderScrollbar.cs +++ b/src/UI/Widgets/AutoSliderScrollbar.cs @@ -10,7 +10,7 @@ using UnityExplorer.Core; using UnityExplorer.UI; using UnityExplorer.UI.Models; -namespace UnityExplorer.UI.Utility +namespace UnityExplorer.UI.Widgets { public class AutoSliderScrollbar : UIBehaviourModel { diff --git a/src/UI/Widgets/ButtonList/ButtonCell.cs b/src/UI/Widgets/ButtonList/ButtonCell.cs index 976277f..40948b6 100644 --- a/src/UI/Widgets/ButtonList/ButtonCell.cs +++ b/src/UI/Widgets/ButtonList/ButtonCell.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Text; using UnityEngine; using UnityEngine.UI; -using UnityExplorer.UI.ObjectPool; namespace UnityExplorer.UI.Widgets { diff --git a/src/UI/Widgets/ButtonList/ButtonListHandler.cs b/src/UI/Widgets/ButtonList/ButtonListHandler.cs index b7391bb..17d3db5 100644 --- a/src/UI/Widgets/ButtonList/ButtonListHandler.cs +++ b/src/UI/Widgets/ButtonList/ButtonListHandler.cs @@ -4,9 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; -using UnityEngine.UI; -using UnityExplorer.UI.ObjectPool; -using UnityExplorer.UI.Widgets; namespace UnityExplorer.UI.Widgets { diff --git a/src/UI/Widgets/InputFieldScroller.cs b/src/UI/Widgets/InputFieldScroller.cs index 6a83297..aeeb4f7 100644 --- a/src/UI/Widgets/InputFieldScroller.cs +++ b/src/UI/Widgets/InputFieldScroller.cs @@ -9,7 +9,7 @@ using UnityEngine.EventSystems; using UnityEngine.Events; using UnityExplorer.UI.Models; -namespace UnityExplorer.UI.Utility +namespace UnityExplorer.UI.Widgets { // To fix an issue with Input Fields and allow them to go inside a ScrollRect nicely. diff --git a/src/UI/Widgets/ScrollPool/ICell.cs b/src/UI/Widgets/ScrollPool/ICell.cs index 8b992a5..dce3eb4 100644 --- a/src/UI/Widgets/ScrollPool/ICell.cs +++ b/src/UI/Widgets/ScrollPool/ICell.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; -using UnityExplorer.UI.ObjectPool; +using UnityExplorer.UI.Models; namespace UnityExplorer.UI.Widgets { diff --git a/src/UnityExplorer.csproj b/src/UnityExplorer.csproj index 507f7b7..b95885f 100644 --- a/src/UnityExplorer.csproj +++ b/src/UnityExplorer.csproj @@ -281,17 +281,17 @@ - - - - - - + + + + + + - + - - + + @@ -319,7 +319,7 @@ - +