How to shutdown game?

Hello,

I am still getting familiar with the API but I cannot find any way to shutdown the application via Haxe. Can anyone point me in the right direction, so I can shutdown my game when the UI button is clicked.

Thanks.

You can do it by calling kha.System.stop();

Schedules the application to stop as soon as possible. This is not possible on all targets.

http://api.kha.tech/kha/System.html#stop

1 Like

Thank you, I’ll try this out later.

I actually thought this functionality would be in iron. I thought the idea behind iron was to hide the details of kha, maybe I misunderstood.

I actually thought this functionality would be in iron. I thought the idea behind iron was to hide the details of kha, maybe I misunderstood.

I think the idea behind iron is so that you don’t have to write a lot of code when starting a project. I see why that shutdown functionality probably wasn’t “interfaced” through iron since it’s one line of code.

1 Like