Utility methods to help interact with members and attributes.
More...
|
static object | GetMemberInfoFromPropertyPath< T > (object targetObject, string propertyPath) |
|
static bool | GetMethodInfoFromMethodName (object targetObject, string methodName, out MethodInfo member) |
|
static bool | GetMemberInfoFromMemberName< T > (Type targetObjectType, string memberName, out T member) |
|
static T | GetFirstAttribute< T > (IEnumerable< CustomAttribute > attributes) |
|
static IEnumerable< T > | GetAllAttributes< T > (object targetObject, bool inherit=true) |
|
static IEnumerable< T > | GetAllAttributes< T > (Type classType, bool inherit=true) |
| Retrieves a collection of custom attributes of a specified type T in a specific Class, and optionally inspects the ancestors of that member.
|
|
static IEnumerable< T > | GetMemberAttributes< T > (object targetObject, string propertyPath) |
|
static object | GetPropertyValue (IJson iJson, TypeAccessor accessor, PropertyInfo propertyInfo) |
|
static void | SetPropertyValue (IJson iJson, TypeAccessor accessor, PropertyInfo propertyInfo, object value) |
|
static TypeAccessor | GetTypeAccessor (Type type) |
|
static void | GetRequiredComponentTypes (ref List< Type > types, Type classType, bool includeCreateComponentAttribute=true) |
| Populate a list with the UnityEngine.RequireComponent && optionally DepictionEngine.CreateComponentAttribute attribute types found in a specific Class.
|
|
Utility methods to help interact with members and attributes.
◆ GetAllAttributes< T >() [1/2]
static IEnumerable< T > DepictionEngine.MemberUtility.GetAllAttributes< T > |
( |
object |
targetObject, |
|
|
bool |
inherit = true |
|
) |
| |
|
static |
◆ GetAllAttributes< T >() [2/2]
static IEnumerable< T > DepictionEngine.MemberUtility.GetAllAttributes< T > |
( |
Type |
classType, |
|
|
bool |
inherit = true |
|
) |
| |
|
static |
Retrieves a collection of custom attributes of a specified type T in a specific Class, and optionally inspects the ancestors of that member.
- Parameters
-
classType | The class type in which attributes should be found. |
inherit | true to inspect the ancestors of element; otherwise, false. |
- Returns
- A collection of the custom attributes that are applied to element and that match T, or an empty collection if no such attributes exist.
◆ GetFirstAttribute< T >()
static T DepictionEngine.MemberUtility.GetFirstAttribute< T > |
( |
IEnumerable< CustomAttribute > |
attributes | ) |
|
|
static |
◆ GetMemberAttributes< T >()
static IEnumerable< T > DepictionEngine.MemberUtility.GetMemberAttributes< T > |
( |
object |
targetObject, |
|
|
string |
propertyPath |
|
) |
| |
|
static |
◆ GetMemberInfoFromMemberName< T >()
static bool DepictionEngine.MemberUtility.GetMemberInfoFromMemberName< T > |
( |
Type |
targetObjectType, |
|
|
string |
memberName, |
|
|
out T |
member |
|
) |
| |
|
static |
◆ GetMemberInfoFromPropertyPath< T >()
static object DepictionEngine.MemberUtility.GetMemberInfoFromPropertyPath< T > |
( |
object |
targetObject, |
|
|
string |
propertyPath |
|
) |
| |
|
static |
◆ GetRequiredComponentTypes()
static void DepictionEngine.MemberUtility.GetRequiredComponentTypes |
( |
ref List< Type > |
types, |
|
|
Type |
classType, |
|
|
bool |
includeCreateComponentAttribute = true |
|
) |
| |
|
static |
Populate a list with the UnityEngine.RequireComponent && optionally DepictionEngine.CreateComponentAttribute attribute types found in a specific Class.
- Parameters
-
types | The reference to the list that will be populated. The list will be cleared first. |
classType | The class type in which attributes should be found. |
includeCreateComponentAttribute | true to include DepictionEngine.CreateComponentAttribute. |
- Returns
The documentation for this class was generated from the following file: