UnityToolbox
Brief documentation for all existing scripts.
 
Loading...
Searching...
No Matches
UnityToolbox.PlayerControls.RaycastDetection Class Referenceabstract

This script is used for interactions with objects with optional tooltips.

Inheritance diagram for UnityToolbox.PlayerControls.RaycastDetection:
UnityToolbox.PlayerControls.UI.StartDialogInteraction UnityToolbox.PlayerControls.UI.ToggleMenuInteraction

Public Member Functions

void Start ()
 
void Update ()
 
abstract void OnInteraction (RaycastHit raycastHit)
 Execute whatever should happen when the raycast found a valid object to interact with.
 
abstract void OnInteraction (RaycastHit2D raycastHit)
 Execute whatever should happen when the raycast found a valid object to interact with.
 
abstract void OnHit (RaycastHit raycastHit)
 Execute whatever should happen when the raycast found a valid object.
 
abstract void OnHit (RaycastHit2D raycastHit)
 Execute whatever should happen when the raycast found a valid object.
 

Protected Attributes

string _tooltip
 
string _appendedTooltip
 
string _interactActionName
 
Transform _raycastLocation
 
PlayerInput _input
 
bool _tooltipEnabled
 Whether the tooltip module should be used to display text.
 
bool _isBinding
 

Member Function Documentation

◆ OnHit() [1/2]

abstract void UnityToolbox.PlayerControls.RaycastDetection.OnHit ( RaycastHit  raycastHit)
pure virtual

◆ OnHit() [2/2]

abstract void UnityToolbox.PlayerControls.RaycastDetection.OnHit ( RaycastHit2D  raycastHit)
pure virtual

◆ OnInteraction() [1/2]

abstract void UnityToolbox.PlayerControls.RaycastDetection.OnInteraction ( RaycastHit  raycastHit)
pure virtual

◆ OnInteraction() [2/2]

abstract void UnityToolbox.PlayerControls.RaycastDetection.OnInteraction ( RaycastHit2D  raycastHit)
pure virtual

◆ Start()

void UnityToolbox.PlayerControls.RaycastDetection.Start ( )

◆ Update()

Member Data Documentation

◆ _appendedTooltip

string UnityToolbox.PlayerControls.RaycastDetection._appendedTooltip
protected

◆ _input

PlayerInput UnityToolbox.PlayerControls.RaycastDetection._input
protected

◆ _interactActionName

string UnityToolbox.PlayerControls.RaycastDetection._interactActionName
protected

◆ _isBinding

bool UnityToolbox.PlayerControls.RaycastDetection._isBinding
protected

◆ _raycastLocation

Transform UnityToolbox.PlayerControls.RaycastDetection._raycastLocation
protected

◆ _tooltip

string UnityToolbox.PlayerControls.RaycastDetection._tooltip
protected

◆ _tooltipEnabled

bool UnityToolbox.PlayerControls.RaycastDetection._tooltipEnabled
protected