Forum rules - please read before posting.

I Can't show first button in the second canvas

Editor Version: 2022.3.34f1c1
Adventure Creator Version: 1.83.0

I created two menus in the scene, each placed inside two separate canvases. The second canvas was created by copying the first one.

  • The first menu contains some text and works fine.
  • The second menu has two buttons. After hiding the first button using an Action, I cannot show it again using the "Menu Show Element" action, while the second button can be shown and hidden normally.

I tried recreating the second canvas and re-adding the menu, but the issue persists.

To temporarily resolve the issue, I changed the hide mode of the buttons in the second menu to "Disable Interactability," after which the buttons could be shown and hidden normally.

For now, I have to use a single canvas to bypass this problem.

Comments

  • The real problem occurs when an Action tries to open a menu that is already open in the scene. This causes the next Action (intended to show the first menu element) to fail.

    Request:
    Please check the robustness of the code and improve the logic. Even if a developer doesn't verify whether a menu is already open before trying to open it again, the system should not produce confusing errors.

  • By the way, I encountered an issue where menu sub-elements failed to display when I triggered an ActionList via Interact in the Start function of a custom component. Later, I realized a more appropriate approach is to configure the OnStart Cutscene directly in the scene, after which the menu sub-elements rendered correctly.

  • Welcome to the communirt, @chichinohaha.

    Attempting to turn on an already-visible Menu should't have an effect - naturally, if there is an issue here it will be addressed.

    I cannot reproduce any issue from your description, however - it may be that the issue lies with your specific Menu / UI prefab.

    If you can PM me a .unitypackage or zip file that contains your Menu Manager, the UI Canvas prefab(s), as well as a sample scene that demonstrates the issue, I can look into it further.

  • I created a 3D project with no character and no movement.
    I believe the issue is that my custom component interacts with a Cutscene during the Start() phase, when your engine isn't fully ready yet, causing incorrect menu display.
    Maybe you could add better editor warnings telling users not to execute ActionLists in the Start lifecycle.

  • Dear Adventure Creator Team,

    I'd like to inform you that I've emailed my .unitypackage file to hello@adventurecreator.org. Please check your inbox for this attachment.

  • I have no such message in my inbox - but if PM me a link to download, I can get it that way.

    You should be able to run Cutscenes from Start in a custom script, but you'll need to ensure your own script's Start function is called after AC's. Try setting your script's Default Execution Order to a positive value.

  • thank you ,i'm ok now
    haha

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.