Skip to content

Commit 47c1b4c

Browse files
authored
FIX: Fixed an issue where Stick Controls could not be created in Players built with medium or high code stripping level enabled. (#867)
1 parent ab70ecc commit 47c1b4c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ however, it has to be formatted properly to pass verification tests.
1212
### Fixed
1313

1414
-Will now close Input Action Asset Editor windows from previous sessions when the corresponding action was deleted.
15+
- Fixed an issue where Stick Controls could not be created in Players built with medium or high code stripping level enabled.
1516
- Fixed incorrect default state for axes on some controllers.
1617

1718
#### Actions

Packages/com.unity.inputsystem/InputSystem/Controls/StickControl.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,19 @@ public class StickControl : Vector2Control
7676
// Also puts AxisDeadzones on the axes.
7777
[InputControl(name = "x", minValue = -1f, maxValue = 1f, layout = "Axis", processors = "axisDeadzone")]
7878
[InputControl(name = "y", minValue = -1f, maxValue = 1f, layout = "Axis", processors = "axisDeadzone")]
79+
[Scripting.Preserve]
7980
public ButtonControl up { get; private set; }
8081

8182
[InputControl(useStateFrom = "y", processors = "axisDeadzone", parameters = "clamp=2,clampMin=-1,clampMax=0,invert", synthetic = true, displayName = "Down", shortDisplayName = "\u2193")]
83+
[Scripting.Preserve]
8284
public ButtonControl down { get; private set; }
8385

8486
[InputControl(useStateFrom = "x", processors = "axisDeadzone", parameters = "clamp=2,clampMin=-1,clampMax=0,invert", synthetic = true, displayName = "Left", shortDisplayName = "\u2190")]
87+
[Scripting.Preserve]
8588
public ButtonControl left { get; private set; }
8689

8790
[InputControl(useStateFrom = "x", processors = "axisDeadzone", parameters = "clamp=2,clampMin=0,clampMax=1", synthetic = true, displayName = "Right", shortDisplayName = "\u2192")]
91+
[Scripting.Preserve]
8892
public ButtonControl right { get; private set; }
8993

9094
protected override void FinishSetup()

0 commit comments

Comments
 (0)