Socket
This component belongs to the following package:
- com.yahaha.sdk.props
 
The Socket component allows specific items to be inserted into a designated position. It requires a collider for camera ray testing for accurate positioning.

Properties
- Interactive: Determines if the component is interactive. The component must be selected as an active plug-in in the Interactable component to function.
 - Action: The input action (or key) that triggers the interaction.
 - Hint: A brief text displayed on-screen to guide the player. Default: "Inspect".
 - Required Item: The name of the item (from item slots) that can be inserted into this socket. The item has an Item Behavior component attached.
 - Socket Position: The local position where the inserted item will be placed relative to the socket.
 - Socket Rotation: The local rotation applied to the inserted item relative to the socket when placed inside it.
 - Take Control: If enabled, the required item will be prevented from being interacted with, regardless of any Interactable components attached to it. Disabled by default.
 
Trigger
Events:
- com.yahaha.sdk.props.OnSocketInserted
- EventArgs:
 
 
Condition:
- CheckInteraction
- Description:
- Interact with prop, should call IsInteractice first
 
 - Returns:
- result: boolean whether or not the interaction is successful
 
 
 - Description:
 
Action:
- IsInteractive
- Returns:
- param: table interactionParam
 
 
 - Returns:
 - OnActive
- OnInactive
 - Enable
 - Description:
- Make the item interactive
 
 
 - Disable
- Description:
- Make the item non-interactive
 
 
 - Description:
 - MakeCollectable
- HasTarget
 - ControlTarget
 - ReleaseTarget
 - Insert
- Arguments:
- object: YahahaObject the object to insert, must have the Item Behavior component
 
 
 - Arguments:
 
 
Related components
This component must be used with Interactable, which enables player interaction with game objects.