Component:SlotGizmo: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|Name=Slot Gizmo
|Name=Slot Gizmo
}}
}}
{{stub}}
The '''SlotGizmo''' is used with the [[Dev tool]] to interact with slots when they are selected and their sub gizmos. This is rarely interacted directly with by the user, but is a very important component for interacting with the game.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|GizmoReplaced|{{RootFieldType|SyncDelegate`1|[[#SlotGizmoReplacement|SlotGizmoReplacement]]}}|TypeAdv0=true|
|GizmoReplaced|{{RootFieldType|SyncDelegate`1|[[#SlotGizmoReplacement|SlotGizmo.SlotGizmoReplacement]]}}|TypeAdv0=true| A sync delegate to call when the gizmo is replaced with another one. Usually located on the dev tool that created the gizmo.
|_isFolded|Bool|
|_isFolded|Bool| Whether the gizmo is folded up.
|_activeGizmo|Worker|
|_activeGizmo|Worker| Which gizmo is being shown right now via tool options.
|_targetSlot|{{RootFieldType|TransformRelayRef}}|TypeAdv3=true|
|_targetSlot|{{RootFieldType|TransformRelayRef}}|TypeAdv3=true| The slot this is affecting.
|_positionDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv4=true|
|_positionDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv4=true| The field to drive position with for this visual.
|_scaleDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv5=true|
|_scaleDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv5=true| The field to drive scale with for this visual.
|_boundsMesh|{{RootFieldType|DriveRef`1|[[Component:TubeBoxMesh|TubeBoxMesh]]}}|TypeAdv6=true|
|_boundsMesh|{{RootFieldType|DriveRef`1|[[Component:TubeBoxMesh|TubeBoxMesh]]}}|TypeAdv6=true| The mesh to use to show bounds.
|_boundsRoot|Slot|
|_boundsRoot|Slot| The slot to make bounds for.
|_boundsRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv8=true|
|_boundsRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv8=true| the field to drive for the bounds rotation.
|_boundsOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv9=true|
|_boundsOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv9=true| The field to drive for bounds offset.
|_boundsActive|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv10=true|
|_boundsActive|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv10=true| The field to drive with whether the bounds are active or not.
|_nameText|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv11=true|
|_nameText|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv11=true| The field to drive with the name of the target slot.
|_nameOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv12=true|
|_nameOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv12=true| The position offset field for the visual of the name of targeted slot.
|_nameRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv13=true|
|_nameRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv13=true| The rotation field for the visual of the name of targeted slot.
|_nameActive|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv14=true|
|_nameActive|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv14=true| The active field for the visual of the name of targeted slot.
|_xPosSegment|{{RootFieldType|DriveRef`1|[[Component:SegmentMesh|SegmentMesh]]}}|TypeAdv15=true|
|_xPosSegment|{{RootFieldType|DriveRef`1|[[Component:SegmentMesh|SegmentMesh]]}}|TypeAdv15=true| The segment used for the X position vs this slot's parent slot.
|_yPosSegment|{{RootFieldType|DriveRef`1|[[Component:SegmentMesh|SegmentMesh]]}}|TypeAdv16=true|
|_yPosSegment|{{RootFieldType|DriveRef`1|[[Component:SegmentMesh|SegmentMesh]]}}|TypeAdv16=true| The segment used for the Y position vs this slot's parent slot.
|_zPosSegment|{{RootFieldType|DriveRef`1|[[Component:SegmentMesh|SegmentMesh]]}}|TypeAdv17=true|
|_zPosSegment|{{RootFieldType|DriveRef`1|[[Component:SegmentMesh|SegmentMesh]]}}|TypeAdv17=true| The segment used for the Z position vs this slot's parent slot.
|_boundsAnchorPositions|{{RootFieldType|SyncList`1|[[#AnchorInfo|AnchorInfo]]}}|TypeAdv18=true|
|_boundsAnchorPositions|{{RootFieldType|SyncList`1|[[#AnchorInfo|SlotGizmo.AnchorInfo]]}}|TypeAdv18=true| A list of infos for anchors this slot gizmo has.
|_rootAnchor|'''[[Component:PointAnchor|PointAnchor]]'''|TypeAdv19=true|
|_rootAnchor|'''[[Component:PointAnchor|PointAnchor]]'''|TypeAdv19=true| The root point anchor for this gizmo.
|_translationGizmo|'''[[Component:TranslationGizmo|TranslationGizmo]]'''|TypeAdv20=true|
|_translationGizmo|'''[[Component:TranslationGizmo|TranslationGizmo]]'''|TypeAdv20=true| The gizmo used for changing this slot's position.
|_rotationGizmo|'''[[Component:RotationGizmo|RotationGizmo]]'''|TypeAdv21=true|
|_rotationGizmo|'''[[Component:RotationGizmo|RotationGizmo]]'''|TypeAdv21=true| The gizmo used for changing this slot's rotation.
|_scaleGizmo|'''[[Component:ScaleGizmo|ScaleGizmo]]'''|TypeAdv22=true|
|_scaleGizmo|'''[[Component:ScaleGizmo|ScaleGizmo]]'''|TypeAdv22=true| The gizmo used for changing this slot's scale.
|IsLocalSpace|Bool|
|IsLocalSpace|Bool| Whether this gizmo is oriented to local space or not.
}}
}}


== Behavior ==
== SlotGizmoReplacement ==
[[Sync Delegate]] of identity [[Type:Func`2|Func`2]]<[[Component:SlotGizmo|SlotGizmo]], [[Component:SlotGizmo|SlotGizmo]]> for replacing the old gimzo (argument 1) with a new one.
 
== AnchorInfo ==
{{Table TypeFields
|anchor|'''[[Component:PointAnchor|PointAnchor]]'''|TypeAdv0=true| The point anchor to snap to for other gizmos.
|posDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv1=true| The position to drive for this point anchor.
|scaleDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv2=true| The scale to drive for this point anchor.
}}
 
== Usage ==


== Examples ==
== Examples ==
Line 42: Line 52:
[[Category:Components{{#translation:}}|Slot Gizmo]]
[[Category:Components{{#translation:}}|Slot Gizmo]]
[[Category:Components With Nested Types{{#translation:}}|Slot Gizmo]]
[[Category:Components With Nested Types{{#translation:}}|Slot Gizmo]]
[[Category:ComponentStubs]]

Latest revision as of 00:04, 3 August 2025

Component image 
Slot Gizmo component as seen in the Scene Inspector

The SlotGizmo is used with the Dev tool to interact with slots when they are selected and their sub gizmos. This is rarely interacted directly with by the user, but is a very important component for interacting with the game.

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. Some components stop their functionality when this field is disabled, but some don't.
GizmoReplaced delegate of identity SlotGizmo.SlotGizmoReplacement A sync delegate to call when the gizmo is replaced with another one. Usually located on the dev tool that created the gizmo.
_isFolded Bool Whether the gizmo is folded up.
_activeGizmo Worker Which gizmo is being shown right now via tool options.
_targetSlot direct TransformRelayRef The slot this is affecting.
_positionDrive field drive of Float3 The field to drive position with for this visual.
_scaleDrive field drive of Float3 The field to drive scale with for this visual.
_boundsMesh reference drive of TubeBoxMesh The mesh to use to show bounds.
_boundsRoot Slot The slot to make bounds for.
_boundsRotation field drive of FloatQ the field to drive for the bounds rotation.
_boundsOffset field drive of Float3 The field to drive for bounds offset.
_boundsActive field drive of Bool The field to drive with whether the bounds are active or not.
_nameText field drive of String The field to drive with the name of the target slot.
_nameOffset field drive of Float3 The position offset field for the visual of the name of targeted slot.
_nameRotation field drive of FloatQ The rotation field for the visual of the name of targeted slot.
_nameActive field drive of Bool The active field for the visual of the name of targeted slot.
_xPosSegment reference drive of SegmentMesh The segment used for the X position vs this slot's parent slot.
_yPosSegment reference drive of SegmentMesh The segment used for the Y position vs this slot's parent slot.
_zPosSegment reference drive of SegmentMesh The segment used for the Z position vs this slot's parent slot.
_boundsAnchorPositions list of SlotGizmo.AnchorInfo A list of infos for anchors this slot gizmo has.
_rootAnchor PointAnchor The root point anchor for this gizmo.
_translationGizmo TranslationGizmo The gizmo used for changing this slot's position.
_rotationGizmo RotationGizmo The gizmo used for changing this slot's rotation.
_scaleGizmo ScaleGizmo The gizmo used for changing this slot's scale.
IsLocalSpace Bool Whether this gizmo is oriented to local space or not.

SlotGizmoReplacement

Sync Delegate of identity Func`2<SlotGizmo, SlotGizmo> for replacing the old gimzo (argument 1) with a new one.

AnchorInfo

Fields
Name Type Description
anchor PointAnchor The point anchor to snap to for other gizmos.
posDrive field drive of Float3 The position to drive for this point anchor.
scaleDrive field drive of Float3 The scale to drive for this point anchor.

Usage

Examples

See Also