Class ReflectionHelpers
An ad-hoc collection of helpers for reflection, used by Cinemachine or its editor tools in various places
상속된 멤버
네임스페이스: Cinemachine.Utility
어셈블리: solution.dll
구문
[DocumentationSorting(DocumentationSortingAttribute.Level.Undoc)]
public static class ReflectionHelpers
메서드
이름 | 설명 |
---|---|
AccessInternalField<T>(Type, object, string) | Cheater extension to access internal field of an object |
CopyFields(object, object, BindingFlags) | Copy the fields from one object to another |
GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>>) | Returns a string path from an expression - mostly used to retrieve serialized properties without hardcoding the field path. Safer, and allows for proper refactoring. |
GetParentObject(string, object) | Get the object owner of a field. This method processes the '.' separator to get from the object that owns the compound field to the object that owns the leaf field |
GetTypeInAllDependentAssemblies(string) | Get a type from a name |
GetTypesInAllDependentAssemblies(Predicate<Type>) | Search all assemblies for all types that match a predicate |
GetTypesInAssembly(Assembly, Predicate<Type>) | Search the assembly for all types that match a predicate |