Forum rules - please read before posting.

Direct Menu Navigation using Gamepad with CombatExample

So I downloaded the combatexample package. Everything is working great except for Unity Prefab menus. I can directly navigate the AC menu but when I create a prefab for say, Conversations which has two dialog options, it will no longer auto-navigate with the gamepad. I've done an extensive look here on the forums and tried everything I came across. I have the latest version of AC but I can't get this feature to work. HELP!!!

«1

Comments

  • edited February 2022

    Welcome to the community, @GameJunkyMonkey111.

    Is the issue that the first option is selected, but the second cannot be selected - or that neither are selected in the first place?

    At the time that the issue occurs, locate the EventSystem object in your Hierarchy - at the bottom, it'll display the name of the currently-selected object. What does it read?

    If you haven't already, see the Manual's "Navigating menus directly" chapter. When it comes to Unity UI menus, it's necessary to specify which element is the first to select, which you can do at the bottom of the Menu's properties in the Menu Manager.

    Checking Auto-select first visible Element? is typically enough, but I would need to see your set-up before I can give more specific advice.

    If the above doesn't solve things, share screenshots of your Menu's properties, the UI prefab involved, and your Settings Manager if you've modified it from the one supplied in the CombatExample package.

  • No modifications of the CombatExample package. As for what you suggested I have tried everything and then some. My setup is simple. I take the interaction menu given and change it to Unity UI Prefab, supply my prefab, which has two buttons for choices. Once I do this the system ceases to work. I can swap back to AC menu and it goes back to working.

  • edited February 2022

    I would still need to see the specifics of your project.

    If necessary, you can PM me a .unitypackage of your updated Menu Manager and UI prefab for me to examine.

  • I believe I have recreated the issue, @GameJunkyMonkey111.

    Find the Conversation menu's "ActionList when turn on" asset file, Interaction_TurnOn, and set its When running property to Run In Background.

  • It works only if I'm using the default AC menu. Is there something in the Prefab I'm setting wrong? Its just two buttons. and the select element has been set in all configurations I could try.

  • How would I go about getting my unity package to you to look at?

  • See my third reply above about a potential fix.

  • 3rd reply didn't work.

  • You've set the Menu's "When turn on" ActionList to run in the background? That solves the issue on my end.

    Inside this ActionList, you can force the selection by adding a Menu: Select Action and entering in the menu's details.

    If you want to send me your project, zip it and upload somewhere e.g. Dropbox, and then PM me a link to it. You can send PMs via the "Message" button on a user's profile page.

  • https://github.com/DedHedStudios/Nightmares/tree/main

    There it is Chris. Let me know if you can find the problem. I'm gonna keep tinkering with it and see if I can find the issue.

  • I don't know. I've tried everything I can think of to get this to work with no results. As long as I use AC menu it works but Prefab UI will not.
    So at this point there is no way I can finish my game with AC. Its a great system, but this pretty much stops everything for me.

  • Do all the menus have to be converted to Prefabs for it to work or can I have only one that is a prefab? Right now i have subtitles as a prefab and it works. I just cant navigate menus with a controller. Only a mouse.

  • edited February 2022

    this pretty much stops everything for me.

    Rest assured, we'll get to the bottom of this. It'll likely be down to a small detail, so it hopefully won't require any drastic change/fix, but it does make it harder to find.

    I have imported your package, but it works on my end. I did have to move the Buttons up so that they could be viewed on-screen, but they were directly-navigable for me.

    If the buttons are visible for you but not navigable, this typically means that the game is in a Cutscene at the time that the menu is shown. This was the issue with the "Interaction_TurnOn" menu that I mentioned before, but it's possible that the game may be in a Cutscene in your own scene.

    Are you having this behaviour with the package's example scene when you grab the key on the wall?

    I think I would need to see your entire project to work out the issue, if so. You're welcome to zip it up and sent it over, but please do so as a PM so as not to make AC publicly available.

    Do all the menus have to be converted to Prefabs for it to work or can I have only one that is a prefab?

    They can be mixed and matched, however "AC" menus are rendered with Unity's OnGUI system and as such will always be drawn on top of Unity UI menus.

  • edited February 2022

    My project zipped up is over 5 gig. Sorry to say I'm limited on storage space and bandwidth. So that's a no go.
    I can see the buttons and I can navigate them using the mouse, but not with the game pad. Soon as I swap over the AC menus they work perfectly. Only problem is the style of the menu is wrong for my game. From the screen shot you can see the interactions settings. I'm not sure what you mean by move the buttons up? The interactions and conversations menus are as the screen shows while the game is running. I set them to Run In Background and Pause game and neither method works. In either method I can still use the mouse.
    What do you mean by Cutscene? What constitutes a cutscene? I simply have a hotspot that calls for the player to enter a room. Two choices, yes or no. This brings up the Conversation menu but no dice on selecting a choice via game pad.
    I posted pics of some screen shots on the github at my project if you wanna go look.

    (https://github.com/DedHedStudios/Nightmares/blob/main/conversation1.jpg "")
    (https://github.com/DedHedStudios/Nightmares/blob/main/conversation2.jpg "")
    (https://github.com/DedHedStudios/Nightmares/blob/main/conversation3.jpg "")
    (https://github.com/DedHedStudios/Nightmares/blob/main/conversation4.jpg "")

  • edited February 2022

    Thanks for the images. What of the Interaction_TurnOn asset? Have you tried adding a Menu: Select Action to force the selection?

    It should be possible to omit the Library folder from the zip, which should bring the size down if it comes to it.

    I'm not sure what you mean by move the buttons up?

    On my end, the buttons weren't visible because they were positioned off-screen. That may just be a case of differering screen resolutions, however.

    What do you mean by Cutscene? What constitutes a cutscene?

    AC will enter "cutscene" mode whenever a gameplay-blocking ActionList is running. From your screenshots, however, it looks like that shouldn't be an issue.

    Please see my question above about testing in the CombatExample's provided example scene.

    Be sure to check also the Console window for any relevant messages. If you're able to select the Conversation options with the mouse, then that suggests it's actually an EventSystem issue.

    AC relies on its own EventSystem object in order to handle the direct-navigation of UI menus. However, if there is already an EventSystem in your scene then that will override it - though you should be getting a warning in the Console regarding this.

  • The CombatExample scene ceases to function if I use prefabs. I found that I did in fact have an EventSystem in the scene so I removed it. Still not working. Think I'll just delete this and forget the whole thing. Nevermind. Just wasting my time on this thing.

  • I understand your frustrations, but I am here to help. I do need you to share the details I'm asking for, however.

    Please see my comments above regarding the Interaction_TurnOn asset, and the contents of your Console window.

    Without the Library folder, the project zipped up will be less than 5Gb. Both DropBox and Mega.io should be able to provide you with enough space to send be the project zip.

  • I sent PM'ed you a link Chris, Thanks for the help.

  • So now my aim animation quit. This is the error I'm getting:

    "Animator.GotoState: State could not be found
    UnityEngine.Animator:CrossFadeInFixedTime (string,single,int)
    AC.CombatExample.PlayerCombat:SetAimState (bool) (at Assets/AdventureCreator/Downloads/Combat example/Scripts/PlayerCombat.cs:325)"

    It just popped up all of a sudden. Not sure what I changed.

  • edited February 2022

    It's trying to play the Player's "Empty" animation in the first sub-layer (UpperBody) of their Animator. Check that this is still present in the Animator Controller.

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.