Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Built-In Functions
  5. onDestroy

onDestroy

Platform Compatibility

PC Mac OSX Oculus Quest
X X X

onDestroy triggers when the object is about to be deleted

Example:

1
2
3
function onDestroy()
    obj.sendGlobalMessage("I have been destroyed")
end
Tags
Was this article helpful to you? Yes No

How can we help?