-
Notifications
You must be signed in to change notification settings - Fork 1
Script function events
SDraw edited this page Apr 11, 2024
·
11 revisions
Those are script events that are called at runtime.
function Start()
function Update()
function LateUpdate()
function FixedUpdate()
function OnEnable()
function OnDisable()
function OnDestroy()
function OnCollisionEnter(Collision col)
function OnCollisionExit(Collision col)
function OnCollisionStay(Collision col)
-
function OnTriggerEnter(Collider col, bool internal)
:internal
shows ifCollider
is internal game component. -
function OnTriggerExit(Collider col, bool internal)
:internal
shows ifCollider
is internal game component. -
function OnTriggerStay(Collider col, bool internal)
:internal
shows ifCollider
is internal game component. function OnAnimatorIK(int layer)
-
function OnMessage(...)
: message called by another script viaLuaScript:SendMessage
method; arguments count is variable. -
function OnInteractableGrab()
: called when attachedCVRInteractable
is grabbed; no parameters. -
function OnInteractableDrop()
: called when attachedCVRInteractable
is dropped; no parameters. -
function OnInteractableUp()
: called when attachedCVRInteractable
is clicked; no parameters. -
function OnInteractableDown()
: called when attachedCVRInteractable
is unclicked; no parameters. -
function OnInteractableHoverEnter()
: called when attachedCVRInteractable
gaze is started; no parameters. -
function OnInteractableHoverExit()
: called when attachedCVRInteractable
gaze is stopped; no parameters. -
function OnEnterSeat()
: called when local player sits onCVRInteractable
that is configured as seat. -
function OnExitSeat()
: called when local player leavesCVRInteractable
that is configured as seat. -
function OnPlayerJoin(Player player)
: called when remote player has joined.- Note: No call if remote player is blocked by local player.
-
function OnPlayerExit(Player player)
: called when remote player has left.- Note: No call if remote player is blocked by local player.
-
function OnButtonClick()
: called when attachedUI.Button
is clicked. -
function OnToggleChange(bool state)
: called when attachedUI.Toggle
is toggled. -
function OnSliderChange(float newValue)
: called when attachedUI.Slider
is slided.
function Start()
Log("I'm working, yay!")
end