private UnityEngine.InputSystem.Controls.AxisControl Initialize_ctrlMousedeltaleft(InternedString kAxisLayout, InputControl parent) { var ctrlMousedeltaleft = new UnityEngine.InputSystem.Controls.AxisControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMin = -3.402823E+38f, invert = true }; ctrlMousedeltaleft.Setup() .At(this, 17) .WithParent(parent) .WithName("left") .WithDisplayName("Delta Left") .WithShortDisplayName("Delta Left") .WithLayout(kAxisLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 8, bitOffset = 0, sizeInBits = 32 }) .Finish(); return(ctrlMousedeltaleft); }
private UnityEngine.InputSystem.Controls.AxisControl Initialize_ctrlMousescrollright(InternedString kAxisLayout, InputControl parent) { var ctrlMousescrollright = new UnityEngine.InputSystem.Controls.AxisControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMax = 3.402823E+38f }; ctrlMousescrollright.Setup() .At(this, 24) .WithParent(parent) .WithName("right") .WithDisplayName("Scroll Right") .WithShortDisplayName("Scroll Right") .WithLayout(kAxisLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 16, bitOffset = 0, sizeInBits = 32 }) .Finish(); return(ctrlMousescrollright); }
public FastMouse() { var builder = this.Setup(21, 10, 2) .WithName("Mouse") .WithDisplayName("Mouse") .WithChildren(0, 13) .WithLayout(new InternedString("Mouse")) .WithStateBlock(new InputStateBlock { format = new FourCC(1297044819), sizeInBits = 392 }); var kVector2Layout = new InternedString("Vector2"); var kButtonLayout = new InternedString("Button"); var kAxisLayout = new InternedString("Axis"); var kDigitalLayout = new InternedString("Digital"); var kIntegerLayout = new InternedString("Integer"); // /Mouse/position var ctrlMouseposition = new UnityEngine.InputSystem.Controls.Vector2Control(); ctrlMouseposition.Setup() .At(this, 0) .WithParent(this) .WithChildren(13, 2) .WithName("position") .WithDisplayName("Position") .WithLayout(kVector2Layout) .WithUsages(0, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1447379762), byteOffset = 0, bitOffset = 0, sizeInBits = 64 }) #if UNITY_EDITOR .WithProcessor <InputProcessor <UnityEngine.Vector2>, UnityEngine.Vector2>(new UnityEngine.InputSystem.Processors.EditorWindowSpaceProcessor()) #endif .Finish(); // /Mouse/delta var ctrlMousedelta = new UnityEngine.InputSystem.Controls.Vector2Control(); ctrlMousedelta.Setup() .At(this, 1) .WithParent(this) .WithChildren(15, 2) .WithName("delta") .WithDisplayName("Delta") .WithLayout(kVector2Layout) .WithUsages(1, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1447379762), byteOffset = 8, bitOffset = 0, sizeInBits = 64 }) .Finish(); // /Mouse/scroll var ctrlMousescroll = new UnityEngine.InputSystem.Controls.Vector2Control(); ctrlMousescroll.Setup() .At(this, 2) .WithParent(this) .WithChildren(17, 2) .WithName("scroll") .WithDisplayName("Scroll") .WithLayout(kVector2Layout) .WithStateBlock(new InputStateBlock { format = new FourCC(1447379762), byteOffset = 16, bitOffset = 0, sizeInBits = 64 }) .Finish(); // /Mouse/press var ctrlMousepress = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlMousepress.Setup() .At(this, 3) .WithParent(this) .WithName("press") .WithDisplayName("Press") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 24, bitOffset = 0, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /Mouse/leftButton var ctrlMouseleftButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlMouseleftButton.Setup() .At(this, 4) .WithParent(this) .WithName("leftButton") .WithDisplayName("Left Button") .WithShortDisplayName("LMB") .WithLayout(kButtonLayout) .WithUsages(4, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 24, bitOffset = 0, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /Mouse/rightButton var ctrlMouserightButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlMouserightButton.Setup() .At(this, 5) .WithParent(this) .WithName("rightButton") .WithDisplayName("Right Button") .WithShortDisplayName("RMB") .WithLayout(kButtonLayout) .WithUsages(5, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 24, bitOffset = 1, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /Mouse/middleButton var ctrlMousemiddleButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlMousemiddleButton.Setup() .At(this, 6) .WithParent(this) .WithName("middleButton") .WithDisplayName("Middle Button") .WithShortDisplayName("MMB") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 24, bitOffset = 2, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /Mouse/forwardButton var ctrlMouseforwardButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlMouseforwardButton.Setup() .At(this, 7) .WithParent(this) .WithName("forwardButton") .WithDisplayName("Forward") .WithLayout(kButtonLayout) .WithUsages(6, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 24, bitOffset = 3, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /Mouse/backButton var ctrlMousebackButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlMousebackButton.Setup() .At(this, 8) .WithParent(this) .WithName("backButton") .WithDisplayName("Back") .WithLayout(kButtonLayout) .WithUsages(7, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 24, bitOffset = 4, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /Mouse/pressure var ctrlMousepressure = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousepressure.Setup() .At(this, 9) .WithParent(this) .WithName("pressure") .WithDisplayName("Pressure") .WithLayout(kAxisLayout) .WithUsages(8, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 32, bitOffset = 0, sizeInBits = 32 }) .WithDefaultState(1) .Finish(); // /Mouse/radius var ctrlMouseradius = new UnityEngine.InputSystem.Controls.Vector2Control(); ctrlMouseradius.Setup() .At(this, 10) .WithParent(this) .WithChildren(19, 2) .WithName("radius") .WithDisplayName("Radius") .WithLayout(kVector2Layout) .WithUsages(9, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1447379762), byteOffset = 40, bitOffset = 0, sizeInBits = 64 }) .Finish(); // /Mouse/pointerId var ctrlMousepointerId = new UnityEngine.InputSystem.Controls.IntegerControl(); ctrlMousepointerId.Setup() .At(this, 11) .WithParent(this) .WithName("pointerId") .WithDisplayName("pointerId") .WithLayout(kDigitalLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 48, bitOffset = 0, sizeInBits = 1 }) .Finish(); // /Mouse/clickCount var ctrlMouseclickCount = new UnityEngine.InputSystem.Controls.IntegerControl(); ctrlMouseclickCount.Setup() .At(this, 12) .WithParent(this) .WithName("clickCount") .WithDisplayName("Click Count") .WithLayout(kIntegerLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1431521364), byteOffset = 28, bitOffset = 0, sizeInBits = 16 }) .Finish(); // /Mouse/position/x var ctrlMousepositionx = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousepositionx.Setup() .At(this, 13) .WithParent(ctrlMouseposition) .WithName("x") .WithDisplayName("Position X") .WithShortDisplayName("Position X") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 0, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/position/y var ctrlMousepositiony = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousepositiony.Setup() .At(this, 14) .WithParent(ctrlMouseposition) .WithName("y") .WithDisplayName("Position Y") .WithShortDisplayName("Position Y") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 4, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/delta/x var ctrlMousedeltax = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousedeltax.Setup() .At(this, 15) .WithParent(ctrlMousedelta) .WithName("x") .WithDisplayName("Delta X") .WithShortDisplayName("Delta X") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 8, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/delta/y var ctrlMousedeltay = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousedeltay.Setup() .At(this, 16) .WithParent(ctrlMousedelta) .WithName("y") .WithDisplayName("Delta Y") .WithShortDisplayName("Delta Y") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 12, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/scroll/x var ctrlMousescrollx = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousescrollx.Setup() .At(this, 17) .WithParent(ctrlMousescroll) .WithName("x") .WithDisplayName("Scroll Left/Right") .WithShortDisplayName("Scroll Left/Right") .WithLayout(kAxisLayout) .WithUsages(2, 1) .WithAliases(0, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 16, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/scroll/y var ctrlMousescrolly = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMousescrolly.Setup() .At(this, 18) .WithParent(ctrlMousescroll) .WithName("y") .WithDisplayName("Scroll Up/Down") .WithShortDisplayName("Scroll Wheel") .WithLayout(kAxisLayout) .WithUsages(3, 1) .WithAliases(1, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 20, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/radius/x var ctrlMouseradiusx = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMouseradiusx.Setup() .At(this, 19) .WithParent(ctrlMouseradius) .WithName("x") .WithDisplayName("Radius X") .WithShortDisplayName("Radius X") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 40, bitOffset = 0, sizeInBits = 32 }) .Finish(); // /Mouse/radius/y var ctrlMouseradiusy = new UnityEngine.InputSystem.Controls.AxisControl(); ctrlMouseradiusy.Setup() .At(this, 20) .WithParent(ctrlMouseradius) .WithName("y") .WithDisplayName("Radius Y") .WithShortDisplayName("Radius Y") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1179407392), byteOffset = 44, bitOffset = 0, sizeInBits = 32 }) .Finish(); // Usages. builder.WithControlUsage(0, new InternedString("Point"), ctrlMouseposition); builder.WithControlUsage(1, new InternedString("Secondary2DMotion"), ctrlMousedelta); builder.WithControlUsage(2, new InternedString("ScrollHorizontal"), ctrlMousescrollx); builder.WithControlUsage(3, new InternedString("ScrollVertical"), ctrlMousescrolly); builder.WithControlUsage(4, new InternedString("PrimaryAction"), ctrlMouseleftButton); builder.WithControlUsage(5, new InternedString("SecondaryAction"), ctrlMouserightButton); builder.WithControlUsage(6, new InternedString("Forward"), ctrlMouseforwardButton); builder.WithControlUsage(7, new InternedString("Back"), ctrlMousebackButton); builder.WithControlUsage(8, new InternedString("Pressure"), ctrlMousepressure); builder.WithControlUsage(9, new InternedString("Radius"), ctrlMouseradius); // Aliases. builder.WithControlAlias(0, new InternedString("horizontal")); builder.WithControlAlias(1, new InternedString("vertical")); // Control getters/arrays. this.scroll = ctrlMousescroll; this.leftButton = ctrlMouseleftButton; this.middleButton = ctrlMousemiddleButton; this.rightButton = ctrlMouserightButton; this.backButton = ctrlMousebackButton; this.forwardButton = ctrlMouseforwardButton; this.clickCount = ctrlMouseclickCount; this.position = ctrlMouseposition; this.delta = ctrlMousedelta; this.radius = ctrlMouseradius; this.pressure = ctrlMousepressure; this.press = ctrlMousepress; ctrlMouseposition.x = ctrlMousepositionx; ctrlMouseposition.y = ctrlMousepositiony; ctrlMousedelta.x = ctrlMousedeltax; ctrlMousedelta.y = ctrlMousedeltay; ctrlMousescroll.x = ctrlMousescrollx; ctrlMousescroll.y = ctrlMousescrolly; ctrlMouseradius.x = ctrlMouseradiusx; ctrlMouseradius.y = ctrlMouseradiusy; builder.Finish(); }
public FastDualShock4GamepadHID() { var builder = this.Setup(37, 11, 8) .WithName("DualShock4GamepadHID") .WithDisplayName("PS4 Controller") .WithChildren(0, 19) .WithLayout(new InternedString("DualShock4GamepadHID")) .WithStateBlock(new InputStateBlock { format = new FourCC(1212761120), sizeInBits = 80 }); var kStickLayout = new InternedString("Stick"); var kDpadLayout = new InternedString("Dpad"); var kButtonLayout = new InternedString("Button"); var kAxisLayout = new InternedString("Axis"); var kDpadAxisLayout = new InternedString("DpadAxis"); var kDiscreteButtonLayout = new InternedString("DiscreteButton"); // /DualShock4GamepadHID/leftStick var ctrlDualShock4GamepadHIDleftStick = new UnityEngine.InputSystem.Controls.StickControl(); ctrlDualShock4GamepadHIDleftStick.Setup() .At(this, 0) .WithParent(this) .WithChildren(19, 6) .WithName("leftStick") .WithDisplayName("Left Stick") .WithShortDisplayName("LS") .WithLayout(kStickLayout) .WithUsages(0, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1447244354), byteOffset = 1, bitOffset = 0, sizeInBits = 16 }) .WithProcessor <InputProcessor <UnityEngine.Vector2>, UnityEngine.Vector2>(new UnityEngine.InputSystem.Processors.StickDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick var ctrlDualShock4GamepadHIDrightStick = new UnityEngine.InputSystem.Controls.StickControl(); ctrlDualShock4GamepadHIDrightStick.Setup() .At(this, 1) .WithParent(this) .WithChildren(25, 6) .WithName("rightStick") .WithDisplayName("Right Stick") .WithShortDisplayName("RS") .WithLayout(kStickLayout) .WithUsages(1, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1447244354), byteOffset = 3, bitOffset = 0, sizeInBits = 16 }) .WithProcessor <InputProcessor <UnityEngine.Vector2>, UnityEngine.Vector2>(new UnityEngine.InputSystem.Processors.StickDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/dpad var ctrlDualShock4GamepadHIDdpad = new UnityEngine.InputSystem.Controls.DpadControl(); ctrlDualShock4GamepadHIDdpad.Setup() .At(this, 2) .WithParent(this) .WithChildren(31, 6) .WithName("dpad") .WithDisplayName("D-Pad") .WithLayout(kDpadLayout) .WithUsages(2, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .WithDefaultState(8) .Finish(); // /DualShock4GamepadHID/buttonWest var ctrlDualShock4GamepadHIDbuttonWest = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDbuttonWest.Setup() .At(this, 3) .WithParent(this) .WithName("buttonWest") .WithDisplayName("Square") .WithShortDisplayName("Square") .WithLayout(kButtonLayout) .WithUsages(3, 1) .WithAliases(0, 2) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 4, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/buttonSouth var ctrlDualShock4GamepadHIDbuttonSouth = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDbuttonSouth.Setup() .At(this, 4) .WithParent(this) .WithName("buttonSouth") .WithDisplayName("Cross") .WithShortDisplayName("Cross") .WithLayout(kButtonLayout) .WithUsages(4, 2) .WithAliases(2, 2) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 5, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/buttonEast var ctrlDualShock4GamepadHIDbuttonEast = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDbuttonEast.Setup() .At(this, 5) .WithParent(this) .WithName("buttonEast") .WithDisplayName("Circle") .WithShortDisplayName("Circle") .WithLayout(kButtonLayout) .WithUsages(6, 2) .WithAliases(4, 2) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 6, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/buttonNorth var ctrlDualShock4GamepadHIDbuttonNorth = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDbuttonNorth.Setup() .At(this, 6) .WithParent(this) .WithName("buttonNorth") .WithDisplayName("Triangle") .WithShortDisplayName("Triangle") .WithLayout(kButtonLayout) .WithAliases(6, 2) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 7, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/leftShoulder var ctrlDualShock4GamepadHIDleftShoulder = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDleftShoulder.Setup() .At(this, 7) .WithParent(this) .WithName("leftShoulder") .WithDisplayName("L1") .WithShortDisplayName("L1") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 0, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/rightShoulder var ctrlDualShock4GamepadHIDrightShoulder = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDrightShoulder.Setup() .At(this, 8) .WithParent(this) .WithName("rightShoulder") .WithDisplayName("R1") .WithShortDisplayName("R1") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 1, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/leftTriggerButton var ctrlDualShock4GamepadHIDleftTriggerButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDleftTriggerButton.Setup() .At(this, 9) .WithParent(this) .WithName("leftTriggerButton") .WithDisplayName("leftTriggerButton") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 2, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/rightTriggerButton var ctrlDualShock4GamepadHIDrightTriggerButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDrightTriggerButton.Setup() .At(this, 10) .WithParent(this) .WithName("rightTriggerButton") .WithDisplayName("rightTriggerButton") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 3, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/select var ctrlDualShock4GamepadHIDselect = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDselect.Setup() .At(this, 11) .WithParent(this) .WithName("select") .WithDisplayName("Share") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 4, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/start var ctrlDualShock4GamepadHIDstart = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDstart.Setup() .At(this, 12) .WithParent(this) .WithName("start") .WithDisplayName("Options") .WithLayout(kButtonLayout) .WithUsages(8, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 5, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/leftStickPress var ctrlDualShock4GamepadHIDleftStickPress = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDleftStickPress.Setup() .At(this, 13) .WithParent(this) .WithName("leftStickPress") .WithDisplayName("L3") .WithShortDisplayName("L3") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 6, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/rightStickPress var ctrlDualShock4GamepadHIDrightStickPress = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDrightStickPress.Setup() .At(this, 14) .WithParent(this) .WithName("rightStickPress") .WithDisplayName("R3") .WithShortDisplayName("R3") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 6, bitOffset = 7, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/systemButton var ctrlDualShock4GamepadHIDsystemButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDsystemButton.Setup() .At(this, 15) .WithParent(this) .WithName("systemButton") .WithDisplayName("System") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 7, bitOffset = 0, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/touchpadButton var ctrlDualShock4GamepadHIDtouchpadButton = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDtouchpadButton.Setup() .At(this, 16) .WithParent(this) .WithName("touchpadButton") .WithDisplayName("Touchpad Press") .WithLayout(kButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 7, bitOffset = 1, sizeInBits = 1 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/leftTrigger var ctrlDualShock4GamepadHIDleftTrigger = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDleftTrigger.Setup() .At(this, 17) .WithParent(this) .WithName("leftTrigger") .WithDisplayName("L2") .WithShortDisplayName("L2") .WithLayout(kButtonLayout) .WithUsages(9, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 8, bitOffset = 0, sizeInBits = 8 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/rightTrigger var ctrlDualShock4GamepadHIDrightTrigger = new UnityEngine.InputSystem.Controls.ButtonControl(); ctrlDualShock4GamepadHIDrightTrigger.Setup() .At(this, 18) .WithParent(this) .WithName("rightTrigger") .WithDisplayName("R2") .WithShortDisplayName("R2") .WithLayout(kButtonLayout) .WithUsages(10, 1) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 9, bitOffset = 0, sizeInBits = 8 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/leftStick/up var ctrlDualShock4GamepadHIDleftStickup = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMax = 0.5f, invert = true, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDleftStickup.Setup() .At(this, 19) .WithParent(ctrlDualShock4GamepadHIDleftStick) .WithName("up") .WithDisplayName("Left Stick Up") .WithShortDisplayName("LS Up") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 2, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/leftStick/x var ctrlDualShock4GamepadHIDleftStickx = new UnityEngine.InputSystem.Controls.AxisControl { normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDleftStickx.Setup() .At(this, 20) .WithParent(ctrlDualShock4GamepadHIDleftStick) .WithName("x") .WithDisplayName("Left Stick X") .WithShortDisplayName("LS X") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 1, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(-1, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/leftStick/y var ctrlDualShock4GamepadHIDleftSticky = new UnityEngine.InputSystem.Controls.AxisControl { invert = true, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDleftSticky.Setup() .At(this, 21) .WithParent(ctrlDualShock4GamepadHIDleftStick) .WithName("y") .WithDisplayName("Left Stick Y") .WithShortDisplayName("LS Y") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 2, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(-1, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/leftStick/down var ctrlDualShock4GamepadHIDleftStickdown = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMin = 0.5f, clampMax = 1f, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDleftStickdown.Setup() .At(this, 22) .WithParent(ctrlDualShock4GamepadHIDleftStick) .WithName("down") .WithDisplayName("Left Stick Down") .WithShortDisplayName("LS Down") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 2, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/leftStick/left var ctrlDualShock4GamepadHIDleftStickleft = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMax = 0.5f, invert = true, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDleftStickleft.Setup() .At(this, 23) .WithParent(ctrlDualShock4GamepadHIDleftStick) .WithName("left") .WithDisplayName("Left Stick Left") .WithShortDisplayName("LS Left") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 1, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/leftStick/right var ctrlDualShock4GamepadHIDleftStickright = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMin = 0.5f, clampMax = 1f, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDleftStickright.Setup() .At(this, 24) .WithParent(ctrlDualShock4GamepadHIDleftStick) .WithName("right") .WithDisplayName("Left Stick Right") .WithShortDisplayName("LS Right") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 1, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick/up var ctrlDualShock4GamepadHIDrightStickup = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMax = 0.5f, invert = true, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDrightStickup.Setup() .At(this, 25) .WithParent(ctrlDualShock4GamepadHIDrightStick) .WithName("up") .WithDisplayName("Right Stick Up") .WithShortDisplayName("RS Up") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 4, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick/x var ctrlDualShock4GamepadHIDrightStickx = new UnityEngine.InputSystem.Controls.AxisControl { normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDrightStickx.Setup() .At(this, 26) .WithParent(ctrlDualShock4GamepadHIDrightStick) .WithName("x") .WithDisplayName("Right Stick X") .WithShortDisplayName("RS X") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 3, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(-1, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick/y var ctrlDualShock4GamepadHIDrightSticky = new UnityEngine.InputSystem.Controls.AxisControl { invert = true, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDrightSticky.Setup() .At(this, 27) .WithParent(ctrlDualShock4GamepadHIDrightStick) .WithName("y") .WithDisplayName("Right Stick Y") .WithShortDisplayName("RS Y") .WithLayout(kAxisLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 4, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(-1, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick/down var ctrlDualShock4GamepadHIDrightStickdown = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMin = 0.5f, clampMax = 1f, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDrightStickdown.Setup() .At(this, 28) .WithParent(ctrlDualShock4GamepadHIDrightStick) .WithName("down") .WithDisplayName("Right Stick Down") .WithShortDisplayName("RS Down") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 4, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick/left var ctrlDualShock4GamepadHIDrightStickleft = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMax = 0.5f, invert = true, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDrightStickleft.Setup() .At(this, 29) .WithParent(ctrlDualShock4GamepadHIDrightStick) .WithName("left") .WithDisplayName("Right Stick Left") .WithShortDisplayName("RS Left") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 3, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/rightStick/right var ctrlDualShock4GamepadHIDrightStickright = new UnityEngine.InputSystem.Controls.ButtonControl { clamp = UnityEngine.InputSystem.Controls.AxisControl.Clamp.BeforeNormalize, clampMin = 0.5f, clampMax = 1f, normalize = true, normalizeMax = 1f, normalizeZero = 0.5f }; ctrlDualShock4GamepadHIDrightStickright.Setup() .At(this, 30) .WithParent(ctrlDualShock4GamepadHIDrightStick) .WithName("right") .WithDisplayName("Right Stick Right") .WithShortDisplayName("RS Right") .WithLayout(kButtonLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1113150533), byteOffset = 3, bitOffset = 0, sizeInBits = 8 }) .WithDefaultState(127) .WithMinAndMax(0, 1) .WithProcessor <InputProcessor <System.Single>, System.Single>(new UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor()) .Finish(); // /DualShock4GamepadHID/dpad/x var ctrlDualShock4GamepadHIDdpadx = new UnityEngine.InputSystem.Controls.DpadControl.DpadAxisControl(); ctrlDualShock4GamepadHIDdpadx.Setup() .At(this, 31) .WithParent(ctrlDualShock4GamepadHIDdpad) .WithName("x") .WithDisplayName("D-Pad X") .WithShortDisplayName("D-Pad X") .WithLayout(kDpadAxisLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .Finish(); ctrlDualShock4GamepadHIDdpadx.component = 0; // /DualShock4GamepadHID/dpad/y var ctrlDualShock4GamepadHIDdpady = new UnityEngine.InputSystem.Controls.DpadControl.DpadAxisControl(); ctrlDualShock4GamepadHIDdpady.Setup() .At(this, 32) .WithParent(ctrlDualShock4GamepadHIDdpad) .WithName("y") .WithDisplayName("D-Pad Y") .WithShortDisplayName("D-Pad Y") .WithLayout(kDpadAxisLayout) .IsSynthetic(true) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .Finish(); ctrlDualShock4GamepadHIDdpady.component = 1; // /DualShock4GamepadHID/dpad/up var ctrlDualShock4GamepadHIDdpadup = new UnityEngine.InputSystem.Controls.DiscreteButtonControl { minValue = 7, maxValue = 1, wrapAtValue = 7, nullValue = 8 }; ctrlDualShock4GamepadHIDdpadup.Setup() .At(this, 33) .WithParent(ctrlDualShock4GamepadHIDdpad) .WithName("up") .WithDisplayName("D-Pad Up") .WithShortDisplayName("D-Pad Up") .WithLayout(kDiscreteButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/dpad/down var ctrlDualShock4GamepadHIDdpaddown = new UnityEngine.InputSystem.Controls.DiscreteButtonControl { minValue = 3, maxValue = 5 }; ctrlDualShock4GamepadHIDdpaddown.Setup() .At(this, 34) .WithParent(ctrlDualShock4GamepadHIDdpad) .WithName("down") .WithDisplayName("D-Pad Down") .WithShortDisplayName("D-Pad Down") .WithLayout(kDiscreteButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/dpad/left var ctrlDualShock4GamepadHIDdpadleft = new UnityEngine.InputSystem.Controls.DiscreteButtonControl { minValue = 5, maxValue = 7 }; ctrlDualShock4GamepadHIDdpadleft.Setup() .At(this, 35) .WithParent(ctrlDualShock4GamepadHIDdpad) .WithName("left") .WithDisplayName("D-Pad Left") .WithShortDisplayName("D-Pad Left") .WithLayout(kDiscreteButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .WithMinAndMax(0, 1) .Finish(); // /DualShock4GamepadHID/dpad/right var ctrlDualShock4GamepadHIDdpadright = new UnityEngine.InputSystem.Controls.DiscreteButtonControl { minValue = 1, maxValue = 3 }; ctrlDualShock4GamepadHIDdpadright.Setup() .At(this, 36) .WithParent(ctrlDualShock4GamepadHIDdpad) .WithName("right") .WithDisplayName("D-Pad Right") .WithShortDisplayName("D-Pad Right") .WithLayout(kDiscreteButtonLayout) .WithStateBlock(new InputStateBlock { format = new FourCC(1112101920), byteOffset = 5, bitOffset = 0, sizeInBits = 4 }) .WithMinAndMax(0, 1) .Finish(); // Usages. builder.WithControlUsage(0, new InternedString("Primary2DMotion"), ctrlDualShock4GamepadHIDleftStick); builder.WithControlUsage(1, new InternedString("Secondary2DMotion"), ctrlDualShock4GamepadHIDrightStick); builder.WithControlUsage(2, new InternedString("Hatswitch"), ctrlDualShock4GamepadHIDdpad); builder.WithControlUsage(3, new InternedString("SecondaryAction"), ctrlDualShock4GamepadHIDbuttonWest); builder.WithControlUsage(4, new InternedString("PrimaryAction"), ctrlDualShock4GamepadHIDbuttonSouth); builder.WithControlUsage(5, new InternedString("Submit"), ctrlDualShock4GamepadHIDbuttonSouth); builder.WithControlUsage(6, new InternedString("Back"), ctrlDualShock4GamepadHIDbuttonEast); builder.WithControlUsage(7, new InternedString("Cancel"), ctrlDualShock4GamepadHIDbuttonEast); builder.WithControlUsage(8, new InternedString("Menu"), ctrlDualShock4GamepadHIDstart); builder.WithControlUsage(9, new InternedString("SecondaryTrigger"), ctrlDualShock4GamepadHIDleftTrigger); builder.WithControlUsage(10, new InternedString("SecondaryTrigger"), ctrlDualShock4GamepadHIDrightTrigger); // Aliases. builder.WithControlAlias(0, new InternedString("x")); builder.WithControlAlias(1, new InternedString("square")); builder.WithControlAlias(2, new InternedString("a")); builder.WithControlAlias(3, new InternedString("cross")); builder.WithControlAlias(4, new InternedString("b")); builder.WithControlAlias(5, new InternedString("circle")); builder.WithControlAlias(6, new InternedString("y")); builder.WithControlAlias(7, new InternedString("triangle")); // Control getters/arrays. this.leftTriggerButton = ctrlDualShock4GamepadHIDleftTriggerButton; this.rightTriggerButton = ctrlDualShock4GamepadHIDrightTriggerButton; this.playStationButton = ctrlDualShock4GamepadHIDsystemButton; this.touchpadButton = ctrlDualShock4GamepadHIDtouchpadButton; this.optionsButton = ctrlDualShock4GamepadHIDstart; this.shareButton = ctrlDualShock4GamepadHIDselect; this.L1 = ctrlDualShock4GamepadHIDleftShoulder; this.R1 = ctrlDualShock4GamepadHIDrightShoulder; this.L2 = ctrlDualShock4GamepadHIDleftTrigger; this.R2 = ctrlDualShock4GamepadHIDrightTrigger; this.L3 = ctrlDualShock4GamepadHIDleftStickPress; this.R3 = ctrlDualShock4GamepadHIDrightStickPress; this.buttonWest = ctrlDualShock4GamepadHIDbuttonWest; this.buttonNorth = ctrlDualShock4GamepadHIDbuttonNorth; this.buttonSouth = ctrlDualShock4GamepadHIDbuttonSouth; this.buttonEast = ctrlDualShock4GamepadHIDbuttonEast; this.leftStickButton = ctrlDualShock4GamepadHIDleftStickPress; this.rightStickButton = ctrlDualShock4GamepadHIDrightStickPress; this.startButton = ctrlDualShock4GamepadHIDstart; this.selectButton = ctrlDualShock4GamepadHIDselect; this.dpad = ctrlDualShock4GamepadHIDdpad; this.leftShoulder = ctrlDualShock4GamepadHIDleftShoulder; this.rightShoulder = ctrlDualShock4GamepadHIDrightShoulder; this.leftStick = ctrlDualShock4GamepadHIDleftStick; this.rightStick = ctrlDualShock4GamepadHIDrightStick; this.leftTrigger = ctrlDualShock4GamepadHIDleftTrigger; this.rightTrigger = ctrlDualShock4GamepadHIDrightTrigger; ctrlDualShock4GamepadHIDleftStick.up = ctrlDualShock4GamepadHIDleftStickup; ctrlDualShock4GamepadHIDleftStick.down = ctrlDualShock4GamepadHIDleftStickdown; ctrlDualShock4GamepadHIDleftStick.left = ctrlDualShock4GamepadHIDleftStickleft; ctrlDualShock4GamepadHIDleftStick.right = ctrlDualShock4GamepadHIDleftStickright; ctrlDualShock4GamepadHIDleftStick.x = ctrlDualShock4GamepadHIDleftStickx; ctrlDualShock4GamepadHIDleftStick.y = ctrlDualShock4GamepadHIDleftSticky; ctrlDualShock4GamepadHIDrightStick.up = ctrlDualShock4GamepadHIDrightStickup; ctrlDualShock4GamepadHIDrightStick.down = ctrlDualShock4GamepadHIDrightStickdown; ctrlDualShock4GamepadHIDrightStick.left = ctrlDualShock4GamepadHIDrightStickleft; ctrlDualShock4GamepadHIDrightStick.right = ctrlDualShock4GamepadHIDrightStickright; ctrlDualShock4GamepadHIDrightStick.x = ctrlDualShock4GamepadHIDrightStickx; ctrlDualShock4GamepadHIDrightStick.y = ctrlDualShock4GamepadHIDrightSticky; ctrlDualShock4GamepadHIDdpad.up = ctrlDualShock4GamepadHIDdpadup; ctrlDualShock4GamepadHIDdpad.down = ctrlDualShock4GamepadHIDdpaddown; ctrlDualShock4GamepadHIDdpad.left = ctrlDualShock4GamepadHIDdpadleft; ctrlDualShock4GamepadHIDdpad.right = ctrlDualShock4GamepadHIDdpadright; ctrlDualShock4GamepadHIDdpad.x = ctrlDualShock4GamepadHIDdpadx; ctrlDualShock4GamepadHIDdpad.y = ctrlDualShock4GamepadHIDdpady; builder.Finish(); }