![]() Raw Input: Fixed detection of buttons on certain devices when button HID usages are not sequential. Fixed problems with fallback joystick identification when a joystick has buttons that are always on. Fixed AOT compiler failure when building to WiiU platform. Windows, OSX, Linux: Added Red Samurai Wireless Controller mappings on Bluetooth Radio Shack PC Gaming Controller (2603666) Sony DualShock 2 (requires Insten PS2 to PS3 USB converter) * IMPORTANT * If you've created your own controller definitions, be sure to verify and update the axis count value for Raw Input in the Matching Criteria as this update may cause the axis count to return more axes than before. Changed the axis count formula for Raw Input to more closely match results from Direct Input. If you've bought Rewired and want to get access to the latest downloads immediately, contact me with your email address. Rewired 1.0.0.24 is available for download for registered users now on the website. So here's the method that gets called regularly: I'm using NGUI, so I save references to UISprite and UILabel, but the idea would work with any type of sprites or text objects (Unity sprites/Unity UI, TextMeshPro, 2D Toolkit, etc). The input names that Rewired returns have values like "Button 1", "A", "Square", "F1" and so on. The CheckForControllerTypeChange() method scans through all of those InputGlyph elements and tries to find the specific input names for each Rewired "Action." I have two separate UI's: one is an in-game "ship computer" and the other is a "helmet HUD." I know that I'll never have axis controls on the helmet HUD, so I don't even bother looking for AxisContribution on that one. I extended a screen manager I wrote to incorporate that. If it's just a simple button, Axis Contribution is blank.Īn array of InputGlyph's is generated up front for all of them within each particular UI hierarchy. In that case, I fill the values like this: Like my map zoom in and out controls are on one axis, but I want to show separate controls for + and. "Action" is the name of the Rewired action and AxisContribution is an optional value for when you need to show one half of an axis. ![]() InputGlyph has two public properties you can set, Action and AxisContribution. ![]() The basic idea is you attach an InputGlyph to any GameObject that contains the background sprite, with specific names for a foreground sprite and foreground label as children of that GameObject. I don't need to get that specific in my game though. If you wanted controller-specific images, you'd have to go further and look at specific device GUID's that Rewired assigns. And "F1" on keyboard is a square background with an "F1" label on top. A triangle button on PS4 is a triangle on a circle. So an "A" button on 360 is a round background sprite with an "A" label on top. ![]() The idea is that I construct input prompts by combining a generic background with a specific foreground. Each one represents a particular input prompt in the game's UI. I have a class called InputGlyph that contains pointers to a background sprite, foreground sprite, and a foreground label. The timer is set to do its thing once per second or so. In a particular component's Update, I call the method CheckForControllerTypeChange() listed below. ![]() Ok, here's the info on how I display input "glyph" icons for Rewired controls. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |