Skip to content

Commit bb329a3

Browse files
authored
Merge pull request #94 from ExtendRealityLtd/feat/ifdefs
feat(state): add ifdefs to determine whether input manager is enabled
2 parents 691c1a5 + b375e53 commit bb329a3

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

Runtime/SharedResources/Scripts/UnityInputManagerAxis1DAction.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ public float Multiplier
4747
/// <inheritdoc />
4848
public void Process()
4949
{
50+
#if ENABLE_LEGACY_INPUT_MANAGER
5051
Receive(Input.GetAxis(AxisName) * Multiplier);
52+
#else
53+
Debug.LogWarning("The Legacy Unity Input Manager is disabled in the player settings.");
54+
#endif
5155
}
5256
}
5357
}

Runtime/SharedResources/Scripts/UnityInputManagerAxis2DAction.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ public float YMultiplier
8181
/// <inheritdoc />
8282
public void Process()
8383
{
84+
#if ENABLE_LEGACY_INPUT_MANAGER
8485
Receive(new Vector2(Input.GetAxis(XAxisName) * XMultiplier, Input.GetAxis(YAxisName) * YMultiplier));
86+
#else
87+
Debug.LogWarning("The Legacy Unity Input Manager is disabled in the player settings.");
88+
#endif
8589
}
8690
}
8791
}

Runtime/SharedResources/Scripts/UnityInputManagerButtonAction.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ public KeyCode KeyCode
3030
/// <inheritdoc />
3131
public void Process()
3232
{
33+
#if ENABLE_LEGACY_INPUT_MANAGER
3334
Receive(Input.GetKey(KeyCode));
35+
#else
36+
Debug.LogWarning("The Legacy Unity Input Manager is disabled in the player settings.");
37+
#endif
3438
}
3539
}
3640
}

0 commit comments

Comments
 (0)