Forum rules - please read before posting.

How to disable a language in the options menu

Hi there,
Not sure if anyone has had to do this before, but I'm in a situation where one of the languages I've added to my game will only get released later.

In other words I have a total of 3 languages but I wish to disable one of them temporarily from the options menu. Is this possible without additional code? If not, any pointers to get started coding something like that (I'm not a coder but am willing to give it a try)?

Thx!

Comments

  • You could export a language and store it somewhere, remove it from AC, and then re-import it at a later time. So long as the ID numbers remain unchanged, you should be fine.

    However, through scripting, you could also hook into the OnChangeLanguage event to force the language when the one you don't want to use is assigned:

    using UnityEngine;
    using AC;
    
    public class SkipLanguage : MonoBehaviour
    {
    
        public int languageToSkip = 1;
        public int replaceWithLanguage = 0;
    
        private void OnEnable ()
        {
            EventManager.OnChangeLanguage += EventManager_OnChangeLanguage;
        }
    
        void EventManager_OnChangeLanguage (int language)
        {
            if (language == languageToSkip)
            {
                Options.SetLanguage (replaceWithLanguage);
            }
        }
    }
    
  • Nice! This is great. Thanks for the info Chris!

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.