What’s the status of the new input system in WebGL builds these days?
All i could find was this old thread: New input system doesn't work in WebGL builds
Can’t seem to get it to work with the simplest of implementations.
This is what I’m trying to build with Unity 2019.3.10f1, InputSystem 1.0.0.preview7:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class cubemovernew : MonoBehaviour
{
private Keyboard kb;
private Gamepad pad;
public float speed = 2.0F;
// Start is called before the first frame update
void Start()
{
kb = Keyboard.current;
pad = Gamepad.current;
}
// Update is called once per frame
void Update() {
var x = transform.position.x;
if (kb != null) {
x += kb.dKey.ReadValue() * Time.deltaTime * speed;
x -= kb.aKey.ReadValue() * Time.deltaTime * speed;
}
if (pad != null) {
x += pad.leftStick.ReadValue().x * Time.deltaTime * speed;
}
transform.position = new Vector3(x, transform.position.y, transform.position.z);
}
}
The same thing works with the old input system, so it shouldn’t be a browser issue.