API ReferenceecsdefineState()onEnter()On this pageonEnter() ecs.defineState(name).onEnter(callback) Description Set a callback to run when entering this state. Parameters PropertyTypeDescriptioncallbackfunctiona callback function to run before state enter