API ReferenceecsdefineState()onExit()Sur cette pageonExit() ecs.defineState(name).onExit(callback) Description Set a callback to run when exiting this state. Parameters PropertyTypeDescriptioncallbackfunctiona callback function to run before state exiting