TryGetProperty
Gets an IProperty on the specified container for the given PropertyPath.
Read time 2 minutesLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Properties
- Assembly: UnityEngine.PropertiesModule
TryGetProperty<T>(T, PropertyPath, IProperty)
Gets an IProperty on the specified container for the given PropertyPath.
public static bool TryGetProperty<TContainer>(TContainer container, in PropertyPath path, out IProperty property)
Parameters
The property path to resolve.
When this method returns, contains the property associated with the specified path, if the property is found; otherwise, null.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
While the container data is not actually read from or written to. The container itself is needed to resolve polymorphic fields and list elements.
TryGetProperty<T>(T, PropertyPath, IProperty)
Gets an IProperty on the specified container for the given PropertyPath.
public static bool TryGetProperty<TContainer>(ref TContainer container, in PropertyPath path, out IProperty property)
Parameters
The property path to resolve.
When this method returns, contains the property associated with the specified path, if the property is found; otherwise, null.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
While the container data is not actually read from or written to. The container itself is needed to resolve polymorphic fields and list elements.
TryGetProperty<T>(T, PropertyPath, IProperty, VisitReturnCode)
Gets an IProperty on the specified container for the given PropertyPath.
public static bool TryGetProperty<TContainer>(ref TContainer container, in PropertyPath path, out IProperty property, out VisitReturnCode returnCode)
Parameters
The property path to resolve.
When this method returns, contains the property associated with the specified path, if the property is found; otherwise, null.
When this method returns, contains the return code.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
While the container data is not actually read from or written to. The container itself is needed to resolve polymorphic fields and list elements.