mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-15 15:57:52 +08:00
Improved interaction with generic methods and some minor UI fixes
This commit is contained in:
@ -12,6 +12,13 @@ namespace Explorer
|
||||
public MethodInfo ToStringMethod => m_toStringMethod ?? GetToStringMethod();
|
||||
private MethodInfo m_toStringMethod;
|
||||
|
||||
public override void UpdateValue()
|
||||
{
|
||||
base.UpdateValue();
|
||||
|
||||
GetButtonLabel();
|
||||
}
|
||||
|
||||
public override void DrawValue(Rect window, float width)
|
||||
{
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
|
||||
@ -41,6 +48,8 @@ namespace Explorer
|
||||
|
||||
private string GetButtonLabel()
|
||||
{
|
||||
if (Value == null) return null;
|
||||
|
||||
string label = (string)ToStringMethod?.Invoke(Value, null) ?? Value.ToString();
|
||||
|
||||
var classColor = ValueType.IsAbstract && ValueType.IsSealed
|
||||
|
Reference in New Issue
Block a user