SlickView
Super fast version of Unity's EditorGUILayout ScrollViews
Install / Use
/learn @david-paperseven/SlickViewREADME
SlickView
Unity Editor's built-in automatically laid out ScrollView GUI degrades in performance proportionally to how many elements are being scrolled through.
The Editor framerate becomes unusably poor with only a few hundred elements.
Typical Usage of the built in ScrollView
_scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition);
for (int i = 0; i < elementList.Count; i++)
{
EditorGUILayout.LabelField(elementList[i].name);
EditorGUILayout.IntField(i);
}
EditorGUILayout.EndScrollView();
Typical Performance of the built in ScrollView
| #Elements | Cost in ms | GC Alloc in MB | | -------------- | ---------- |----------------| | 100 | < 10 | < 1 | | 1,000 | 120 | 8 | | 1,000 | 450 | 28.4 | | 10,000 | 3600 | 233 |
Its a common use-case to want to scroll through hundreds or thousands of elements. For example an editor window to display all the textures in a game could easily require more than a thousand elements which is not practical with this ScrollView.
How does SlickView work?
Instead of iterating over the entire list of elements Slick view calculates which elements will be visible and only processes those. This means the performance stays constant regardless of how many elements are in the list.
Typical usage of SlickView
void OnEnable()
{
_slickViewLayout = new SlickViewLayout(totalRows, rowHeight, DrawElement);
}
void OnGUI()
{
_slickViewLayout.Draw(position, elementList.Capacity);
}
void DrawElement(Rect rect, int row)
{
EditorGUI.LabelField(rect,elementList[row].name);
rect.x += elementWidth;
EditorGUI.IntField(rect,row);
}
Typical Performance of SlickView
| #Elements | Cost in ms | GC Alloc in MB | | -------------- | ---------- |----------------| | 100 | < 10 | 0.1 | | 1,000 | < 10 | 0.1 | | 1,000 | < 10 | 0.1 | | 10,000 | < 10 | 0.1 |
|
|
|:--:|
| Screenshot of the demo window in SlickView with 10,000 textures |
To bring up this demo window select Slick View -> Open Demo Window
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
