Added ScrollViewScope.

This commit is contained in:
max 2021-04-20 20:23:13 +02:00
parent c207d4887e
commit 14d7e7eb41

View File

@ -10,6 +10,7 @@ namespace TAO.SceneDebugViewer.Editor
public static List<ReplacementShaderSetupScriptableObject> options = new List<ReplacementShaderSetupScriptableObject>();
private GUIStyle optionsButtonStyle = null;
private Vector2 scrollPos;
[MenuItem("Window/Analysis/SceneDebugViewer")]
static void Init()
@ -37,6 +38,10 @@ namespace TAO.SceneDebugViewer.Editor
Load();
}
using (var scope = new GUILayout.ScrollViewScope(scrollPos, false, false))
{
scrollPos = scope.scrollPosition;
if (window.position.width <= 101)
{
// Compact grid.
@ -85,6 +90,7 @@ namespace TAO.SceneDebugViewer.Editor
}
}
}
}
private static void Load()
{