protected override void RetrieveGroupList() { GroupsAttribute groupsAttribute = AttributeHelper.GetAttribute <GroupsAttribute>(editorScript.GetType()); if (groupsAttribute != null) { groups = new Groups(groupsAttribute.groups); } else { groups = new Groups(new string[] { "" }); } }
private void RetrieveCustomClassGroup() { GroupsAttribute groupAttribute = AttributeHelper.GetAttribute <GroupsAttribute>(GetClassType()); if (groupAttribute != null) { groups = new Groups(groupAttribute.groups); } else { groups = new Groups(new string[] { "" }); } }
protected override void RetrieveGroupList() { GroupsAttribute groupAttribute = AttributeHelper.GetAttribute <GroupsAttribute>(entityInfo.fieldInfo.FieldType); if (groupAttribute != null) { groups = new Groups(groupAttribute.groups); } else { groups = new Groups(new string[] { "" }); } }
private void RetrieveObjectClassGroup() { IEnumerable <Type> collection = Utils.FindSubClassesOf <EasyEditorBase>(); foreach (Type editorScript in collection) { CustomEditor customEditorAttribute = AttributeHelper.GetAttribute <CustomEditor>(editorScript); if (customEditorAttribute != null) { Type inspectedType = typeof(CustomEditor). GetField("m_InspectedType", BindingFlags.NonPublic | BindingFlags.Instance). GetValue(customEditorAttribute) as Type; bool editorForChildClasses = (bool)typeof(CustomEditor). GetField("m_EditorForChildClasses", BindingFlags.NonPublic | BindingFlags.Instance). GetValue(customEditorAttribute); if (GetClassType() == inspectedType || (inspectedType.IsAssignableFrom(GetClassType()) && editorForChildClasses)) { GroupsAttribute groupAttribute = AttributeHelper.GetAttribute <GroupsAttribute>(editorScript); if (groupAttribute != null) { groups = new Groups(groupAttribute.groups); } else { groups = new Groups(new string[] { "" }); } break; } } } if (groups == null) { groups = new Groups(new string[] { "" }); } }