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.