Forum rules - please read before posting.

Quick question about NIntendo Switch controls port

SFGSFG
edited June 2020 in Extending the editor

I have a switch dev kit and license, just curious how are people getting their controls to work?

Are people using the Unity plugin Rewired to get the controls working with AC and the switch?

With the 3DS the controls just worked when it compiled. With the Switch, it seems to ignore the controls and touchscreen (the game is builtin AC and is a MacVenture so it is a 2d first-person point and click). Before the dev kit arrived had the game compiling and running fine on the emulated environment, but soon as I put it on the switch none of the controls worked.

Just wondering if people had any idea for a solution for this. Basically, I want to use the touch screen and also control the cursor with joystick and Y and B buttons.

To be clear I've never used Rewired before, but I saw someone suggest it elsewhere.

Any advice would be appreciated,
William

«13

Comments

  • edited June 2020

    (Moved to "Extending the editor")

    AC has a Rewired integration script here, but I'm not aware of a specific need to rely on Rewired to get basic input going. If the "Input method" is set to "Keyboard Or Controller", it'll rely on inputs defined in Unity's Input Manager, which themselves can be mapped to a Switch controller.

    See the Manual's "Keyboard or controller input" chapter for details on what those inputs are named.

  • Thanks I"ll be trying this tomorrow evening after work :D

  • SFGSFG
    edited February 28

    Jeeze it's been a while.

    Ok, so I'm still pretty stuck here, though I've been reading and experimenting a bit with rewired when I haven't been working... Still no dice though.

    Is Keyboard Or Controller the correct setup for AC? The game was originally created around the Mouse and Keyboard (the Mouse is the only thing used to control the game). At this point, I'm going to be happy just to get the thing to work with the buttons and analog stick, lol.

    I've been reading through the AC and Nintendo forums and it seems most of the solutions suggested are people directly controlling a character and not moving a cursor to point and click. Which since this is a 2D first-person MacVenture game is definitely has to be controlled via cursor. At this point, I'm trying to find the easiest method to get this thing up and running so I can send it to people to test and focus on finishing the follow-up game / getting its public demo ready for Steam's Summer Festival. Ideally, if I got this up and running here I could repeat it in the follow-up's project and then launch the sequel on both platforms simultaneously when the time came. But that's getting the cart ahead of the horse.

    Just checking if you had anything more you could suggest in getting ReWired (or honestly this point any control mechanism) to use the analog sticks to move the cursors and the buttons to right-click/left-click. Going through ReWired's documentation it seems that I have the Players, Actions, input Behaviors, and Joystick Maps all set up correctly, so I must be doing something wrong on the AC front of things. I switched the project to Keyboard Joystick as you suggested and the script ACRewired script is embedded in the GameEngine prefab.

  • You need a special version of the Rewired plugin for it to work on the platform. Did you go through the request process? https://guavaman.com/projects/rewired/docs/SpecialPlatformSupport.html#nintendo-switch

  • Yes, and I have it installed.

  • To be clear when I first made this post a year ago, I had not. I have since gotten it as of a month or two ago... Slammed my head against a wall for a good while there and had practically given up. But I have a full day off (today) to try and sort thig out.

  • oh... I may have figured a bit of it out... Strange I can move the cursor and click on things, but only some things are responding, while if I use the mouse to click everything responds... The buttons are identical... What could be causing this...

    Oh hey, I think I figured out what's going on... For some reason, if the system cursor isn't locked inside the game window it doesn't work with certain buttons... Don't know why some buttons work and others don't but that seems to be the trick, going to see if I can force it into the window and then deploy it to the switch...

  • So strange... In the editor when I run it the keyboard for instance can click on all the buttons but one. But it can click on the one if I select inside the game window with my mouse. on the switch, I cannot for the life of me hit that button with the joy-con. It just won't activate. So weird... I wonder if there is a way to lock the system cursor inside the game window. That should fix it.

  • Ok, scratch that what's going on is the system mouse is capable of clicking anything on my main menu but is de-synched from the ReWired cursor that is controlled by the keyboard/controller. The quit button is selectable by this method as it's part of the AC menu overlay is always present. However, nothing else is interactable with the controller/keyboard interface... Weird.

  • SFGSFG
    edited March 1

    Over 8 hours in.

    Update. So... Here's the thing. I cannot for some reason with the keyboard/switch select any of my main menu stuff which are just buttons, more can I mess with my option menu. I can however use the QUIT button which is just an AC menu.

    If I were to use my mouse and just select New Game for instance, the game launches and the keyboard can control everything inside the game. So for some reason, the title screen is the big headache that is unresponsive. I also notice that while in-game and moving my cursor around after selecting say "Look" it will highlight other verbs as if I'm scrolling over them anyhow I'm far above them, that said it does not interact with the highlight verb and does interact with what is inside of my game interactive scene... One issue at a time though, I need to figure out why the main menu is unresponsive.

    Ugh... I'm so frustrated and am running out of ideas of what to try next. The system cursor still overrides whatever is happening in the game preview btw, if that matters.

    I know the script instructions said, " So once the Rewired actions are setup you can delete your Unity inputs (in unity's input manager)." To avoid them "fighting" which is what I'm guessing the system mouse situation is. But you can't do that, because it literally breaks ReWired as it deletes EVERYTHING in there and I see nothing differentiating ReWired's entries from Unity's.

  • Ok I removed the mouse mapping from Player0 inside of ReWired, this has made it so the game cursor does not move with the mouse and only with the joystick and keyboard. So that's good. However, sadly the system cursor is still the only thing that interacts with the "Click to Start" "New Game" "Load" and "Options" buttons. Reason? Unknown. Quit still works with the game cursor as does the in-game menu. The only thing I can think of is the fact that were are buttons that call on actions scripts, while the game menus are buttons that are tied to AC Menus.

    For instance, the QUIT Button is throughout the game on the left-hand corner and used inside the AC "InGame" menu. Inside the game is a menu called "Interaction" and that holds a Unity Ui in Scene that contains the verb commands linked to buttons, which all respond to the game cursor as well... So... Is there a way to make this respond to just the buttons? Or is this a situation where I'm going to have to try and recreate this in AC menu to get it to work at all?

  • Oh and if it matters the system cursor cannot interact with the quit button. It's like they are on two separate systems or something.

  • Wait... What if "On Click()" isn't counting a button InteractA button push (or whatever the heck it's called for select) as a click... I wonder if that could be what's going on...

  • Dang... Well if that was the issue then the navigation buttons wouldn't function in the main game as they are setup the same way... Jeeze... I am at a complete loss as to why this is unresponsive!

  • Well... 10:47pm over 10 hours dedicated to getting this mess to work. F me. This sucks. I'm out of ideas, I even tried making a new AC menu linking to the main menu buttons, didn't work. I looked at the menu items that worked in other scenes, recreated them in the main menu, doesn't work. No idea... Jeeze... I have no idea why these buttons only respond to the system cursor and why the other ones only respond to the keyboard and switch. It officially makes no sense to me at all. And now another work week begins so I'll have little time to experiment, UGH.

  • 11:17pm, ok did the stupidest workaround ever. I used a hotspot to trigger the Press Start button to get the main menu to appear... Not sure how I'm going to get the buttons to hover animate since they are unresponsive to the keyboard controller, but I can at least get them to click and trigger by using hotspots as a horrible workaround. I wish I understood what the hell has gone wrong here... Well, need to go to bed have to be at work at 8am. What a frustrating weekend

  • edited March 1

    Sorry for the trouble.

    To help clarify where things stand as of now, can you describe exactly what's working vs what's not? Are AC menus working, while not Unity UI? Are movement and interactions working outside of menus?

    A screenshot of your Settings Manager will also be helpful to understand how your game is intended to be played.

    InteractA button push (or whatever the heck it's called for select)

    It's InteractionA. Are you using the integration script provided by the wiki (linked to in my first reply), or a custom one?

    About play style: AC doesn't limit the cursor to just the mouse - when using Keyboard Or Controller input, it's still possible to rely on a simulated cursor by defining inputs named CursorHorizontal and CursorVertical. Are you looking to navigate menus using a simulated cursor, or directly?

    If you need to make changes to the way your game is played, it may be worth taking Rewired out of the equation for the moment, and amending AC's Settings to suit.

    One other thing to bear in mind is that AC relies on its own Input Module to provide direct and simulated cursor control over Unity UI menus. This is the Optional Mouse Input Module, and is spawned in automatically unless you override it with your own EventSystem. Are you looking to use your own, or is it possible yours is being inadvertently overridden?

  • Hi I used the integration script provided.

    I also did use InteractionA, I just couldn't remember what I had put in when writing my post.

    I'd prefer to be navigating menus via Simulated Cursor, I believe.

    I am using Rewired only because it was supposed to be the easiest method to get controls working on the Nintendo Switch.

    There are no changes to the gameplay mechanics or controls in the game port-wise, outside of the analog sticks and d-pad replacing the mouse axis movement and the buttons replacing the right and left click and the +, - used for pulling up the pause screen menu. That's the some total of changes.

    I cannot see a difference between these main menu buttons and the rest of the buttons elsewhere in the game... I don't understand. I'm at the point where I might just use hot spots to hack around this issue (the worst way imaginable), since the rest of the game seems to be functional. At least from what I've tested on the PC or exported to the device.

    I also thought it might be because it was Unity UI, but then when I redid them in AC they again didn't work. Which has left me perplexed and I undid the changes.

    I'll try to get you a screenshot of my settings ASAP

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.