Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Input System Update

Discussion in 'Input System' started by Rene-Damm, Dec 12, 2017.

Thread Status:
Not open for further replies.
  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,077
    It's got issues, true. It's not got nearly as many issues as the old input system. It's also going to get better. So any new project should probably use the new input system, for their own sanity.
     
  2. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Well they already jumped to 1.0 skipping past multiple versions that were expected to have other features, so dropping 'preview' doesn't make 1.0 sound any more complete either when some of us know that 1.0 was originally meant to have included. I'm like whatever I tried it not sure I'm ready to convert over to using it yet, besides still so many other assets that are using the old system aswel.
     
  3. Matthew_Ostil

    Matthew_Ostil

    Joined:
    Jan 17, 2014
    Posts:
    57
    Hi!

    We're currently working on a small project for an interactive booth which will make use of a flightstick for control and we purchased the Thrustmaster USB Joystick because of its minimalist look. However, it isn't being detected when listening in the InputActions.

    Few things to note:

    1. The device is being picked up by windows and works with online testers
    2. The device is listed as Unsupported in the Input Debugger
    3. Adding the device to the Input System Package under Supported Devices does nothing

    From reading online, it looks like its possible to create a custom input device, but I'm not sure exactly how to go about that from reading the documentation. For example, where does the existing JSON exist in which you can modify to add your own devices? etc.
    https://docs.unity3d.com/Packages/c...nual/HowDoI.html#create-my-own-custom-devices

    Any help would be greatly appreciated! :D
     
    NotaNaN likes this.
  4. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Is there some kind of public roadmap showing which features are expected to be included in 1.0 and other features planned for post-1.0, including a relative timeline for when these features will be released?

    Note that for the timeline I'm not necessarily asking for specific dates. But rather something that will give me a general idea of when to expect a feature based on the current status of the project at any given time. In other words, something like: features X, Y, and Z are expected in 1.0. Features J and K are coming in 1.1. Feature L is coming in 1.2. Feature N is planned for 2.0. etc.

    The current Unity roadmap isn't helpful (or up to date) and as I recall, the roadmap video from Unite didn't go into details on the information I'm asking about.
     
    Last edited: Nov 8, 2019
  5. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    507
    I'm finally on a project that is going to be in development through next year, but it will likely not upgrade to Unity 2020. With all of the delays, it looks like this package is very close to release (congrats). However, with how long it is taking, could you confirm that the current plan is to continue to support 2019.x releases. Or is the first version out of preview going to be for 2020.1?
     
  6. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,053
    2020.1 will be the first one out of preview. We want however to support the 2019 LTS as best as we can. Since we are a package that it easier to do. LTS versions have however a higher threshold for accepting Unity fixes that we might have to do at some point but don't foresee any problem in that regard.
     
  7. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    507
    I'm a bit disappointed with the response, but thank you for the updated information! I am extremely apprehensive about putting the project through a tech release schedule, but we'll see. Good luck with the release there seems to be a lot of good stuff in here (in particular input contexts and input control modes).
     
  8. Le-Capitaine

    Le-Capitaine

    Joined:
    Jan 23, 2014
    Posts:
    33
    Are you going to be adding values to the InputValue class? The doc says it's a wrapper for CallbackContext, but the only functionality I can wring out of it thus far is isPressed. I'm using a layer of virtual inputs meant to track when buttons are pressed and released, and with multiple character prefabs, I can't afford to set up Unity events for every single one.


    e: While I'm here, I've had another problem. With a custom input actions asset, UI inputs for Submit and Cancel trigger only once and then never again. I've named them Confirm and Back respectively, if that helps anything.
    e2: On that last thing. Switching back to the default input actions makes things work properly, but I find myself needing the custom inputs.
    e3: Right, I've got it. My inputs were set to Press Only. I eventually solved things by using multiple input action assets instead of one with multiple action maps, but it's really not obvious at all.
     
    Last edited: Dec 5, 2019
  9. Meepo0

    Meepo0

    Joined:
    Nov 24, 2017
    Posts:
    29
    I heard with the help of new input system I can do controllers rumble(Vibrate). How can I do it?
     
    TheEugeneL likes this.
  10. Shawn_Flanagan

    Shawn_Flanagan

    Joined:
    Jan 28, 2014
    Posts:
    13
    Gamepad.SetMotorSpeeds(left, right)
     
    Meepo0 likes this.
  11. Meepo0

    Meepo0

    Joined:
    Nov 24, 2017
    Posts:
    29
    Thank You!!!!!
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    9,851
    I don’t think it’s going to for my use cases at least.

    I wanted less latency, support for more buttons (since the old one had limits), hotplugging and support for more controller mappings out of the box. I got none (?) of that and I’m pretty sure they’re not priorities.
     
  13. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    152
    Hmm, i think all those other than latency were talked about being a priority.

    Definitely has “more buttons” and support for hot swapping, as far as I’ve seen using it. And it looks to have a decent list of mapped controllers currently (and an ok looking api for making your own custom controller map)

    As far as latency goes, that sucks. I swore with the low level api there was a way to let you just get the raw input data coming from your system, and then you could process that however you wanted. That’d probably be latency free as possible, tho im not sure where thats at or how you go about doing it, but i think its there!
     
    Shawn_Flanagan and AcidArrow like this.
  14. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    I switched my input system from "Both" to "Input System Package (New)" in my Player preferences and now Cinemachine is throwing up errors as it still uses the legacy axis. Has there been any communication with the Cinemachine tam about updating this?
     
  15. Wulf-Games

    Wulf-Games

    Joined:
    Apr 5, 2016
    Posts:
    9
    MechEthan and transat like this.
  16. BrendanLoBuglio

    BrendanLoBuglio

    Joined:
    Apr 9, 2014
    Posts:
    7
    Hey @Rene-Damm! So I've seen a few different reports about present and future support for XR in the new InputSystem, and I wanted to ask you for your recommendation of the correct solution to use for a new XR project.

    My company is starting a ~15 month project which is going to support a variety of input devices -- a VR version that supports Oculus and OpenVR (including the SteamVR 2.0 features for the Index controller), and a flat version that uses traditional game controllers which will launch on PC and potentially consoles.

    With so many disparate input devices I'd love to use the new InputSystem to create a unified layer of abstraction, but I'm unclear on its current and near-term future levels of XR compatibility. In a comment in response to user Hippocoder on this blog post, you say "XR is in the process of getting split off from the main [InputSystem] package. Being part of the core system has proven troublesome for the various XR devices that want to move forward at their own cadence." Does this mean that XR will be separated from the unified InputSystem interface after it splits off? It also seems like there's a known bug with a significant number of errors firing during runtime if an XR device is connected, which I am also experiencing on Unity 2019.2.17f1.

    Overall, is the current package release of InputSystem expected to work at all with XR, or is the aforementioned bug known to be a hard blocker for that? And as someone laying down input infrastructure for a new XR project right now, do you think it's a good investment to develop using the InputSystem package, or would you recommend a different solution?

    Thanks for your time!
    Brendan
     
    Mese96, Iron-Warrior and NotaNaN like this.
  17. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    152
    I'm running into this error when I turn 'Active Input Handling' to only the New Input System:


    InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    UnityEngine.Rendering.DebugManager.SampleAction (System.Int32 actionIndex) (at Library/PackageCache/com.unity.render-pipelines.core@7.1.7/Runtime/Debugging/DebugManager.Actions.cs:111)
    UnityEngine.Rendering.DebugManager.UpdateActions () (at Library/PackageCache/com.unity.render-pipelines.core@7.1.7/Runtime/Debugging/DebugManager.Actions.cs:168)
    UnityEngine.Rendering.DebugUpdater.Update () (at Library/PackageCache/com.unity.render-pipelines.core@7.1.7/Runtime/Debugging/DebugUpdater.cs:18)
     
  18. Awarisu

    Awarisu

    Joined:
    May 6, 2019
    Posts:
    215
    Unity itself doesn't quite support the new input system, so this is not entirely unexpected. If you want to use the new faster play mode feature, that will also destroy the new input system for instance, the second time you enter play mode.
     
  19. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @Schubkraft Is there a sticky thread outlining all such limitations of the new input system? I've experienced this play mode issue and wasn't aware the new input system was causing it. And I also discovered the input system wasn't compatible with cinemachine by accident. :( It would be good to have a list to save users unnecessary pain.
     
  20. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    55
    Someone was able to save / load bindings in runtime ? After doing PerformInteractiveRebinding.:(:(:(:(:(:(:(:(
     
    shurum-burum likes this.
  21. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,357
    @Rene-Damm I tested this again now on my Thrustmaster TX wheelbase using latest github develop and I am not getting the response I'd expect on binding (in editor or runtime). Wheels gas pedal is totally omitted, it doesn't even do anything on device debug view and then brake pedal has range of -1 to 1 where it defaults to -1 when not pressed. This for example screws up all binding because it's always inputting this axis first on binding with it's -1 value.

    Do note that it's pretty common that wheels use full axis for a pedal and that some wheels pedals have their axis flipped. It should be normalized on input library when binding such device (you can detect the starting point and detect the change from there and then if needed flip the axis / normalize it). One can also find wheels where pedals use combined axis and then it works like on regular joysticks where the unpressed state is just 0 in the middle using single axis.

    If it helps anything, my device description is here: Thrustmaster TX.json
     
    Last edited: Jan 16, 2020
  22. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,357
    Additionally, is there any chance we could get option to runtime rebinding to be able to bind to devices directly instead of picking the generic options like gamepad/joystick if it finds one to fit?

    I still have issue with especially this TX wheel where some of the axis/buttons of the wheel bind to generic "joystick" and others to this specific device. I'd like to just enforce that you can only bind to specific device for HID devices as there's really no generic option even available for them.
     
  23. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @Rene-Damm Would you be able to add an 'Advanced settings" bool to PlayerInput, which would expose started, performed and canceled for each action? Currently it's just performed, right?
     
  24. overbuilt

    overbuilt

    Joined:
    Jan 3, 2014
    Posts:
    14
    Hello, im having a problem with local multiplayer. I start the game, join by pressing A on two gamepads. When i turn off one gamepad - not two in the same time (randomly, sometimes 1st sometimes 2nd). After turning one of them back on, i cannot control the game. OnDeviceLost and OnDeviceRegained events are executed correclty, but controlls doesnt work on one gamepad. Do i need to restart the device somehow? Input debugger works correctly - players just don't receive messages.
     
  25. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Boy, too much to catch up on... sorry in advance for everything I'm missing.

    RE 1.0 and preview label and stuff: we definitely made some mistakes there. We are pretty much the first Unity feature developed almost entirely as a package and being that far into production so there was a lot of figuring out as we went. And a couple calls we made certainly could have been "more ideal" :) With the versioning, there should've never been a 1.0 package with a preview label in the first place but oh well.

    Anyway, with 2020.1 slow in the coming, we get to keep the preview label just a bit longer.

    Bit confusing that one. Messages (SendMessage/BroadcastMessage) use a simplified model where buttons only send messages on performed whereas value actions send them on started and canceled.

    When using UnityEvents, you get started/performed/canceled as is (which seems to have confused the heck out of people).

    Could you file a ticket with the Unity bug reporter? Looks like our reconnect logic still needs work.

    Code (CSharp):
    1. // On latest develop, this applies a good deal of configuration out of the box.
    2. // In 1.0.0-preview.3 it does very little.
    3. var rebind = action.PerformInteractiveRebinding();
    4.  
    5. // To prevent rebinds from generalizing controls but rather
    6. // use the path of controls as is:
    7. rebind.WithoutGeneralizingPathOfSelectedControl();
    Yeah, even with the latest round of improvements to rebinds, I think this (rebinds for HIDs) needs further work. I'm thinking something like there being out-of-the-box support for having it add a control scheme for that specific device or something like that.

    Thank you for the file. We do have a number of accumulated issues with the HID fallback that I hope to circle back to in a short while.

    I'll let @StayTalm_Unity answer this one.

    Not sure I follow. Could you outline the API you're looking for?

    To read values, there's the Get<T>() method. But you're probably looking for something else.

    Not yet unfortunately. ATM there's still quite a lot of uncertainty around where and how exactly things will go after 1.0.

    All I can offer at this point is a rough list of the things we consider important/bigger ticket items after 1.0.
    • DOTS support
    • Broader device support
    • "Routed" input for actions (i.e. input triggering action X prevent action Y from triggering)
    • Gesture support
    • Extended haptics
    • Images and models for controls and devices
    In addition, there's a good number of smaller items (such as stateful processors to do gravity and stuff) scattered across the landscape.

    We only have a vague sense of priority for those at this point.

    Best starting point for HIDs is probably this part of the docs.
     
    Lars-Steenhoff, rz_0lento and NotaNaN like this.
  26. N163LPH03N1X

    N163LPH03N1X

    Joined:
    Jan 10, 2019
    Posts:
    3
    I'll be happy when the controller connection/disconnection is fixed. Two main errors I get are "index out of bounds of the array" and "should net get here" after disconnecting and reconnecting 2 or more controllers. Upon reconnecting, one of the controllers mapping become unresponsive and the second controls both players. I'm running 4 different player inputs using the same input action and it shows in the debug window that there are 4 users. Sometimes the order of the users get mixed up and so controller one would control player 3 etc. If I do not disconnect any controllers my game is flawless but one of the requirements for steam is disconnection/re-connection support, therefor I wont be able to release my game until the issue is resolved with the new input system
     

    Attached Files:

    transat likes this.
  27. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    I'm still confused! What do you mean I get them "as is"? Shouldn't they then appear in PlayerInput?

    Screen Shot 2020-01-22 at 11.21.13 pm.png

    What's happening in the above screenshot, is that I'm sending the event to OnLook and in OnLook I have this code:

    Code (CSharp):
    1.         public void OnLook(InputAction.CallbackContext context)
    2.         {
    3.             if (context.performed)
    4.             {
    5.                 m_lookInput = context.ReadValue<Vector2>();
    6.             }
    7.             else if (context.canceled)
    8.             {
    9.                 m_lookInput = Vector2.zero;
    10.             }
    11.         }
    What I'd like to do instead is to call different functions straight from PlayerInput based on whether the input is in a started/performed/canceled state. Am I doing things the wrong way? I have to admit I'm new to events and messaging so may be misunderstanding everything!
     
  28. AaronRawlinson

    AaronRawlinson

    Joined:
    Jun 10, 2018
    Posts:
    7
    Hey Guys,

    I'm currently working on a couch co-op game (student project) and I've integrated the New Input System with Unity's Standard Assets Third Person Controller. I've set it up so a player is added when a certain button is pressed (Button South for GamePad and Space for Keyboard) and this works fine in terms of movement. It adds 4 players after four presses as intended (Although, I should point out that it shouldn't be adding more than two as I'm testing with an Xbox Controller and Keyboard, so that's only two Input devices). However, they are all controlled by the same controller and move together and can't be controlled individually.

    I can share files on request. Is this because the Third Person Controller scripts can't control more than one player independently?

    Any advice?
     
  29. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    I believe we have recently fixed a number of these kinds of instabilities around PlayerInput but have probably not reached the end here. Thank you for the details. I'll do some digging.

    Sorry, wasn't very clear. With the setup you have, there is indeed only support ATM for getting all calls on a single callback and thus the if()s are needed in most situations. Likely something that can be improved.

    Are you using control schemes? I believe we still have issues with PlayerInput not doing a great job when there's no control schemes to guide its device handling.
     
  30. Awarisu

    Awarisu

    Joined:
    May 6, 2019
    Posts:
    215
    Is the new input system actually working with the new play mode settings even happening in 2019.3?
     
  31. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    You mean Configurable Enter Play Mode? We don't support that yet. A ticket is in the backlog. Hope to have this for 1.0.
     
    Lars-Steenhoff likes this.
  32. AaronRawlinson

    AaronRawlinson

    Joined:
    Jun 10, 2018
    Posts:
    7
    Yes, I have the control schemes set up in my input asset, as far as I'm aware I'm not doing anything wrong... I've added my script for controlling player inputs as reference.
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.InputSystem;
    5. using UnityEngine.InputSystem.Controls;
    6.  
    7. [DefaultExecutionOrder(-90)]
    8. [RequireComponent(typeof(ThirdPersonCharacter))]
    9. public class PlayerInputControllerNew : MonoBehaviour
    10. {
    11.     public PlayerInputControllerNew instance;
    12.     [HideInInspector] public float horizontal;
    13.     [HideInInspector] public float vertical;
    14.     [HideInInspector] public float horizontalRaw;
    15.     [HideInInspector] public float verticalRaw;
    16.  
    17.     private bool readyToClear;
    18.  
    19.     private PlayerControlsInput controls;
    20.  
    21.     //ThirdPersonUserControl
    22.     private ThirdPersonCharacter m_Character; // A reference to the ThirdPersonCharacter on the object
    23.     private Transform m_Cam;                  // A reference to the main camera in the scenes transform
    24.     private Vector3 m_CamForward;             // The current forward direction of the camera
    25.     private Vector3 m_Move;
    26.     private bool m_Jump;
    27.  
    28.     private void Awake()
    29.     {
    30.         instance = this;
    31.         controls = new PlayerControlsInput();
    32.         m_Character = GetComponent<ThirdPersonCharacter>();
    33.     }
    34.  
    35.     //ThirdPersonUserControl
    36.     private void Start()
    37.     {
    38.         // get the transform of the main camera
    39.         if (Camera.main != null)
    40.         {
    41.             m_Cam = Camera.main.transform;
    42.         }
    43.         else
    44.         {
    45.             Debug.LogWarning(
    46.                 "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.", gameObject);
    47.             // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them!
    48.         }
    49.     }
    50.  
    51.     private void Update()
    52.     {
    53.         ClearInput();
    54.  
    55.         //if (GameManager.instance.IsGameOver() || GameMnaager.Instance.IsFreezeInput()) return;
    56.  
    57.         ProcessPlayerInputNew();
    58.     }
    59.  
    60.     private void FixedUpdate()
    61.     {
    62.         readyToClear = true;
    63.     }
    64.  
    65.     void OnHorizontalAxis(InputValue inputValue)
    66.     {
    67.         horizontal += inputValue.Get<float>();
    68.     }
    69.  
    70.     void OnVerticalAxis(InputValue inputValue)
    71.     {
    72.         vertical += inputValue.Get<float>();
    73.     }
    74.  
    75.     void ProcessPlayerInputNew()
    76.     {
    77.         horizontal += controls.Player.HorizontalAxis.ReadValue<float>();
    78.         vertical += controls.Player.VerticalAxis.ReadValue<float>();
    79.  
    80.         horizontalRaw += horizontal;
    81.         verticalRaw += vertical;
    82.  
    83.         horizontal = Mathf.Clamp(horizontal, -1f, 1f);
    84.         vertical = Mathf.Clamp(vertical, -1f, 1f);
    85.  
    86.         //ThirdPersonUserControl
    87.         float h = horizontal;
    88.         float v = vertical;
    89.         bool crouch = Input.GetKey(KeyCode.C);
    90.         // calculate move direction to pass to character
    91.         if (m_Cam != null)
    92.         {
    93.             // calculate camera relative direction to move:
    94.             m_CamForward = Vector3.Scale(m_Cam.forward, new Vector3(1, 0, 1)).normalized;
    95.             m_Move = v * m_CamForward + h * m_Cam.right;
    96.         }
    97.         else
    98.         {
    99.             // we use world-relative directions in the case of no main camera
    100.             m_Move = v * Vector3.forward + h * Vector3.right;
    101.         }
    102. #if !MOBILE_INPUT
    103.         // walk speed multiplier
    104.         if (Input.GetKey(KeyCode.LeftShift)) m_Move *= 0.5f;
    105. #endif
    106.  
    107.         // pass all parameters to the character control script
    108.         m_Character.Move(m_Move, crouch, m_Jump);
    109.         m_Jump = false;
    110.     }
    111.  
    112.     void ClearInput()
    113.     {
    114.         if (!readyToClear) return;
    115.  
    116.         horizontal = 0f;
    117.         vertical = 0f;
    118.         horizontalRaw = 0f;
    119.         verticalRaw = 0f;
    120.  
    121.         readyToClear = false;
    122.     }
    123.  
    124.     private void OnEnable()
    125.     {
    126.         controls.Player.Enable();
    127.     }
    128.  
    129.     private void OnDisable()
    130.     {
    131.         controls.Player.Disable();
    132.     }
    133. }
     

    Attached Files:

    Last edited: Feb 6, 2020
  33. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Ah I see. Thank you for the details.

    So, local co-op out-of-the-box is only provided through the PlayerInput component -- which, at this point, does not work in combination with auto-generated C# wrappers (integrating the two is on the list).

    Furthermore, the auto-generated C# wrappers don't do anything with control schemes out-of-the-box at this point. Meaning they won't set up anything special based on the information in those schemes.

    So what's happening in your case is that the actions simply go and grab whatever devices are available.

    You can control the devices used by the actions by assigning them to the "devices" property.

    Code (CSharp):
    1. controls.devices = new InputDevice[] { Gamepad.all[0] };
    To constrain bindings to just one control scheme, you can set a mask through the "bindingMask" property.

    Code (CSharp):
    1. controls.bindingMask = InputBinding.MaskByGroup(controls.FindControlScheme("Keyboard&Mouse").bindingGroup));
     
    Nate6 and brunocoimbra like this.
  34. AaronRawlinson

    AaronRawlinson

    Joined:
    Jun 10, 2018
    Posts:
    7
    Thanks for the response. I'll have a go at implementing this.
     
  35. overbuilt

    overbuilt

    Joined:
    Jan 3, 2014
    Posts:
    14
    Hello,
    I noticed a problem with new input system and Steam's "REMOTE PLAY TOGETHER" option in local multiplayer games. https://store.steampowered.com/remoteplay

    Im using preview 4 of new input system.
    If someone is using same gamepad as you are - for example Xbox One Controller, game doesn't recognize him as another player, because local player is also using same gamepad type/model.
    Steam is simulating gamepad plugged in to your computer remotely. It seems that new input system has a problem with that. But if someone uses another gamepad type - Xbox 360 fore example (while local player uses Xbox One gamepad), everything works correctly.

    Is there any workaround for this problem? For example name new connected gamepad differently? Or manually attach some type of new ID to just connected gamepad? So the system sees your gamepad , even same model as another instance? Im using attached with input system "Player Input Manager" to join players, etc. Locally everything works as it should.

    REMOTE PLAY TOGETHER is important feature for local multiplayer only games. Since it allows to play remotely, similar to online multiplayer. I will be very grateful for any help with this issue.
     
  36. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    That sounds strange. As long as Steam Remote Play makes the remote gamepad show up correctly locally as an XInput controller, the system should pick it up fine. Sounds more like we indeed don't see two separate controllers being reported through XInput.

    Could you file a ticket for this with the Unity bug reporter so we can take a look?

    Beyond gamepad, I'd expect that keyboard&mouse with Steam Remote Play run into the known issue we have with remoted mouse input (and potentially keyboard, too).
     
  37. AaronRawlinson

    AaronRawlinson

    Joined:
    Jun 10, 2018
    Posts:
    7
    So I added the controls.devices line to the Awake function in my Plyer Input Controller script and that doesn't work either. It still spawns the max number of players set in the Player Input Manager after each input press and controls them all together. Am I missing something?

    *Update
    Using that line of code in awake just after assigning the playerinut now recognises user#0 and shows up in the debugger. It also then only instantiates another player when pressing using another input device which is progress... However, both players still control together when using the gamepad and the keyboard no longer works. Am I doing something wrong?

    Code (CSharp):
    1.     private void Awake()
    2.     {
    3.         instance = this;
    4.         controls = new PlayerControlsInput();
    5.         controls.devices = new InputDevice[] { Gamepad.all[0] };
    6.         m_Character = GetComponent<ThirdPersonCharacter>();
    7.     }
     
    Last edited: Feb 11, 2020
  38. zh4r0naX

    zh4r0naX

    Joined:
    Oct 30, 2016
    Posts:
    71
    I would love to see this issue fixed, i want to change to the new input system. But the hold interaction should be a fundamental thing. Which should be working as expected...

    Iam waiting now since november, is nobody running into these issues ? When trying to programm a charging attack which can be hold down as long as possible ??

    https://issuetracker.unity3d.com/is...ion-is-performed-for-hold-time-amount-of-time
     
  39. AaronRawlinson

    AaronRawlinson

    Joined:
    Jun 10, 2018
    Posts:
    7
    Are you setting an interaction on the action in the action map? If not you need to set the interaction to hold.
     
  40. zh4r0naX

    zh4r0naX

    Joined:
    Oct 30, 2016
    Posts:
    71
    Yeah it is set to hold, and still after holding duration has reached i want to see if the button is still held down. And that doesnt work.

    Like firing a continous beam after hold duration has succeeded and then until the fire button is released. After hold duration has passed it returns 0 which is wrong.
     
  41. Lightzer

    Lightzer

    Joined:
    Jun 23, 2018
    Posts:
    5
    @zh4r0naX Would checking to see if the action is Started, then Canceled work?
     
  42. zh4r0naX

    zh4r0naX

    Joined:
    Oct 30, 2016
    Posts:
    71
    @Lightzer well current setup is:

    Action started => Muzzleflash is shown as charging
    Hold Performed => Beam starts firing

    I guess cancelled is not fired after hold has succesfully been performed. Or am i wrong
     
  43. Lightzer

    Lightzer

    Joined:
    Jun 23, 2018
    Posts:
    5
    Hm yeah it looks like the cancelled is only fired if hold has not been performed, my mistake. Maybe by combining one hold action and one basic button action, then checking for hold's performed and the button's cancelled?
     
  44. zh4r0naX

    zh4r0naX

    Joined:
    Oct 30, 2016
    Posts:
    71
    Well this could work, iam not sure. I will give it a try. I wasnt adapting completely to the new inputsystem because of this issue, and i stopped months ago using it.

    Thank you for the suggestions
     
  45. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,036
    I would like to detect a swipe that starts off-screen and detect the general direction of the swipe (left, right, up, down). Would I just test against startScreenPosition and screenPosition? Edit: I think I see what I need in the demo code.
    .
     
  46. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Fix in flight. Will be in 1.0.0-preview.5 which is scheduled for tomorrow.
     
    zh4r0naX, Eldoir and Lars-Steenhoff like this.
  47. spanagiotis

    spanagiotis

    Joined:
    Feb 5, 2013
    Posts:
    13
    Is it still the plan for preview.5 to have an example of the gamepad working with the UI?
     
  48. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Yes, there's a sample for it that has landed and will be in preview.5.
     
  49. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Or wait, depends on what you mean by gamepad working with the UI :) Gamepad navigation should be working out of the box. The sample shows a setup to have a mouse cursor operated by the gamepad.
     
  50. spanagiotis

    spanagiotis

    Joined:
    Feb 5, 2013
    Posts:
    13
    I was hoping the button actions work as well. Looks like that new component has spots for them, just crossing fingers they're hooked up and working!
     
Thread Status:
Not open for further replies.