Component:CallbackValueArgument: Difference between revisions

From Resonite Wiki
Automated: update Categories, SyncDelegates
Add Sync delegate info
 
(One intermediate revision by the same user not shown)
Line 14: Line 14:
== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|Call()|[[Type:Action|Action]]|
|Call()|[[Type:Action|Action]]| Call <code>Callback</code> sync delegate and provide it <code>Value</code>.
|CallAndDestroy()|[[Type:Action|Action]]|
|CallAndDestroy()|[[Type:Action|Action]]| Do <code>Call()</code> and then destroy this component.
}}
}}


Line 23: Line 23:


== See Also ==
== See Also ==
* [[Component:CallbackRefArgument|CallbackRefArgument]]


[[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:ComponentStub]]
[[Category:Generic Components{{#translation:}}|Callback Value Argument`1]]
[[Category:Generic Components{{#translation:}}|Callback Value Argument`1]]

Latest revision as of 16:37, 7 November 2024

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.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
Value A The value to give Callback when Call() or CallAndDestroy() is called.
Callback Action`1<A> The Sync Delegate to call and send a value to.

Sync Delegates

Triggers
Method Name Method type and Arguments. Description
Call() Action Call Callback sync delegate and provide it Value.
CallAndDestroy() Action Do Call() and then destroy this component.

Examples

Can be used to call a Action`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.

See Also