This isn't very often used by the user, since there aren't many [[Sync Delegate|Sync Delegates]] in the game that match this component's requirements.
This isn't very often used by the user, since there aren't many [[Sync Delegate|Sync Delegates]] in the game that match this component's requirements.
== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Value|'''A'''|TypeAdv0=true| The value to give <code>Callback</code> when <code>Call()</code> or <code>CallAndDestroy()</code> is called.
|Value|'''A'''|TypeAdv0=true| The value to give <code>Callback</code> when <code>Call()</code> or <code>CallAndDestroy()</code> is called.
|Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<A>}}|TypeAdv1=true| The [[Sync Delegate]] to call and get a value for.
|Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<A>}}|TypeAdv1=true| The [[Sync Delegate]] to call and send a value to.
}}
== Sync Delegates ==
{{Table ComponentTriggers
|Call:[[Type:Action|Action]]|[[Type:Action|Action]]|false| Call <code>Callback</code> sync delegate and provide it <code>Value</code>.
|CallAndDestroy:[[Type:Action|Action]]|[[Type:Action|Action]]|false| Do <code>Call()</code> and then destroy this component.
}}
}}
== Examples ==
== Examples ==
Can be used to call a {{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<A>}} (an action that takes a value type) and give it <code>Value</code> as an argument
Can be used to call a {{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<A>}} (an action that takes a value type) and give it <code>Value</code> as an argument.
For example, using [[Type:Float3|Float3]] as this component's callback type allows for calling [[Component:RandomObjectSpawner|RandomObjectSpawner SpawnAtPoint()]] and giving it <code>Value</code> as the position on where to spawn the random object.
[[Category:Components:Uncategorized{{#translation:}}|Callback Value Argument`1]]
[[Category:Components:Uncategorized{{#translation:}}|Callback Value Argument`1]]
[[Category:Components{{#translation:}}|Callback Value Argument`1]]
[[Category:Components{{#translation:}}|Callback Value Argument`1]]
[[Category:Generic Components{{#translation:}}|Callback Value Argument`1]]
[[Category:Generic Components{{#translation:}}|Callback Value Argument`1]]
Latest revision as of 06:30, 17 March 2025
Component image
Callback Value Argument`1 component as seen in the Scene Inspector
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
This isn't very often used by the user, since there aren't many Sync Delegates in the game that match this component's requirements.
Can be used to call a delegate of identityAction`1<A> (an action that takes a value type) and give it Value as an argument.
For example, using Float3 as this component's callback type allows for calling RandomObjectSpawner SpawnAtPoint() and giving it Value as the position on where to spawn the random object.