Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
708b99f763 | ||
|
|
a9576ce008 | ||
|
|
8572a31421 |
|
|
@ -2,6 +2,12 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
|
||||
|
||||
## [1.11.4] - 2025-09-21
|
||||
|
||||
### Fixed
|
||||
- Fixed issue, where changing DPI scaling on monitor would detach visual elements from toolbar and not reattach/rebuild
|
||||
|
||||
|
||||
## [1.11.3] - 2025-05-11
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
EditorApplication.update -= OnEditorUpdate;
|
||||
EditorApplication.update += OnEditorUpdate;
|
||||
}
|
||||
|
||||
|
||||
private static void OnEditorUpdate()
|
||||
{
|
||||
if (!IS_INITIALIZED)
|
||||
|
|
@ -47,8 +47,8 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
DRAWERS[i].Update();
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
private static void OnUpdateElements(VisualElement leftAlign, VisualElement rightAlign)
|
||||
{
|
||||
const float HEIGHT = 22.0f;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
private static VisualElement CURRENT_PARENT_LEFT;
|
||||
private static VisualElement CURRENT_PARENT_RIGHT;
|
||||
private static int CURRENT_INSTANCE_ID;
|
||||
private static FieldInfo FIELD_INFO_ROOT;
|
||||
#endif
|
||||
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
|
|
@ -58,9 +59,11 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
|
||||
CURRENT_PARENT_RIGHT?.RemoveFromHierarchy();
|
||||
CURRENT_PARENT_RIGHT = null;
|
||||
|
||||
if (FIELD_INFO_ROOT == null)
|
||||
FIELD_INFO_ROOT = CURRENT_TOOLBAR.GetType().GetField("m_Root", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
FieldInfo root = CURRENT_TOOLBAR.GetType().GetField("m_Root", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
object rawRoot = root?.GetValue(CURRENT_TOOLBAR);
|
||||
object rawRoot = FIELD_INFO_ROOT?.GetValue(CURRENT_TOOLBAR);
|
||||
CURRENT_ROOT = rawRoot as VisualElement;
|
||||
|
||||
if (CURRENT_ROOT != null)
|
||||
|
|
@ -121,6 +124,10 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
});
|
||||
}
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
result.RegisterCallbackOnce<DetachFromPanelEvent>(OnDetachedFromPanel);
|
||||
#endif
|
||||
|
||||
parent.Add(result);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -219,5 +226,12 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
private static void OnDetachedFromPanel(DetachFromPanelEvent evt)
|
||||
{
|
||||
CURRENT_INSTANCE_ID = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
9
LICENSE
Normal file
9
LICENSE
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 ejlersen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
7
LICENSE.meta
Normal file
7
LICENSE.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 81eaa9f1644b27547b1195ceb554d6b9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.module.navigationtool",
|
||||
"version": "1.11.3",
|
||||
"version": "1.11.4",
|
||||
"displayName": "Module.NavigationTool",
|
||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||
"unity": "2019.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue