1.9.3: Added support for List<T>, when using SerializedProperty.GetValueType()
This commit is contained in:
parent
c87dd743f6
commit
a1ee1b5205
2 changed files with 15 additions and 1 deletions
|
|
@ -443,6 +443,20 @@ namespace Module.Inspector.Editor
|
|||
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)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue