I've made a test project to test the new Input system pointers (touch and mouse), in the editor, everything works perfectly however when I build the game they don't. it's like there is not an input system. I'm not sure if I'm missing a setting or something.
I've made simple sean where the Ui displays the available devices, whether they're enabled or not, and if a touch or mouse click detected it will display general information about it.
this is how it works in the editor:
And this is the android version, note that button press still works:
I did not record the PC standalone version but it still does not respond.
this is the link to the build:
https://github.com/Venay/Input_test
this is the code I used and couple of screenshots of my settings:
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.InputSystem;
namespace Testing.InputDebugger
{
public class InputDebugger : MonoBehaviour
{
PointerInput pointerInput;
public Text inputText;
public Text deviceText;
public Text buttonText;
private void Awake()
{
pointerInput = new PointerInput();
pointerInput.General.Pointer.performed += ctx => OnPointer(ctx.ReadValue<myCompositData>());
pointerInput.General.Pointer.canceled += ctx => OnPointer(ctx.ReadValue<myCompositData>());
string text = "";
foreach (var S in InputSystem.devices)
{
text += S.device + " : " + S.enabled + " \n";
}
deviceText.text = text;
}
private void OnEnable() => pointerInput.Enable();
private void OnDisable() => pointerInput.Disable();
public void OnPointer(myCompositData data)
{
string n = "\n";
string Press = "Press: " + data.Press.ToString() + n;
string PressCount = "Press Count: " + data.PressCount + n;
string Position = "Position: " + data.Position + n;
string Delta = "Delta: " + data.Delta + n;
string Radius = "Radius: " + data.Radius + n;
string Tap = "Tap: " + data.Tap + n;
string StartPosition = "Start Position: " + data.StartPosition + n;
string StartTime = "Start Time: " + data.StartTime + n;
string Scroll = "Scroll: " + data.Scroll + n;
inputText.text = Time.time + n + Press + PressCount + Position + Delta + Radius + n + Tap + StartPosition + StartTime + n + Scroll;
}
public void OnButtonPress() => buttonText.text = "Pressed at:\n" + Time.time;
}
}