Fixed Unity 6000.5 serialization warnings
Removed obsolete entities window from toolbar sample
This commit is contained in:
parent
127702c4f7
commit
7a675c6c85
12 changed files with 65 additions and 10 deletions
|
|
@ -1,6 +1,14 @@
|
|||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [2.1.0] - 2026-06-16
|
||||
|
||||
### Fixed
|
||||
- Fixed Unity 6000.5 serialization warnings
|
||||
|
||||
### Removed
|
||||
- Removed obsolete entities window from toolbar sample
|
||||
|
||||
## [2.0.3] - 2026-03-31
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ namespace Module.NavigationTool.Editor.Favorite
|
|||
{
|
||||
public static readonly string PREF_ID = "PREF_FAVORITE_LIST";
|
||||
|
||||
#if UNITY_6000_5_OR_NEWER
|
||||
[SerializeReference]
|
||||
#endif
|
||||
public List<Entry> entries;
|
||||
|
||||
public Favorites()
|
||||
|
|
@ -236,6 +239,9 @@ namespace Module.NavigationTool.Editor.Favorite
|
|||
public bool isAsset;
|
||||
public bool expanded;
|
||||
public int indentLevel;
|
||||
#if UNITY_6000_5_OR_NEWER
|
||||
[SerializeReference]
|
||||
#endif
|
||||
public List<Child> children;
|
||||
|
||||
[NonSerialized]
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Module.NavigationTool.Editor.Favorite
|
|||
return;
|
||||
|
||||
styles.Initialize(GUI.skin);
|
||||
var rectTools = new Rect(0.0f, 0.0f, position.width, EditorGUIUtility.singleLineHeight);
|
||||
var rectTools = new Rect(2.0f, 0.0f, position.width - 4f, EditorGUIUtility.singleLineHeight);
|
||||
var rectList = new Rect(0.0f, rectTools.yMax, position.width, position.height - rectTools.height);
|
||||
|
||||
viewTools.Initialize();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Module.NavigationTool.Editor.Favorite
|
|||
toolbox = new GUIStyle(skin.box);
|
||||
|
||||
buttonAddFolder = new GUIStyle(skin.button);
|
||||
buttonAddFolder.padding = new RectOffset(4, 0, 0, 4);
|
||||
buttonAddFolder.padding = new RectOffset(4, 4, 2, 2);
|
||||
|
||||
entry = new GUIStyle(skin.label);
|
||||
entry.hover.textColor = entry.onHover.textColor = Color.white;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.NavigationTool.Editor.Favorite
|
||||
{
|
||||
[Serializable]
|
||||
internal abstract class AbstractEditorFavoritesView
|
||||
{
|
||||
public abstract void Initialize();
|
||||
|
|
|
|||
|
|
@ -15,17 +15,18 @@ namespace Module.NavigationTool.Editor.Favorite
|
|||
|
||||
public override void Draw(EditorFavoritesWindow window, Rect rect, Styles styles)
|
||||
{
|
||||
float dim = rect.height;
|
||||
float dimWidth = 24.0f;
|
||||
float dimHeight = rect.height;
|
||||
|
||||
GUI.BeginGroup(rect, styles.toolbox);
|
||||
{
|
||||
var r0 = new Rect(0.0f, 0.0f, rect.width - dim, dim);
|
||||
var r1 = new Rect(rect.width - r0.height, 0.0f, dim, dim);
|
||||
var r0 = new Rect(0.0f, 0.0f, rect.width - dimWidth, dimHeight);
|
||||
var r1 = new Rect(rect.width - dimWidth, 0.0f, dimWidth, dimHeight);
|
||||
|
||||
searchStr = EditorGUI.TextField(r0, searchStr);
|
||||
|
||||
if (GUI.Button(r1, "+", styles.buttonAddFolder))
|
||||
EditorFavoritesPopupWindowAddFolder.Show(new Vector2(r1.xMax, dim), null);
|
||||
EditorFavoritesPopupWindowAddFolder.Show(new Vector2(r1.xMax, dimHeight), null);
|
||||
}
|
||||
GUI.EndGroup();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.NavigationTool.Editor.History
|
||||
{
|
||||
[Serializable]
|
||||
internal abstract class AbstractEditorHistoryView
|
||||
{
|
||||
public abstract void Initialize();
|
||||
|
|
|
|||
8
Samples.meta
Normal file
8
Samples.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 30f6c7eb59372144da82504da7478213
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Samples~/SamplesToolbarBurst.meta
Normal file
8
Samples~/SamplesToolbarBurst.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5a5ce7561a51e654386a2c6ae3a67af0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Samples~/SamplesToolbarEntities.meta
Normal file
8
Samples~/SamplesToolbarEntities.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 672a1d963c4b96243beb62bfd1a06938
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -19,10 +19,14 @@ namespace Module.NavigationTool.Editor.Entities.Toolbar
|
|||
return new List<MainToolbarElement>(5)
|
||||
{
|
||||
new MainToolbarButton(new MainToolbarContent(Styles.IconHierarchy, "Show/Hide entities hierarchy window"), () => ToggleWindow("HierarchyWindow")),
|
||||
#if !UNITY_6000_5_OR_NEWER
|
||||
new MainToolbarButton(new MainToolbarContent(Styles.IconComponents, "Show/Hide entities components window"), () => ToggleWindow("ComponentsWindow")),
|
||||
#endif
|
||||
new MainToolbarButton(new MainToolbarContent(Styles.IconSystems, "Show/Hide entities systems window"), () => ToggleWindow("SystemScheduleWindow")),
|
||||
#if !UNITY_6000_5_OR_NEWER
|
||||
new MainToolbarButton(new MainToolbarContent(Styles.IconArchetypes, "Show/Hide entities archetypes window"), () => ToggleWindow("ArchetypesWindow")),
|
||||
new MainToolbarButton(new MainToolbarContent(Styles.IconJournaling, "Show/Hide entities journaling window"), () => ToggleWindow("EntitiesJournalingWindow"))
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -57,10 +61,14 @@ namespace Module.NavigationTool.Editor.Entities.Toolbar
|
|||
private static class Styles
|
||||
{
|
||||
public static Texture2D IconHierarchy;
|
||||
#if !UNITY_6000_5_OR_NEWER
|
||||
public static Texture2D IconComponents;
|
||||
#endif
|
||||
public static Texture2D IconSystems;
|
||||
#if !UNITY_6000_5_OR_NEWER
|
||||
public static Texture2D IconArchetypes;
|
||||
public static Texture2D IconJournaling;
|
||||
#endif
|
||||
|
||||
private static bool _isInitialized;
|
||||
|
||||
|
|
@ -74,10 +82,14 @@ namespace Module.NavigationTool.Editor.Entities.Toolbar
|
|||
return;
|
||||
|
||||
IconHierarchy = LoadIcon("EntityGroup/EntityGroup");
|
||||
#if !UNITY_6000_5_OR_NEWER
|
||||
IconComponents = LoadIcon("Component/Component");
|
||||
#endif
|
||||
IconSystems = LoadIcon("System/System");
|
||||
#if !UNITY_6000_5_OR_NEWER
|
||||
IconArchetypes = LoadIcon("Archetype/Archetype");
|
||||
IconJournaling = LoadIcon("Journaling/Journaling");
|
||||
#endif
|
||||
|
||||
_isInitialized = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.module.navigationtool",
|
||||
"version": "2.0.3",
|
||||
"version": "2.1.0",
|
||||
"displayName": "Module.NavigationTool",
|
||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||
"unity": "2019.2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue