Class ReflectionHelpers
An ad-hoc collection of helpers for reflection, used by Cinemachine or its editor tools in various places
Inherited Members
Namespace: Cinemachine.Utility
Assembly: solution.dll
Syntax
[DocumentationSorting(DocumentationSortingAttribute.Level.Undoc)]
public static class ReflectionHelpers
Methods
| Name | Description |
|---|---|
| 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 |