Component:CallbackRefArgument: Difference between revisions

From Resonite Wiki
add info for this
Automated: update Categories, SyncDelegates
Line 16: Line 16:
|Reference|'''A'''|TypeAdv0=true| The reference to give <code>Callback</code> when <code>Call()</code> or <code>CallAndDestroy()</code> is called.
|Reference|'''A'''|TypeAdv0=true| The reference to give <code>Callback</code> when <code>Call()</code> or <code>CallAndDestroy()</code> is called.
|Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;A&gt;}}|TypeAdv1=true| The [[Sync Delegate]] to call and provide <code>Reference</code> to.
|Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;A&gt;}}|TypeAdv1=true| The [[Sync Delegate]] to call and provide <code>Reference</code> to.
}}
== Sync Delegates ==
{{Table ComponentTriggers
|Call()|[[Type:Action|Action]]|
|CallAndDestroy()|[[Type:Action|Action]]|
}}
}}


Line 31: Line 37:
[[Category:Components{{#translation:}}|Callback Ref Argument`1]]
[[Category:Components{{#translation:}}|Callback Ref Argument`1]]
[[Category:Generic Components{{#translation:}}|Callback Ref Argument`1]]
[[Category:Generic Components{{#translation:}}|Callback Ref Argument`1]]
[[Category:ComponentStub]]
[[Category:Components:Uncategorized{{#translation:}}|Callback Ref Argument`1]]
[[Category:Components:Uncategorized{{#translation:}}|Callback Ref Argument`1]]

Revision as of 13:11, 6 November 2024


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
Callback Ref Argument component as seen in the Scene Inspector

Similar to CallbackValueArgument but instead of a value it's a reference for an action.

There are some Sync Delegates in the game that match this component's requirements, but not many.

Fields

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.
Reference A The reference to give Callback when Call() or CallAndDestroy() is called.
Callback Action`1<A> The Sync Delegate to call and provide Reference to.

Sync Delegates

Triggers
Name Arguments Description
Call() Action
CallAndDestroy() Action

Usage

Examples

Can be used to call a Action`1<T> (an action that takes a reference type) and give it Reference as an argument.

Related Components