Forum rules - please read before posting.

Prevent AC from updating Text components

edited October 2024 in Technical Q&A

Is there a way to prevent AC from setting the text in a Text component for a MenuElement that is hooked up to an AC menu?
I am using the i2Localization plugin to translate my game's text and do not want AC's translation system to touch any of the text in the game's menus. When I try to change the game's language AC is overriding the changes made by the i2Localization scripts. The i2Localization script changes the text, but immediately AC changes it back to what it was originally. Several of my menus are hooked up through AC and I would like to keep it this way since it would be too much work at this point to change everything (some of the menu elements are being set to be visible or hidden in scripts).
So I was wondering if there's a way to comment out some of the functionality so that AC will ignore updating Text components? Most of my game's menu gameobjects are hooked into a Label or Button menu element.

I am on AC 1.75.2.

Thanks!

Comments

  • AC will affect objects in the UI that are specifically linked as elements in the Menu - but you don't need all such objects to be elements if you don't want them to be affected.

    If you keep the Text component, but remove its associated Label element, then AC won't affect its display other than when the Menu itself is shown.

  • Thanks, Chris!
    I had to go one step further and comment out the uiText section of the PreDisplay method in the MenuButton script since I didn't see a way to remove an object from a Button element without losing the functionality of the button as well as the text override connected with the button. Just FYI for anyone else that might find it helpful.

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.