Register an event that runs when an object with the provided tag stops using a component.
param tag- The tag to match, only called for objects with a matching tag.
param action- The function that runs when the event happens.
// This will run when the tagged object removes a component.
onUnuse("ghost", (obj, compId) => {
debug.log(obj, component);
});
returns The event controller.
since v2000.0
group Events