예제 #1
0
    private void Start()
    {
        _langButtonImage = FindObjectOfType <LangButton>().GetComponent <Image>();
        _langResolver    = FindObjectOfType <LangResolver>();
        _langResolver.ResolveTexts();

        foreach (var sprite in Resources.LoadAll <Sprite>("LanguageImages"))
        {
            _langImages[sprite.name] = sprite;
        }

        ResolveLangImage();
    }
예제 #2
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         return;
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
         ReadProperties();
     }
 }
예제 #3
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         return;
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     SceneManager.sceneLoaded += OnSceneLoaded;
     _langResolver             = FindObjectOfType <LangResolver>();
 }