Forum rules - please read before posting.

Mobile browser touch event support

edited November 2020 in Technical Q&A
Hello there,

I’m thinking of purchasing the plugin but had a question regarding mobile browser support and touch events

It seems unity does not completely support WebGL on mobile, however the 2D AC demo appears to load fine in Safari on iOS 13 for me, but touch events do not work and the character can’t move or interact with objects.

My question: is it possible to get it working on the browser with touch events?

Many thanks!
Greg

Comments

  • edited November 2020

    Welcome to the community, @phoenixstudios.

    AC relies on Unity for input, so it's still bound by the restrictions/allowances that it provides.

    AC does have a "Touch Screen" input mode, which will cause it to listen to touch input when running as Build, however I'm not sure that would be applicable for WebGL.

    I may be wrong here, as this is down to Unity, but I suspect touch events are only available when an project is specifically built for mobile, i.e. iOS or Android platforms, not WebGL.

    AC does provide a means to create input overrides, allowing you to create new input methods - so you could feasibly plug in a custom input detection script and have it replace "regular" input checks.

    However, I wouldn't recommend building to a platform that Unity does not completely support - as there may well be other issues besides this one. If you're looking to build a project for iOS, I'd strongly advise working with the dedicated iOS build target that Unity does support.

  • Update: I think I stand corrected. WebGL on mobile devices does appear capable of receiving touch events.

    You can test a variant of AC's 2D Demo, specifically using Touch Screen input, here:

    https://adventurecreator.org/files/2DDemo/TS/WebGL/

    That said, I do still recommend caution when building to a platform not supported by Unity.

  • Hi Chris,

    Thank you very much for your response and putting together the demo.

    For me it seems not to work unfortunately.. I get the following message:

    ‘Your browser does not support any of the required graphics api for this content’

    Which is strange as the original graphics worked fine with the regular demo. Any ideas ?

    Thanks
  • edited December 2020

    It may be a duplicate of this error, involving Safari and WebGL.

    Give it another try - I've reverted to WebGL 1.0, which that thread suggests.

    Otherwise, I'm not sure what else to try. Though, I can confirm the error message itself isn't specifically referring to AC.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.