itch.io is community of indie game creators and players

Devlogs

Controller Detection

Disavowed
A browser game made in HTML5

An ongoing issue that I've been struggling with has been with using a callback function for onDeviceChange. The callback function is very useful for determining when a controller is added or removed. Also, it's very useful for determining other states that controller connection status can be in. The current issue I'm having is that when changing scenes, it returns a callback error, which is something I've been spending a lot of time trying to figure out. I am technically subscribing to a Unity event, therefore, I should be able to unsubscribe from the same event, but my attempt at trying that has been unsuccessful. It seems that instead of using it as a struct, building out a custom callback function is going to be my best bet to solve this issue. I just need to do more research to determine if that's the right course of action.

Leave a comment