To call that SetRewired function from your script on the EventSystem prefab, but it does not turn on the Rewired Input Module (or turn off the AC one). I have a menu called Controls, I open this and it's "when opened" action list does a Send Message to Control Mapper to open that (this works fine), I also do: I can't get it to work though I'm afraid, maybe I'm missing something? Sorry for the barrage of info and questions here, just trying to avoid headaches. First selected Element, or if CM handles that on it's own? Also should I make a prefab of this ControlMapper and drop it in all my scenes, or should I create ControlMapper the usual way (in each scene) then manually add the Constant ID to CM? AC mentions that this may cause problems - I have only tested this one scene so far, which is simply the main menu, so I'm not sure if it will cause issue with general gameplay or not, I will report back here if so. Rewired comes with an Event System integration for Unity UI - I was only able to get it working by dropping this into my scene. I changed the Menu to "Unity UI in scene", though AC complains that "no Linked Canvas can be found!" as ControlMapper disables the canvas by default. I have created a menu called Controls and the Send message action is done via an "ActionList when turn on" for the Controls menu. ![]() Stupid PS3.You're right Chris, I've simply called ControlMapper's "open" function with a Send Message action, and this works in regards to opening the ControlMapper screen. ![]() The buttons should now be just as functional as if they were using ORK input keys or the Unity Input Manager, and now they will work with most any controller on Windows, Mac, or Linux. For example, I named my Horizontal axis input.Horizontal. You're going to use the script's class name in the class slot, the function name in either the axis or button function slot (axis applies to directional buttons/sticks and button applies to.buttons), and then add a parameter with whatever you called the input in the Rewired setup. Public static bool GetButtonDown(string actionName) static function that returns bool value of true only once on first frame of button press Public static bool GetButton(string actionName) static function that returns bool value of true as long as button is held Public static float GetAxis(string actionName) static function that returns float based on axis position Public class gamepadControls : MonoBehaviour I attached mine to the Rewired Input Manager: Attach this to an object that doesn't get destroyed on loading the next scene. You're going to use this script that works with ORK's custom input. Follow this guide from the Rewired documentation page right up until you get to the script part:ģ. You could buy a cheaper Input manager and hopefully this might still help you understand the core concept of ORK's custom input, but this guide is specific to Rewired. It's 45 dollars, but worth it for avoiding the stress of figuring all this out yourself. ![]() Here's a quick and simple tutorial to get you started!ġ. Basically you need to create a static function with whatever Input manager you're using that returns a float or bool when a player presses a button/moves a joystick. Rewired is an awesome asset for handling all the different controller inputs, but for anyone unfamiliar with how ORK handles custom input, it might be a little tricky to integrate it. So you want controller input available for your game, but setting up the controls for every different controller across Windows, Mac, or Linux seems like a drag!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |