Forum rules - please read before posting.

UI Toolkit integration

Will there be an integration with the new UI Toolkit (https://docs.unity3d.com/Manual/UIElements.html ), maybe when it's out of preview? Or at least a way to integrate it yourself?

Comments

  • I'm still investigating how feasible a direct integration (i.e. within the Menu Manager) would be - it's a very different workflow.

    It's still possible to integrate things indirectly, however, since the click reactions for AC UI elements have are all publicly accessible through script.

    For example, the equivalent of a Button that runs an ActionList asset would be a click event that invokes an ActionListAsset's Interact function.

    Elements that control variables can also be adapted in this way - see the Manual's "Variable scripting" chapter for details on accessing variables through script.

    Inventory lists would be the most difficult type of element to recreate, but this data too is publicly accessible via AC.KickStarter.runtimeInventory.PlayerInvCollection.

    Things also get tricky when dealing with translations. If it's separated from the Menu Manager, it'd be a case of writing a custom ITranslatable class (to allow for gathering up in the Speech Manager - see the Manual's "Custom translatables" chapter), and then hooking into the OnChangeLanguage custom event to react to the user changing the game's language.

  • Thanks for the answer!
    Setting up button actions seems to be pretty straightforward, I'm glad that we can combine UI Toolkit and AC, it's such an amazing tool.

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.