Forum rules - please read before posting.

HUD menu

Hi,
I made Unity UI Prefab menu used as HUD with timer and buttons, it is turned on thru actionlist and works fine, but when you click InGame Menu it is turned off, then after Resume it is not turned on

Is it a normal behaviour, am I supposed to turn it thru script, like delegate after game state change?
Any other way? 

Comments

  • What is its Appear type property, and how are you turning it on exactly?

    If you wish for it to appear during gameplay, change this property to During Gameplay.  You can use the Menu: Change state Action to lock the Menu when you don't want it to appear during gameplay, and unlock it when you do.

    Otherwise, if you need it to be set to Manual, then you can have it sync with the InGame Menu by defining an ActionList when turn on asset for InGame, and giving it a Menu: Change state Action to turn on your HUD Menu.
  • Thx, Appear type is the why to go,

    but next thing:
    for example I have HUD Menu as Unity UI Prefab with two object 
    1. text
    2. button
    I want to change source image of button at runtime, how to do it?

    I see prefab is instantiated as all of menus into DontDestroyOnLoad 
  • Since it's drawn with Unity UI, the image is set directly within the UI prefab - not within AC's Menu Manager.

    You can either control it through script, or just add an Animator component and create animations with different images on the button.

    You can then use the Object: Animate Action to control the animation playback through AC ActionLists.  Just be mindful that in order for the the Action to reference the Animator, you'll need a Constant ID component with Retain in prefab? checked (since the UI is a prefab spawned at runtime).

    To assign it, drag the prefab into the scene, assign the Animator field in the Object: Animate Action.  This Action should live in an ActionList asset.  When the Animator field is assigned, the Constant ID component will be automatically assigned - you then just need to select it and check Retain in prefab?, click Apply at the top of the Inspector to update the prefab, and remove the UI from the scene.
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.