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(); }
private void Awake() { if (instance != null) { Destroy(gameObject); return; } else { instance = this; DontDestroyOnLoad(gameObject); ReadProperties(); } }
private void Awake() { if (instance != null) { Destroy(gameObject); return; } else { instance = this; DontDestroyOnLoad(gameObject); } SceneManager.sceneLoaded += OnSceneLoaded; _langResolver = FindObjectOfType <LangResolver>(); }