(3 intermediate revisions by the same user not shown)
Line 3:
Line 3:
|Name=Reference Spatial Variable Collector`1
|Name=Reference Spatial Variable Collector`1
}}
}}
The '''Reference Spatial Variable Collector`1''' component
The '''Reference Spatial Variable Collector`1''' component is specifically for reference types This drives a list of references, filling it with all the found spatial variables. It does this by reading all spatial variables of the reference type matching this one, and in range, and puts them into the referenced list.
|ReferenceList|{{RootFieldType|DriveRef`1|[[Type:SyncRefList`1|SyncRefList`1]]<T>}}|TypeAdv0=true| The list to populate with the spatial variables of all spatial fields intersecting the point that is the slot this component is on.
|VariableName|String|
|VariableName|String| The variable to sample for.
|DefaultTarget|'''T'''|TypeAdv2=true|
|DefaultTarget|'''T'''|TypeAdv2=true| The value to default to when no references can be sampled at all.
}}
}}
== Usage ==
== Usage ==
Attach to a slot which will be used as the point to sample from. give a target list to drive, and the list will populate with found values
== Examples ==
== Examples ==
This can be used to collect slots and put them into a list of bones on a mesh, or to apply audio effects to [[Component:AudioListener]]s.
Reference Spatial Variable Collector`1 component as seen in the Scene Inspector
The Reference Spatial Variable Collector`1 component is specifically for reference types This drives a list of references, filling it with all the found spatial variables. It does this by reading all spatial variables of the reference type matching this one, and in range, and puts them into the referenced list.