Forum rules - please read before posting.

Conditioning the display of a graphic element in a menu

Hello, I would like to know if it is possible to display a different graphic in a menu depending on the selected language?
For example, if the language is French, I'd like to display Book_page_Fr.png , for the english Book_page_Eng.png

Thanks

Comments

  • Rather than using a Graphic element, if your Menu uses Unity UI then you can use a short script to alter an Image component's sprite based on the language index:

    using UnityEngine;
    using UnityEngine.UI;
    using AC;
    
    public class LanguageSprite : MonoBehaviour
    {
    
        public Sprite[] sprites;
        public Image image;
    
        void Update()
        {
            var languageIndex = Options.GetLanguage();
            image.sprite = sprites[languageIndex];
        }
    
    }
    
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.