Update Cryville.Input.
This commit is contained in:
@@ -97,11 +97,7 @@ namespace Cryville.Input.Unity {
|
|||||||
useGUILayout = false;
|
useGUILayout = false;
|
||||||
}
|
}
|
||||||
void Update() {
|
void Update() {
|
||||||
double time = Time.realtimeSinceStartupAsDouble;
|
Batch(Time.realtimeSinceStartupAsDouble);
|
||||||
foreach (var k in ActiveKeys) {
|
|
||||||
Feed(k, 0, new InputFrame(time, new InputVector()));
|
|
||||||
}
|
|
||||||
Batch(time);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,9 +14,11 @@ namespace Cryville.Input.Unity {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="NotSupportedException">Unity touch is not supported on the current device.</exception>
|
/// <exception cref="NotSupportedException">Unity touch is not supported on the current device.</exception>
|
||||||
public UnityTouchHandler() {
|
public UnityTouchHandler() {
|
||||||
|
#if !UNITY_EDITOR // In the simulator, touch works but `touchSupported` returns false (by 2021.3)
|
||||||
if (!unity::Input.touchSupported) {
|
if (!unity::Input.touchSupported) {
|
||||||
throw new NotSupportedException("Unity touch is not supported on this device");
|
throw new NotSupportedException("Unity touch is not supported on this device");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user