2020-10-28 07:14:00 +11:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2020-11-03 20:59:13 +11:00
|
|
|
|
using UnityExplorer.Helpers;
|
|
|
|
|
using UnityEngine;
|
2020-10-28 07:14:00 +11:00
|
|
|
|
|
2020-11-05 17:33:04 +11:00
|
|
|
|
namespace UnityExplorer.Inspectors
|
2020-10-28 07:14:00 +11:00
|
|
|
|
{
|
|
|
|
|
public class ReflectionInspector : InspectorBase
|
|
|
|
|
{
|
|
|
|
|
public override string TabLabel => m_targetTypeShortName;
|
|
|
|
|
|
2020-11-03 20:59:13 +11:00
|
|
|
|
private GameObject m_content;
|
|
|
|
|
public override GameObject Content
|
|
|
|
|
{
|
|
|
|
|
get => m_content;
|
|
|
|
|
set => m_content = value;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-28 07:14:00 +11:00
|
|
|
|
private readonly string m_targetTypeShortName;
|
|
|
|
|
|
|
|
|
|
public ReflectionInspector(object target) : base(target)
|
|
|
|
|
{
|
|
|
|
|
Type type = ReflectionHelpers.GetActualType(target);
|
|
|
|
|
|
|
|
|
|
if (type == null)
|
|
|
|
|
{
|
|
|
|
|
// TODO
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_targetTypeShortName = type.Name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|