mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 19:13:03 +08:00
refactor
This commit is contained in:
39
src/Inspectors/ReflectionInspector.cs
Normal file
39
src/Inspectors/ReflectionInspector.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityExplorer.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityExplorer.Inspectors
|
||||
{
|
||||
public class ReflectionInspector : InspectorBase
|
||||
{
|
||||
public override string TabLabel => m_targetTypeShortName;
|
||||
|
||||
private GameObject m_content;
|
||||
public override GameObject Content
|
||||
{
|
||||
get => m_content;
|
||||
set => m_content = value;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user