Class PropertyFetcherExtensions
Property fetcher extension class.
Inherited Members
Namespace: UnityEditor.Rendering
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
public static class PropertyFetcherExtensions
Methods
Find<TSource, TValue>(SerializedObject, Expression<Func<TSource, TValue>>)
Retrieves a SerializedProperty by using a lambda expression to reference its containing class and field.
Declaration
public static SerializedProperty Find<TSource, TValue>(this SerializedObject obj, Expression<Func<TSource, TValue>> expr)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedObject | obj | The SerializedObject being searched. |
| Expression<Func<TSource, TValue>> | expr | A lambda expression pointing to the field within the source class. |
Returns
| Type | Description |
|---|---|
| SerializedProperty | The corresponding SerializedProperty, or null if not found. |
Type Parameters
| Name | Description |
|---|---|
| TSource | The class type containing the field. |
| TValue | The field type. |
Find<TSource, TValue>(SerializedProperty, Expression<Func<TSource, TValue>>)
Retrieves a relative SerializedProperty based on a lambda expression pointing to a specific field within the source object.
Declaration
public static SerializedProperty Find<TSource, TValue>(this SerializedProperty obj, Expression<Func<TSource, TValue>> expr)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | obj | The instance of SerializedProperty to begin the search from. |
| Expression<Func<TSource, TValue>> | expr |
|
Returns
| Type | Description |
|---|---|
| SerializedProperty | The relative SerializedProperty if found; otherwise, null. |
Type Parameters
| Name | Description |
|---|---|
| TSource | The class type containing the field. |
| TValue | The field type. |