Forum rules - please read before posting.

Showing and hiding text elements...

Im having trouble with what I thought should be something simple...
At certain points in my game, i want to cut to a screen with a paragraph of text that sets up the next chapter of the game.
I cant seem to figure out how to show that block of text, wait a few seconds, then make it disapear and replace it with another block of text without player input.

I can create a ui text object, but I dont seem to be able to have any control over it.

What am I missing?

Comments

  • I think this is something you should do out pretty simply outside of AC and directly into Unity.(There are methods for disabling AC temporarily).

    So, if the text is static, you could even just have a fade-in and fade-out fullscreen PNGs, animated through Mecanim or coroutines, while if you want to have dynamic text just throw the UI component in a parent Gameobject that you will SetActive(true) at the right time. 
  • You can do this using AC's Menu system - if you create a Menu with an Appear type set to Manual, then you can control when it is displayed using the Menu: Change state Action.

    By default, AC Menus are drawn using it's own built-in system rather than Unity UI.  This mode (i.e. a Menu's Source is set to Adventure Creator) is best used for protoyping functionality, and you can then switch to a Unity UI-based Menu once it works the way you want.  Switching over to Unity UI is generally just a case of creating a UI prefab and linking each element up to AC.

    You can find a series of tutorials on the Menu system here, including one on integrating AC with Unity UI.
  • I attempted using the menuu system, but when I tried to enable/disable the menu (or hide/show elements) within an On Start cutscene, nothing seemed to happen. The text remained visible.

    I am brand new to this so I will attempt to dig into the tutorials a little deeper.
  • What kind of UI are you using? AC UI or UGUI? If you are using UGUI you need to make sure the menu has been setup properly (and if you are using prefabbed canvas you must make sure there are no copies in the hierarchy, cause AC does the instantiation and everything). If you are using UGUI, It would probably be a good idea to look at the written tutorial on how to setup UGUI in AC. If you are not using UGUI, it might be a good idea to post screenshots of your menu settings (from the menu manager) and also a screenshot of your actionlist (if you try to setup your UGUI and still have issues, do post screenshots anyway).
  • I would recommend relying on using AC's UI first until it all works as intended - and only then porting it to Unity UI.

    Let's see some images of your setup so that we can advise more specifically.  You'll need to make sure you have a correct Appear type setting, as if its set to e.g. During Gameplay, then turning it off will have no effect - since the "rules" of it's display still apply.

    In cases like that, you can use the same Menu: Change state Action to lock the Menu - which prevents it from showing when it's display rules apply - but again, if you want to share some images that detail what you've done, it'll be easier to give more direct advice.
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.