* Using publicized mono assemblies
* Remaking UI from scratch. Done the Scene Explorer so far.
This commit is contained in:
Sinai
2021-04-15 20:18:03 +10:00
parent a6c24f91e4
commit 7eb4b1bc77
84 changed files with 1819 additions and 9082 deletions

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace UnityExplorer.UI.Widgets
{
public class CachedTransform
{
public Transform RefTransform { get; }
public CachedTransform Parent { get; internal set; }
public string Name { get; internal set; }
public int ChildCount { get; internal set; }
public int Depth { get; internal set; }
public bool Expanded { get; set; }
public CachedTransform(Transform transform, CachedTransform parent = null)
{
RefTransform = transform;
Expanded = false;
Parent = parent;
Update();
}
public void Update()
{
Name = RefTransform.name;
ChildCount = RefTransform.childCount;
Depth = Parent?.Depth + 1 ?? 0;
}
}
}