API ReferenceecsdefineState()onExit()En esta páginaonExit() ecs.defineState(name).onExit(callback) Description Set a callback to run when exiting this state. Parameters PropertyTypeDescriptioncallbackfunctiona callback function to run before state exiting