1.9.3: Added support for List<T>, when using SerializedProperty.GetValueType()
This commit is contained in:
parent
c87dd743f6
commit
a1ee1b5205
|
|
@ -443,6 +443,20 @@ namespace Module.Inspector.Editor
|
||||||
obj = arr[index];
|
obj = arr[index];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (objType.IsGenericType && objType.GetGenericTypeDefinition() == typeof(List<>))
|
||||||
|
{
|
||||||
|
if (path.Equals("Array"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
objType = objType.GetElementType();
|
||||||
|
|
||||||
|
if (path.StartsWith("data["))
|
||||||
|
{
|
||||||
|
int index = int.Parse(path.Substring(5, path.Length - 6));
|
||||||
|
var list = (IList)obj;
|
||||||
|
obj = list[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (objType == null)
|
if (objType == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "com.module.inspector",
|
"name": "com.module.inspector",
|
||||||
"version": "1.9.2",
|
"version": "1.9.3",
|
||||||
"displayName": "Module.Inspector",
|
"displayName": "Module.Inspector",
|
||||||
"description": "Custom inspector with various useful property drawers",
|
"description": "Custom inspector with various useful property drawers",
|
||||||
"unity": "2019.2",
|
"unity": "2019.2",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue