fix: the correct fix

This commit is contained in:
hypercross 2025-09-06 19:43:40 +08:00
parent 4bd75f2868
commit 7ec5a903c5
4 changed files with 17 additions and 2 deletions

View File

@ -18,6 +18,10 @@ using static VFolders.Libs.VGUI;
using static VFolders.VFoldersData; using static VFolders.VFoldersData;
using static VFolders.VFoldersCache; using static VFolders.VFoldersCache;
#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#endif
namespace VFolders namespace VFolders
@ -97,7 +101,7 @@ namespace VFolders
var maxScrollPos = 20; var maxScrollPos = 20;
var scrollPos = window.GetMemberValue(isOneColumn ? "m_AssetTree" : "m_FolderTree").GetMemberValue<UnityEditor.IMGUI.Controls.TreeViewState>("state").scrollPos.y; var scrollPos = window.GetMemberValue(isOneColumn ? "m_AssetTree" : "m_FolderTree").GetMemberValue<TreeViewState>("state").scrollPos.y;
var opacity = ((scrollPos - minScrollPos) / (maxScrollPos - minScrollPos)).Clamp01(); var opacity = ((scrollPos - minScrollPos) / (maxScrollPos - minScrollPos)).Clamp01();

View File

@ -19,6 +19,10 @@ using static VFolders.VFolders;
using static VFolders.VFoldersData; using static VFolders.VFoldersData;
using static VFolders.VFoldersCache; using static VFolders.VFoldersCache;
#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#endif
namespace VFolders namespace VFolders

View File

@ -19,7 +19,10 @@ using static VFolders.VFolders;
using static VFolders.VFoldersData; using static VFolders.VFoldersData;
using static VFolders.VFoldersCache; using static VFolders.VFoldersCache;
#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#endif
namespace VFolders namespace VFolders
{ {

View File

@ -20,6 +20,10 @@ using static VFolders.VFoldersData;
using static VFolders.VFoldersCache; using static VFolders.VFoldersCache;
#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#endif
namespace VFolders namespace VFolders
{ {