Class ResolveAttribute
- Namespace
- JLChnToZ.VRC.Foundation
Mark a field to be auto resolved from a path on build time.
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class ResolveAttribute : PropertyAttribute
- Inheritance
-
ResolveAttribute
- Extension Methods
Remarks
When multiple ResolveAttribute are used on the same field, it will recursively resolve the field from the path until it reaches the last one. If this attribute applied to properties in class with IUdonAdaptor interface, it will also set the resolved result to the variable on the target udon behaviour.
Constructors
ResolveAttribute(string)
Mark a field to be auto resolved from a path on build time.
public ResolveAttribute(string source)
Parameters
sourcestringThe path to resolve the field from.
Remarks
It supports glob-like path and dot chaining. For example, /Some Root/**/Some Object#someProp.prop2 will resolve
the someProp from the first object named Some Object in the hierarchy under Some Root, then resolve prop2 from it.
Properties
HideInInspectorIfResolvable
Should hide the field in the inspector if it is resolvable, that is, the source object is found.
public bool HideInInspectorIfResolvable { get; set; }
Property Value
NullOnly
Should ignore the field if it is already assigned.
Default is true.
public bool NullOnly { get; set; }
Property Value
Source
The path to resolve the field from.
public string Source { get; }
Property Value
SourceType
The type of the source object. It is required when multiple ResolveAttribute are used on the same field.
public Type SourceType { get; set; }