Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

[Released] cInput 2 - Unitys custom inputmanager got improved !

Discussion in 'Assets and Asset Store' started by Roidz99, Apr 4, 2012.

  1. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189
    [​IMG]
    Custom Inputmanager for Unity
    [​IMG]


    What is this?

    cInput is a custom input manager for Unity which effectively replicates, improves, and therefore replaces Unity's built-in input manager. In other words, it does virtually everything Unity's input manager does and more. Not only that, but cInput is easier to use and perhaps most importantly it allows you to change controls at runtime!

    Once cInput is set up, it is used in almost the same way as default Unity input code.

    Example:

    You first set up your default keys in Start()
    Code (csharp):
    1. // this creates a new key called "Left" and binds A and the Left Arrow to the key
    2. cInput.SetKey("Left", "A", "LeftArrow");
    After that you can call that input like this
    Code (csharp):
    1.  
    2. // prints the message repeatedly, as long the player keeps pressing the "Left" input
    3. if (cInput.GetKey("Left")) {
    4. Debug.Log("The player is moving left.");}
    5.  
    Similarly you can call GetKeyDown and GetKeyUp. It works just like Unity's input class with the exception that you can now change those keys at runtime with any inputs Unity can handle (joysticks, steeringwheels, mouse, keyboard, etc.).

    To change that input at runtime you use the ChangeKey function, all explained in the manual and the videos. Alternatively we have a built-in configuration menu that you can use directly in your game (or to test your inputs quickly).

    cInput also handles axis of course. Both analog and virtual axis are supported. Fully customizable.


    Why use this?

    We hold the opinion that Unity's built-in input management system has one major flaw and a few other flaws which cInput resolves:

    The major flaw is that it is impossible to change the controls at runtime using Unity's built-in input manager. And even though it is possible to change the keys before launching your game, your players will be stuck with the default look of Unity's configuration menu. The ability to change your controls is an important feature which most gamers expect. Plus it makes your game accessible to different keyboard layouts (WASD doesn't work very well on dvorak keyboards) or other input methods. The more accessible your controls are, the more people can play and enjoy your game! cInput provides this functionality. It also allows you to customize the built-in menu or assists you in building your own menu, which you can style to fit the theme of your game.

    Another problem with Unity's input manager is that it's somewhat of a hassle to add and adjust inputs. Can't remember the exact text required for that button? Type it in wrong and Unity blanks it out. This can lead to multiple frustrating attempts to type in the correct text before getting it right or having to resort to looking it up in the documentation. Or maybe you want to get rid of that axis near the top of the list? There's no way to easily do that. cInput solves both of these problems. First, it has a Keys class which allows you to use autocomplete for those hard-to-remember inputs. And if you want to get rid of a Key or Axis, simply delete the one line of code it takes to define it.



    Where do I find more information?

    We have the reference manual on our website, together with some tutorial videos that cover most of the features of cInput.
    Go to our website for more information.
    You can get the Reference manual here.
    The video tutorials are here.


    I have more questions!

    Mail us any questions you have. Of course you can reply to this post also!


    I'm sold! Where do I get this???

    You can buy cInput from the Asset Store of course or direcly from our website.

    If you don't need source you can get cInput (dll) here






    For the full changelog check out our Website
     
    Last edited: Aug 26, 2014
  2. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Last edited: Apr 4, 2012
  3. RaskVann

    RaskVann

    Joined:
    Jul 17, 2011
    Posts:
    82
  4. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Great question. Here's the answer in a nutshell:

    • It's much easier to install than the previous version. Because cInput 2.0 is a static class, you no longer need to attach it to a game object and then link it to your scripts. Just drop it in your plugins folder and it's accessible everywhere. And v2.0 also preserves Unity's default axes from the Input Manager.
    • Version 2.0 also makes it a lot easier to set up and use your inputs. Previously you had to do everything by remembering the index for your inputs. Now you can give names to the action the input will perform, (e.g. "Shoot" or "Jump") and any time you need to use the "Shoot" action in your code, you can just refer to it by its name instead of having to go back to look for the array index number.
    • Custom Inputmanager 1.x would consider input from ANY gamepad to be the same input. But now cInput 2.0 differentiates between gamepads so that up to five gamepads/steeringwheels/etc. can be used simultaneously.
    • Additionally, cInput 2.0 now supports analog or virtual axis inputs. So you can easily define new axes using the "actions" you defined with the SetKey function.
    • cInput 2.0 also allows you to build your own GUI menu for changing the controls at runtime.
    • And of course some minor bugs from v1.4 have been fixed in cInput 2.0.
     
  5. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    246
    Nicely done guys. Going to be part of my next project.
     
  6. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Thanks, David. Please let us know if you have any problems or if you have suggestions on how to improve cInput.

    We've already gotten some good suggestions on how to make cInput even better. In fact, I've just finished coding a few improvements. We hope to have an update available on the Asset Store tomorrow.
     
  7. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    This looks really cool and I may buy it soon for the purpose of remapping keys.

    I have kind of a weird question. I'm casually trying to support Linux+WINE in my standalone builds and WINE doesn't seem to work reliably with Input.GetAxis() or Input.GetAxisRaw(). I was able to hack in mouse support using DllImport of Windows' user32.dll to access GetCursorPos() (a Windows call). Do you happen to know anything about this, and/or are you using anything like this, apart from GetAxis? Thanks :)
     
  8. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    Will this work with Playmaker? I am having some serious issues with trying to get my inputs to work...
     
  9. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hmm... I'm not sure about this. cInput uses Unity's built-in input functions internally to read the inputs. We don't use any external dlls or anything like that. I think if GetAxis(), etc., aren't working for you in Linux+WINE then cInput won't work either. :(

    That said, if you ever do get GetAxis(), etc., working in Linux+WINE then cInput should work for you, too!

    Good question. We haven't tested it with Playmaker so we don't know the answer to that.

    I recently purchased Playmaker for the Asset Store Madness promotion but have been so busy working on cInput that I haven't had a chance to figure out how to use it yet. One of these days when I have time I'll need to figure out Playmaker well enough to see how it works. But maybe/hopefully someone else can answer that question in the meantime.
     
  10. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi folks! We've just submitted an update to the Asset Store which should hopefully be live within the next 24 hours.

    cInput v2.1 changes

    • IMPORTANT: cInput.Length() method has been replaced by the read-only cInput.length property.
    • Can now manually assign keys with ChangeKey() instead of waiting for input from player. This can be used to pre-designate control "Profiles" that can be switched from a menu.
    • Added GetButton, GetButtonDown, and GetButtonUp. (Thanks patrickw)
    • Can now allow duplicate inputs for multiple actions using cInput.allowDuplicates (Thanks patrickw)
    • Can now invert an axis using cInput.InvertAxis("axisName"). (Thanks Ryan)
    • Can get axis inversion status with cInput.IsAxisInverted("axisName"). (Thanks Ryan)
    • cInput.SetAxis can now accept 1 action instead of requiring 2. (Thanks patrickw)
    • Better support for sliders, gas pedals and other analog inputs with Calibrate(). (Thanks patrickw)
     
    Last edited: Apr 7, 2012
  11. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189
    Seems Unity is a bit slow accepting our update.
    The update probably won't show up before monday (or tuesday because of the holliday).

    We're sorry about this but it's out of our hands. People who bought trough the website should have gotten the updated version allready.
     
  12. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    870
    cInput is AWESOME! My racing game has customizable controls XD
     
  13. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi everyone!

    I just wanted to remind you that time is running out to be an early adopter and get cInput 2 for 50% off.

    We've just submitted cInput v2.1.1 to the Asset Store and when it is approved the sale will officially be over.

    Have a good weekend, and Happy Easter to all who celebrate it.


    cInput v2.1.1 changes:

    - InvertAxis() and IsAxisInverted() have been combined into a single function: AxisInverted().
    - Minor bugfixes.
     
  14. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi everyone,

    It looks like we made a mistake while packaging up the latest version of cInput which has resulted in a delay in the update being released on the Asset Store. The good news is that the early-adopter 50% off sale has been extended until the updated package is released on the Asset Store. We fully expect the release to happen sometime today, so don't miss out on the reduced price!
     
  15. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189
    Update 2.1.1 is live on the Asset store !
     
  16. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Looks great, and just in time! Was about to begin work on input porting for my iOS game to standalone builds. :) Just bought it, so I'll post my impressions once I've got it integrated.
     
  17. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    One quick suggestion - it would be nice if you used public string properties for your OnGUI elements (especially for the header box, left action column buttons, and input button columns). Right now they're all set to "box", "label", etc. If they were string properties, then I could create custom classes without having to edit the cInput OnGUI method each time. :)
     
  18. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    This is a great idea! I'm working on implementing this right now. Expect an update soon!
     
  19. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Been testing everything out and it's working great so far with Keyboard and my precision gamepad! However, when I go to test out my XBOX 360 controller hooked up to my mac, the L&R triggers which map to axis 5 6, respectively, don't seem to be triggering the GetKeyDown functions. Is it not correct to run GetKeyDown on an axis input?
     
  20. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hmm, that is a strange one indeed. I just tested that and confirmed that GetKeyDown (as well as GetKeyUp, GetButtonDown, and GetButtonUp) do not work with analog inputs.

    When we were making cInput, I guess we thought it didn't make sense to use GetKeyDown on an analog joystick. It didn't cross our minds at the time that there were analog buttons like the shoulder triggers.

    We'll look into getting those analog inputs to work with GetKeyDown, etc.
     
  21. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    OK - I got a temporary solution for my case working with a little hacking. :) Mailing you the code changes now.
     
  22. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189
    We submitted the new update to the store. People who bought trough the website can directly get the update, people who bought cInput trough the store might have to wait untill after the weekend.


    cInput v2.2.1 changes:

    - Analog inputs are now compatible with GetKeyDown, GetKeyUp, GetButtonDown, and GetButtonUp functions. (Thanks getluky)


    cInput v2.2.0 changes:

    - ShowMenu() now accepts additional arguments for easier customization of cInput's menu. (Thanks getluky)


    PS: update 2.2.0 should be allready on the store
     
  23. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    We've also submitted another bugfix update to the asset store. As Roidz said, it might not be until after the weekend before Unity accepts it:

    cInput changes:

    v2.2.3
    - Fixed bug with GetAxis not creating cInput object properly. (Thanks Christopher)

    v2.2.2
    - Fixed bug with inverted axes not saving/loading properly. (Thanks Christopher)
     
    Last edited: Apr 13, 2012
  24. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    402
    Hey, could you add a method to check if an axis (or a key) is already defined?
    This seems to work, but the "findAxisByDescription" method is private:
    Code (csharp):
    1.  
    2. public static bool IsDefined(string axisName){
    3.      return cInput.findAxisByDescription(axisName) >= 0;
    4. }
    5.  
     
  25. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi David,

    Thanks for the suggestion. I have to admit that I'm a little puzzled as to why someone would need this method. Shouldn't you already know which keys/axes you've defined in your script? I guess it would be useful if you're defining your keys/axes throughout a bunch of different scripts. . .

    I think it makes more sense to define all your keys and axes in one place (a single script) before any other calls to cInput are made. This way you can go to that script and quickly/easily see all the inputs you've got defined with cInput and make changes if necessary.

    Let me know if there's something I'm just not comprehending, or some other case where this method would be useful and needed. Personally I don't see this method as necessary, but I'm willing to admit when I'm wrong; I just need to be convinced on this one.

    Thanks again!
     
  26. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    402
    Hi Deozaan,

    I know most of your customers won't need those methods, but my case is a little special: I have started to add several features for player-controlled vehicles to Pro Racing AI (check the link in my signature if you need more information) and one of those features is the possibility of using cInput instead of using the built-in Unity Input for controlling player vehicles. As I don't want to create a dependency between our products, I'm using Reflection to check if the customer (another developer, not an end-user) has imported cInput into the project folder: I will use cInput automatically if it's available, but the built-in Unity Input will be used if cInput is unavailable.

    In any case, one of the main selling points of my product is that it's so user-friendly that it can be used easily without any programming skills, so I can ask my customers to write a script to define the axis for cInput, but I must also implement some kind of fallback system in case they forgot to implement such script: I want to check if the axis are defined before the first call to GetAxis() because I don't want to override my customer definitions, but I want to provide a default definition in case my customer forgot to define the required axis. That's the reason why I need a method for checking if an axis (or a key) has been defined or not.

    The method implementation would be really simple, but I can't implement it myself because the findAxisByDescription() method is private and I can't ask my customers to edit the cInput.cs file manually to make it public. In any case, I don't see a good reason to define the findAxisByDescription() method as public because it would expose implementation details, but I really need a method to check if an axis or a key has been defined previously or not... unless you are aware of an existing work-around I can use ;)
     
    Last edited: Apr 15, 2012
  27. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi David,

    There is a workaround I can think of, but it's quite a hack: Implement your own key/axis loader function from PlayerPrefs to see if the keys/axes are defined.

    But don't bother going through all that work. We can see how it would be useful to allow other developers to provide scripts that interface with or otherwise support cInput, so we'll add this feature.

    Thanks for the suggestion!
     
  28. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi David,

    I've got that featured added in but now I'm wondering: Would you prefer to have just a bool returned or some way of knowing whether or not it's an axis or a key? For example:

    Code (csharp):
    1.  
    2. // the first method is nice and simple and just returns true or false
    3. if (cInput.IsDefined("Jump")) {
    4.     // do stuff
    5. }
    6.  
    7. // the second option can allow you to do more complicated things
    8. // it returns 0 if not defined, 1 if it's a key, and 2 if it's an axis
    9. if (cInput.IsDefined("Left") != 0) {
    10.     // do stuff
    11.  
    12.     // or optionally do different things if it's a key or an axis
    13.     if (cInput.IsDefined("Left")== 1) {
    14.         // use it like a key
    15.         if (cInput.GetKeyDown("Left")) { // do key stuff }
    16.     } else if (cInput.IsDefined("Left")== 2) {
    17.         // use it like an axis
    18.         if (cInput.GetAxis("Left")) { // do axis stuff }
    19.     }
    20. }
    21.  
     
    Last edited: Apr 16, 2012
  29. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    402
    I didn't think about that. Maybe we should have two different methods IsKey() and IsAxis() instead of having a single method IsDefined(). In any case, I don't mind how do you implement it, I will adapt my code to your implementation.
     
    Last edited: Apr 16, 2012
  30. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Thanks for your response. This feature will be available in the next update.
     
  31. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    402
    Thanks for accepting my suggestion. I will adapt my code to start using those methods as soon as they are defined, but I will prepare a fallback implementation (not setting a default value for the axis because I don't know if they are defined or not) that I can use in the meanwhile.

    By the way, would you call those methods IsKey() and IsAxis() or isKey() and isAxis()? In the code example you wrote above most method names start with an uppercase letter, but the isDefined() method started with a lowercase letter, so I want to ask to be completely sure before I start modifying my code.
     
  32. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Actually, I decided to go with a single method: IsDefined(). It will return 0 if no key or axis is defined, 1 if it's a key, and 2 if it's an axis. The name of it starts with a capitalized letter. I'll update my example to reflect that.

    Obviously there's a smarter way than my above example to deal with the different possibilities:

    Code (csharp):
    1.  
    2. // do this if you just want to make sure it exists but don't care if it's an
    3. // axis or a key
    4. if (cInput.IsDefined("Left") != 0) {
    5.     // do stuff
    6. }
    7.  
    8. // or optionally do different things if it's a key or an axis
    9. int defined = cInput.IsDefined("Left");
    10. if (defined == 1) {
    11.     // use it like a key
    12.     if (cInput.GetKeyDown("Left")) { // do key stuff }
    13. } else if (defined == 2) {
    14.     // use it like an axis
    15.     if (cInput.GetAxis("Left")) { // do axis stuff }
    16. }
    17.  
    Also, if you PM me your e-mail address I can send you an updated copy of the script so you can start using it right away instead of having to wait until it gets updated on the Asset Store.
     
    Last edited: Apr 16, 2012
  33. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    402
    Ok, I'll send you a PM after writing this post :D
    By the way, is it possible to define a Key and an Axis with the same name? In that case, which result will return the IsDefined() method?
     
  34. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Erm... Yeah. I guess I didn't think that one through very well, did I?

    Yes it is possible to have the same name for a Key and an Axis. Because of this, I changed it to use two methods: IsKeyDefined() and IsAxisDefined().

    I'll respond to your PM now.
     
  35. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    And by the way, cInput v2.2.3 is now live on the Asset Store.

    This of course doesn't include the changes we've been discussing since I announced the submission of v2.2.3 to the Asset Store.

    Here's a reminder of what's on the store right now:

     
    Last edited: Apr 16, 2012
  36. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    cInput v2.3.0 is now on the Asset Store and our website!

    cInput changes:

    v2.3.0
    • Added IsKeyDefined() and IsAxisDefined() methods to allow other developers to make cInput-compatible plugins. (Thanks David)
    • Added GetAxisRaw() method. (Thanks Jay, patrickw)
    • Added Clear() method to remove all PlayerPrefs keys stored by cInput
    • Fixed changed/deleted/added keys not saving/loading properly
    • Keys class properties are now const, as they should be. (Thanks Jay)
    • SetAxis() now has some error checking to make sure you're using it correctly. (Thanks Jay)
     
  37. Harabeck

    Harabeck

    Joined:
    Mar 27, 2012
    Posts:
    10
    Is there way to bind multiple keys? Such as binding an action to ctrl-w?
     
  38. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    This would be done in the script you write for your controls. For example:

    Code (csharp):
    1.  
    2. cInput.SetKey("Up", "W");
    3. cInput.SetKey("Modifier", Keys.LeftControl, Keys.RightControl);
    4.  
    5. if (cInput.GetKey("Up")  cInput.GetKey("Modifier")) {
    6.     // ctrl-w was pushed!
    7. }
    8.  
    9. // or if you also want to do stuff when W is pushed without Ctrl
    10. // then this might be a better way
    11. if (cInput.GetKey("Up")) {
    12.     if (cInput.GetKey("Modifier")) {
    13.         // ctrl-W stuff goes here
    14.     } else {
    15.         // normal W stuff goes here
    16.     }
    17. }
    18.  
    Or if you don't want the modifier key to be customizable with cInput, then you can use Unity's built-in Input for it. Like this:

    Code (csharp):
    1.  
    2. if (cInput.GetKey("Up")) {
    3.     if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) {
    4.         // ctrl-W stuff goes here
    5.     } else {
    6.         // normal W stuff goes here
    7.     }
    8. }
    9.  
     
    Last edited: Apr 29, 2012
  39. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi folks,

    I'm just writing to announce that an update to cInput has been submitted to the Asset Store and our website. If you bought cInput from the Asset Store then the update should hopefully be available within 24 hours. If you bought it from our website then the update is available right now.

    cInput changes:

    v 2.3.1

    • Added the ability to set sensitivity with SetAxisSensitivity() rather than having all axes use the same sensitivity. (Thanks Jacob)
    • You can now also set the sensitivity for an axis when you create it with SetAxis().
    • You can now forbid keys from being used as inputs with ForbidKey(). (Thanks Kurt)
     
  40. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Did something change in the last few builds with regard to the Escape key? It used to allow binding the Escape key within the GUI, and now it seems like Escape is handled differently so every time a user tries to bind escape to a command (such as a virtual Start/Menu input) it just shows up as None.
     
  41. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    As far as I know, cInput 2.x has never allowed binding the Escape key. I think that escape has always been a sort of "cancel bind" key that will set a keybind to "None" as you describe.
     
  42. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189
    I think Deozaan is right.
    We can allow escape to be binded if you would like that. We just can't make that default behaviour because this might break behaviour for other people.
    We can do something like 'allowEscape(true)' or something simular. Ofcourse you need to find your own way to cancel out a keyscan then.
    Let us know if you would like to see escape beeing bindable and we implent it.
     
  43. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189
    hey guys !

    We had some requests if it was possible to make cInput2 flash compatible.
    We had also requests to make cInput2 android/ios compatible...

    Good news ! Deozaan and me think we have made a stable flash/ios/android build !
    There are a few limits like : no joystick support. - unless you have a joystick/joypad that returns keyboard strokes ofcourse.

    What does work ?
    We think all the rest works !
    like : usb keyboards, bluetooth keyboards,mouse inputs, hardware buttons...
    name it, you should be able to map it.

    We have done a lot of testing ,but before we make this build public we would like to get a few more testers. Specially on Android and IOS.

    So if you would like to help us out and allready have cInput,send us your cInput assetstore invoice info or, if you bought on the website, your paypal email adress you used to buy cInput and we send you the latests beta of cInput.

    We had to rewrite quiet some code and as a side-effect our tests showed that cInput became quiet a bit faster also.
    So, only good news so far :)

    , Roidz
     
  44. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Sorry for the delay - I think you're right about the Escape binding issue. I might work around it in my own way. However, I did have a small request, which is to create a public getter for the _scanning bool. I used it to build my own configuration panel in NGUI. :)
     
  45. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Ah, I also have some odd behavior to report. If I have a single cInput var bound to both a joystick axis and a single key, and I perform a keypress, the GetKeyUp returns true almost immediately, while the "virtual" GetKeyUp returns as expected if I press the joystick axis.

    For example, I have a controller trigger axis AND a key bound to a punch button. If I use the controller trigger, GetKeyUp doesn't return true until I release the trigger. However, if I press the button, GetKeyUp returns true immediately. I imagine that it's a collision between virtual up/down events sent by an axis and the up/down events sent by a key on the same input. Any ideas for a workaround?
     
  46. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Just found a pretty straightforward "fix." Let me know if you want me to send you a patch for review!
     
  47. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    I was typing up a reply when I got the notification of your fix. I'd be very glad to see your patch.

    You can send it to the e-mail address listed in cInput.cs. Thanks.
     
  48. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    521
    Hi folks,

    An update to cInput has been submitted to the Asset Store and the cInput website. If you bought cInput from the Asset Store then the update should hopefully be available within 24 (business) hours. If you bought it from the website then the update is available right now.

    This version brings about some major changes to the internal structure of the code which allows compatibility with mobile devices and Flash, and improves the performance of cInput.

    cInput changes:

    v 2.4.0

    • cInput is now compatible with iOS, Android, and Flash.
    • Improved efficiency (less CPU overhead).
    • Fixed key axis mapped to same input causing KeyUp to fire instantly. (Thanks goodhustle)
    • Added read-only public bool “scanning” as getter for the private bool “_scanning” (Thanks goodhustle)
     
  49. fano_linux

    fano_linux

    Joined:
    Jan 1, 2012
    Posts:
    909
    How can I get the updates? are they free?
     
  50. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    189

    - If you bought cInput trough the asset store you can download the latest version from the store.
    - If you bought cInput trough our website,you can download updates at the link that you were given. I am unsure if you can retrieve this link again trough paypal but the link is suposed to stay active for unlimited downloads (so also updates)
    If this is how you got cInput and you have no way to retrieve your download link again, contact us and we work it out
    - if you bought cInput trough Gameprefabs or UnityMagic - We submitted our update to Gameprefabs and are waiting response from Unity Magic to do the same.

    Hope that helped, if not, please contact us.