Files
UnityExplorer_Fix/src/UI/Model/UIModel.cs
Sinai 7eb4b1bc77 WIP
* Using publicized mono assemblies
* Remaking UI from scratch. Done the Scene Explorer so far.
2021-04-15 20:18:03 +10:00

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);
}
}
}