blob: 43fd51c9748ec27b5999cbf68dbac177460221a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
namespace AdvancedInspector
{
public class GuidEditor : FieldEditor
{
public override Type[] EditedTypes
{
get { return new Type[] { typeof(Guid) }; }
}
public override void Draw(InspectorField field, GUIStyle style)
{
// GetValue returns null if multi-selection and different values
Guid id = field.GetValue<Guid>();
if (id == Guid.Empty)
GUILayout.Label("GUID: --------------");
else
GUILayout.Label("GUID: " + id.ToString());
}
}
}
|