mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
Fix null-coalescing operators in the C# console crashing the game
This commit is contained in:
31
src/UI/Main/Inspectors/ReflectionInspector.cs
Normal file
31
src/UI/Main/Inspectors/ReflectionInspector.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ExplorerBeta.Helpers;
|
||||
|
||||
namespace ExplorerBeta.UI.Main.Inspectors
|
||||
{
|
||||
public class ReflectionInspector : InspectorBase
|
||||
{
|
||||
public override string TabLabel => m_targetTypeShortName;
|
||||
|
||||
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