mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 11:12:49 +08:00

* Using publicized mono assemblies * Remaking UI from scratch. Done the Scene Explorer so far.
28 lines
582 B
C#
28 lines
582 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
|
|
namespace UnityExplorer.UI.Models
|
|
{
|
|
public abstract class UIModel
|
|
{
|
|
public abstract GameObject UIRoot { get; }
|
|
|
|
public bool Visible
|
|
{
|
|
get => UIRoot?.activeInHierarchy ?? false;
|
|
set => UIRoot?.SetActive(value);
|
|
}
|
|
|
|
public abstract void ConstructUI(GameObject parent);
|
|
|
|
public virtual void Destroy()
|
|
{
|
|
if (UIRoot)
|
|
GameObject.Destroy(UIRoot);
|
|
}
|
|
}
|
|
}
|