GetPrefab() 공개 메소드

Gets the prefab game object for the current language, returns null if nothing is found
public GetPrefab ( string key ) : GameObject
key string /// Key. ///
리턴 GameObject
예제 #1
0
 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;
         }
     }
 }
예제 #2
0
    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;
            }
        }
    }