add more info, fix table |
Automated: update Fields, Categories |
||
Line 15: | Line 15: | ||
|FrameAnimSpeed|Float|how fast the frame should fit to the asset's bounding box in seconds | |FrameAnimSpeed|Float|how fast the frame should fit to the asset's bounding box in seconds | ||
|SnapAnimTime|Float| How long the animation should be for the asset going into the frame when snapped in seconds. | |SnapAnimTime|Float| How long the animation should be for the asset going into the frame when snapped in seconds. | ||
|Targets|SyncList`1| | |Targets|{{RootFieldType|SyncList`1|[[Type:SyncRef`1|SyncRef`1]]<[[Type:SyncRef`1|SyncRef`1]]<[[Type:IAssetProvider`1|IAssetProvider`1]]<A>>>}}|TypeAdv3=true| The items to drive with the snapped object's asset. | ||
|Callback| | |Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<[[Type:IAssetProvider`1|IAssetProvider`1]]<A>>}}|TypeAdv4=true| A sync delegate that takes an argument of the chosen asset type for this component. The sync delegate is called when the asset is snapped. | ||
|_current|Slot| The slot of the asset item inside of the frame. | |_current|Slot| The slot of the asset item inside of the frame. | ||
|_currentRatio|Float2| The ratio of the asset's bounding box held in the frame | |_currentRatio|Float2| The ratio of the asset's bounding box held in the frame | ||
|_frameSize| | |_frameSize|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv7=true| The field to drive with what the size of the frame should be for the held asset's bounding box. | ||
|_collider|BoxCollider| The collider to drive the values of the size of the held asset's bounding box. | |_collider|'''[[Component:BoxCollider|BoxCollider]]'''|TypeAdv8=true| The collider to drive the values of the size of the held asset's bounding box. | ||
}} | }} | ||
Line 36: | Line 36: | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Asset Frame Slot`1]] | [[Category:Components{{#translation:}}|Asset Frame Slot`1]] | ||
[[Category:Generic Components{{#translation:}}|Asset Frame Slot`1]] | |||
[[Category:Components:Transform:Interaction{{#translation:}}|Asset Frame Slot`1]] | [[Category:Components:Transform:Interaction{{#translation:}}|Asset Frame Slot`1]] |
Latest revision as of 21:33, 3 March 2024
Component image
An asset frame slot is a component that takes any Asset Type as an attach component type argument, and allows for snapping assets to a frame. The asset in the frame can be used as a source to drive a list of asset fields which is defined in Targets. Optionally it calls a sync delegate that takes an argument of the chosen asset type for this component.
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. |
FrameSize
|
Float | how thick the frame should be. |
FrameAnimSpeed
|
Float | how fast the frame should fit to the asset's bounding box in seconds |
SnapAnimTime
|
Float | How long the animation should be for the asset going into the frame when snapped in seconds. |
Targets
|
list of SyncRef`1<SyncRef`1<IAssetProvider`1<A>>> | The items to drive with the snapped object's asset. |
Callback
|
Action`1<IAssetProvider`1<A>> | A sync delegate that takes an argument of the chosen asset type for this component. The sync delegate is called when the asset is snapped. |
_current
|
Slot | The slot of the asset item inside of the frame. |
_currentRatio
|
Float2 | The ratio of the asset's bounding box held in the frame |
_frameSize
|
field drive of Float2 | The field to drive with what the size of the frame should be for the held asset's bounding box. |
_collider
|
BoxCollider | The collider to drive the values of the size of the held asset's bounding box. |
Usage
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.