浏览代码

Fixing issue with showing fields from parent classes in randomizer tags

/h-i
Jon Hogins 4 年前
当前提交
066cedf3
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 13
      com.unity.perception/Editor/Randomization/Utilities/UIElementsEditorUtilities.cs

13
com.unity.perception/Editor/Randomization/Utilities/UIElementsEditorUtilities.cs


{
var propertyField = new PropertyField(iterator.Copy());
propertyField.Bind(iterator.serializedObject);
var originalField = parentPropertyType.GetField(iterator.name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance );
FieldInfo originalField;
do
{
originalField = parentPropertyType.GetField(iterator.name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance );
parentPropertyType = parentPropertyType.BaseType;
}
while (originalField == null && parentPropertyType != null) ;
if (originalField == null)
return null;
var tooltipAttribute = originalField.GetCustomAttributes(true)
.ToList().Find(att => att.GetType() == typeof(TooltipAttribute));
if (tooltipAttribute != null)

正在加载...
取消
保存