refactor
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Profiling;
|
||||
using UnityEngine.UIElements;
|
||||
using Logger = RebootKit.Engine.Foundation.Logger;
|
||||
@@ -12,18 +10,9 @@ namespace RebootKit.Engine.UI {
|
||||
[SerializeField] UIDocument m_Document;
|
||||
|
||||
void OnEnable() {
|
||||
s_logger.Debug("START");
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
public async UniTask Show(CancellationToken cancellationToken) {
|
||||
await UniTask.Yield(cancellationToken);
|
||||
}
|
||||
|
||||
public async UniTask Hide(CancellationToken cancellationToken) {
|
||||
await UniTask.Yield(cancellationToken);
|
||||
}
|
||||
|
||||
protected void Rebuild() {
|
||||
Profiler.BeginSample("UI Tree Build");
|
||||
VisualElement child = Build();
|
||||
@@ -34,5 +23,13 @@ namespace RebootKit.Engine.UI {
|
||||
}
|
||||
|
||||
public abstract VisualElement Build();
|
||||
public void Show() {
|
||||
}
|
||||
|
||||
public void Hide() {
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user