Forum rules - please read before posting.

Change Menu Graphic by ActionList or Variable


I am creating popups for different tutorials during the game. I have learned to change the text of the pop up menu using a Global Variable, it is very useful and simple. But I would like to illustrate each tutorial pop up with an explanatory image. I can't find a way to change the image for each case.

Thanks for all.


  • A brute-force way would be to create a Graphic element for each image, then show/hide them along with the text - but it'd be unwieldy if you had many.

    If you have your Menu rely on Unity UI for its rendering, though, you can make use of Unity's Animation system to animate which sprite is displayed in an Image component. If you then wire up transitions so that changing e.g. an Integer parameter in the Animator Controller causes a different sprite to show, you can then use the Object: Animate Action to control that parameter's value.

    See the Manual's "Unity UI menus" chapter for details on how Unity UI prefabs can be connected to AC's Menu system.

  • Thank you! First option works fine. I have around 15 different pop ups. I put 15 actions in the pop up close button for close all images each time.This way when I clic close I´m sure of the graphic turn hide and I only have to worry about show the next graphic when I want.

    Maybe it´s a weird method but it works for me! :D

  • 15 must be difficult to manage!

    While I recommend the Unity UI Animator method, if you're relying on an AC menu, then you can also change the graphic through script:

    Texture2D myNewTexture;
    MenuGraphic myGraphic = PlayerMenus.GetElementWithName ("MyMenu", "MyGraphicElement") as MenuGraphic;
    myGraphic.SetNormalGraphicTexture (myNewTexture);
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.