Forum rules - please read before posting.

Arranging Puzzle Piece with input method touch for WebGL?

edited October 6 in Technical Q&A

Hello fellow AC'ers - hope everyone had a great summer!

Been having a blast using the Arranging Puzzle Piece package for various projects.
I'm doing a project for WebGL

I have two questions:
1. When changing the input method to touch and build and run for WebGL, its no longer possible to drag the puzzle pieces -
Is there a way to get this to work with input method touch for WebGL? (Mouse and keyboard input method works in webGL)

  1. The touch input method allows for a hotspot input mode "Touch down" that I need for my project.
    so i can fire of an AClist with a touch down /mouse down instead of having a mouse up/finger release.

Is it possible to to have a "mouse down" hotspot input for Keyboard and mouse input method?

Any direction would be much appreciated
Best, Dan

Comments

  • To be clear: you're testing on an Android or iPhone through a browser?

    What are your AC/Unity versions, and are you using Input System or Input Manager for input handling?

  • edited October 6

    Hi Chris.

    Ok, I realized I did a mistake.

    This is the case:

    I'm testing on iPad and IPhone through browser.
    I'm using Unity version 6.000.0.31f1and AC: 1.83.0
    I'm using the old input Manager (not the new Input System)
    WebGL player Settings: "Active input Handling"=Both

    Touch method is working with WebGL on ipad/iPhone.
    When opening the WebGL on PC, it obviously doesn't work.
    And when using the mouse/Keyboard input method it works perfectly on WebGL for PC but not iPad/Iphone.
    I will need to project to both run on Ipad/iphone and PC.

    How can I make it work on both platforms within the same WebGL build?

    Best
    Dan

  • You can use a simple custom script to alter the "Input Method" based on the Platform:

    using UnityEngine;
    using AC;
    
    public class DynamicInputMethod : MonoBehaviour
    {
    
        void Awake()
        {
    #if UNITY_ANDROID || UNITY_IOS
            KickStarter.settingsManager.inputMethod = InputMethod.TouchScreen;
    #else
            KickStarter.settingsManager.inputMethod = InputMethod.MouseAndKeyboard;
    #endif
        }
    
    }
    
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.