2

How would I detect (or fire a function) if an object is deleted from the scene?

Jacob
  • 69
  • 14

1 Answers1

6

Using notifications

fn nodeDeletedCallback =
(
  deletedObj = callbacks.notificationParam()
  print ("Deleting: " + (deletedObj as string))
)

Callbacks.addscript #nodePreDelete "nodeDeletedCallback()" id:#id_AStringYouCanUseLaterToIdentifyThisCallback
FrozenKiwi
  • 1,362
  • 13
  • 26