We are working on a game targeting phones and we’ve found on click event handlers are not firing as expected on some iOS devices. The button visually appears to be clicked but the handler does not appear to call the handler at all. Unfortunately this has only appeared on some user devices and not on our own devices and haven’t been able to capture the console. I’ve attached the handler which is setup in initialize on a script attached to the button itself. It has worked on 100% of windows and android devices but only on about 50% of iOS devices.
One device we saw this error on was an iPhone 12 running iOS 15.4.1.
Here is a link to our game Teach Quest
// initialize code called once per entity
StartButton.prototype.initialize = function() {
if (this.entity.button != undefined && this.sceneManager != undefined && this.sceneManager.script != undefined && this.sceneManager.script.sceneManager != undefined)
{
let self = this;
this.entity.button.on('click', () =>
{
self.entity.button.active = false;
self.startUI.enabled = false;
self.sceneManager.script.sceneManager.loadScene('Game');
}, this);
}
};