You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
821 B
29 lines
821 B
using Leopotam.Ecs;
|
|
using UnityEditor;
|
|
using UnityEditorInternal;
|
|
using UnityEngine;
|
|
|
|
namespace Asset_Cleaner {
|
|
class RequestRepaintEvt { }
|
|
|
|
class SysRepaintWindow : IEcsRunSystem, IEcsInitSystem {
|
|
EcsFilter<RequestRepaintEvt> Repaint = null;
|
|
|
|
public void Init() {
|
|
var wd = Globals<WindowData>.Value;
|
|
wd.SceneFoldout = new GUIContent(AssetPreview.GetMiniTypeThumbnail(typeof(SceneAsset)));
|
|
wd.ExpandScenes = true;
|
|
wd.ExpandFiles = true;
|
|
wd.ScrollPos = Vector2.zero;
|
|
}
|
|
|
|
public void Run() {
|
|
var wd = Globals<WindowData>.Value;
|
|
|
|
if (Repaint.IsEmpty()) return;
|
|
wd.Window.Repaint();
|
|
InternalEditorUtility.RepaintAllViews();
|
|
Repaint.AllDestroy();
|
|
}
|
|
}
|
|
}
|