Forum rules - please read before posting.

List of Inputs for Rewired

Hi,

I've been having a go at adding Rewired to my AC project, all is going relatively well after following the tutorial on setting the playerInput delegates and adding actions for every input listed in AC settings.

but I noticed when I bring up the ingame menu I couldn't move the selection with the joypad.

After looking at the code, I noticed it was looking for an input named "Vertical" which wasn't listed in the AC available inputs.

Is there a list of all the input I need somewhere?
Am I missing something?

Thanks for any help,
Passive :)

Comments

  • A list of inputs can be found within the Settings Manager, about halfway down.  If you check Assume inputs are defined? beneath, you'll get error messages in the Console when running for any required inputs that aren't defined in your Input Manager.

    What's your Input method set to?  If Keyboard And Controller, both Horizontal and Vertical should be liseted.  If not, what's your AC version number?

    Also, what's your menu's Source property set to?  If set to Unity Ui Prefab, navigation will be handled by Unity's EventSystem - and not with AC.
  • Thanks for the quick response,

    I'm using AC version 1.63.2

    The Input method is set to Keyboard and Controller but "Horizontal" & "Vertical" is not listed. There is a "CursorHorizontal" & "CursorVertical" though.

    The pause menu's source is set to Adventure Creator.

    I'm going to try the "Assume inputs are defined" setting next, see what I get.
  • Strange.  May I see a screenshot of your full Settings Manager?
  • edited July 2018
    Certainly :)

    AC Settings:
    https://imgur.com/a/WBZDcIK

    Menu Settings:
    https://imgur.com/a/NI4lJp8

    (Sorry couldn't get images to embed)

  • edited July 2018
    OK, I think I've found the problem :)

    In SettingsManager.cs inside the function SmartAddInput
    line 1289 you use String.Contains to check if in input is already defined.
    But CursorHorizontal is already defined when you attempt to add Horizontal
    so its never added! (as CursorHorizontal contains the word Horizontal)

    I've fixed it by using Regex.Match:

    if (!Regex.Match(existingResult, "\b"+newInput+"\b", RegexOptions.IgnoreCase).Success)

    ta,
    Passive
  • edited July 2018
    Actually I don't think that Regex is quite right.. you might need to separate out the lines then check them. 
    something like:

    string[] existingResults = existingResult.Split(new[]{ System.Environment.NewLine }, System.StringSplitOptions.None);

    if (!existingResult.Contains(newInput))
  • Indeed - that's the cause.  Don't worry, I'll address it.
  • Great!
    cheers.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.