Forum rules - please read before posting.

Menu Display Issue

How can I make menus that are supposed to show up "During Gameplay" also show up when a cutscene's "Running in Background" option is also checked?

Comments

  • For context -- there's a menu that I want to display for a few seconds, and then have it disappear. This is running in an actionlist.

    However, this should not prevent the player from gameplay, nor should it prevent other menus that are checked as "During Gameplay" from not showing, when this temporary pop up menu is showing up.

    Might there be any insight on how I can achieve this?
    Thank you!

  • edited May 10

    Also -- in case it may help with context, this is in the same repository link as the other issues I mentioned (you can download the latest from github).

    This is also in the "Instructions" scene of my game at the beginning. More specifically, I'm running this in the cutscene titled "Cutscene" in my game. This references an ActionList Asset (called "Objective_Added") which is supposed to trigger this menu.

    My expected behavior for how this menu should be happens when I press "c" -- the player bar at the top right gets loaded, while the "objective updated" message at the top-right shows up in the background without preventing the player from moving around.

    However, when the cutscene gets played normally (without pressing "c" to endCutscene), it causes the menu with the "objective updated" message to to show up without the player bar popping up (i.e. the inventory, objectives, and settings button with the backing panel), and then forces me to wait until it disappears again.

    Wondering how I can get the behavior when I press "c" to happen just as well when I regularly play out the cutscene.

    Any help is appreciated, thank you! :)

  • An ActionList running in the background won't cause a "gameplay" menu to disappear - check that there isn't anything else running at the time.

    The best way to debug such situations is to enable the "AC Status" box at the bottom of the Settings Manager. This'll show the game state in the upper-left corner of the Game window - as well as any currently-running ActionLists.

  • edited May 10

    @ChrisIceBox It's not disappearing, but rather it's asking me to wait until the menu appears.

    So the "running in background" isn't working as expected (from the original post). I want the "objectives updated" menu to overlay the player bar for ~3ish sections and allow the player to move freely, but this only happens when I press "c" as opposed to letting it run normally.

    The latest repo on GitHub should have this behavior in case you wanted to see specifically what i'm referring to -- the steps to replicate are in my post above in case that may clarify things.

  • edited May 10

    Your Actionist: Run Action has Wait until finish? checked - meaning Cutscene is still running until Objective_Added completes.

    The AC Status box reveals this - in any such situation, it's the best first port of call.

  • Aha! Good to know for the future, thank you! :)

  • Also on a sidenote -- it looks like the Info_Added actionlist (renamed from Objective_Added) is having another issue (I'm trying to play an animation on a UI element, but it looks like it never plays).

    I tried to set the animation as the default layer -- and it seems to be fine (jsut as a sanity check).

    However, when I create an action to play this animation using Sprites Unity (this seems to never play). The condition for the animation is met to play as well (had a temporary dialogue option after the animation to test this out).

    Additionally, I'm not getting any warning or error logs, so I'm not sure where to look.

    Is there anything else I should be looking into? If you would like the context, it's the same repo (updated today with my changes!)

    Thanks!

  • edited May 12

    Use the "Mecanim" engine - "Sprites Unity" is best used for 2D characters. Check also the Action references the object via a Constant ID that's persistent.

    If the game is paused at the time, you'll need to have the Animator component run in Unscaled Time.

  • @ChrisIceBox Tried out these recommendations but it didn't seem to change anything unfortunately -- looks like it is referencing the object via Constant ID as well -- is there anything else I can look into?

    I'm still not getting any warning / error logs so unsure where to go from here.

    Thank you!

  • If you're not getting warnings, it may be that AC considers the Animator to be correctly found, and it's the Animator not playing correctly somehow.

    What is the playback state of its Animator window at the time? Share screenshots of the window, the Animator component, and the Action and I'll try to spot the issue.

  • The Menu becomes disables while the speech plays - if the Action is run during this time, it won't be able to locate the object.

    Does it work if you omit the speech / all else before the Animate action?

  • Unfortunately not

  • Was playing around with it a bit this evening -- it looks like changing the PlayerBar menu from Appear Type: During Gameplay to Appear Type: Except When Paused plays the animation correctly.

    However, I don't want the menu to show up during conversations / cutscenes, which is my issue. It should only show up during gameplay as it currently is.

    Another thing -- I also noticed that when the UpdateDescription **menu is on (the one with the "Objective Updated" message that shows up on the top right), I'm unable to click any of the other buttons. I don't have **pause game when enabled set for this menu (the UpdateDescription menu), so unsure what may be going on.

    Is there anywhere else I should look?
    Thanks!

  • However, I don't want the menu to show up during conversations / cutscenes, which is my issue. It should only show up during gameplay as it currently is.

    The Animator will need to be enabled (i.e the Menu be turned on) at the time the Action is run.

    This may not be necessary with v1.81 - as this adds an option to "Remember Animator" that causes state changes to be retained when disabled. I haven't tested this use-case, however.

    If you end up needing to change the "Appear type", you can still prevent the Menu from showing when unwanted by locking it. This can be done at runtime using the Menu: Change state Action's Lock Menu command.

    when the UpdateDescription **menu is on (the one with the "Objective Updated" message that shows up on the top right), I'm unable to click any of the other buttons.

    Check the AC Status window to see if gameplay is blocked. Menus aren't generally clickable during this time unless specifically set to be in their properties.

    Otherwise, check that the Menu's "RectTransform boundary" - if using Unity UI - doesn't cover more than its visible portion of the screen. Clicks detected on this area will be "consumed", preventing clicks underneath.

  • Sounds good, thank you!

    Out of curiosity -- is there a way that I could disable / hide a menu (A) that has its appear type to "on hotspot" until another menu (B) fully transitions to closed / invisible?

    I'm wondering if this is possible since this is the behavior I'm getting at the moment. The "on Hotspot" menu -- which displays the words "Entrance to the mansion." shows up in the background when my UpdateDescription menu is on.

    I tried to lock the "on Hotspot" menu in the turnon and turnoff actionlist asset menus of Update Description, but it didn't seem to change anything.

    Might you happen to have any ideas?

    This is a video of the issue for reference:
    https://drive.google.com/file/d/1AQPzWAgIT9xymj57rFpaShcRGg6kJ8-B/view?usp=drive_link

    Thank you!

  • Try explicitly turning off the Menu after locking it - the lock should prevent it from turning on again, but may need to be turned off for it to take effect.

    If the two Menus are in the same place, though, you could try giving the description label a background colour that matches the UI behind it, so that it masks any Hotspot text that may be present - avoiding the need to lock the Hotspot menu in the first place.

  • Went ahead and tried the first thing -- I think the issue is that the "on Hotspot" menu still shows up while the Update Description menu is fading out.

    Is there a way I can prevent it from showing up even while it fades?
    Thanks! :)

  • Also for the second thing -- ah yes I do have the texture I believe! The only thing is that the menu shows up while the first one is still fading out, so the text behind it is still clear during that transition to off period.

  • How/when are you fading out the Hotspot description menu? You'll want to unlock the Hotspot menu only once the fade-out is complete.

    If you're doing this with an Action, you can do this by checking Wait until finish? in the Menu: Change state Action. If you're doing it through scripting, you can do it using a coroutine.

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.