void OnChangeLanguage(LanguageManager thisLanguageManager) { GameObject atlasPrefab = thisLanguageManager.GetPrefab(localizedKey); if(atlasPrefab != null) { UIAtlas atlasObject = atlasPrefab.GetComponent<UIAtlas>(); if(atlasObject == null) { if(thisLanguageManager.VerboseLogging) Debug.LogError("No UIAtlas was found with key:" + localizedKey); } else { uiSprite.atlas = atlasObject; } } }
void OnChangeLanguage(LanguageManager thisLanguageManager) { GameObject atlasPrefab = thisLanguageManager.GetPrefab(localizedKey); if (atlasPrefab != null) { UIAtlas atlasObject = atlasPrefab.GetComponent <UIAtlas>(); if (atlasObject == null) { if (thisLanguageManager.VerboseLogging) { Debug.LogError("No UIAtlas was found with key:" + localizedKey); } } else { uiSprite.atlas = atlasObject; } } }