GetTexture() 공개 메소드

Gets the texture for the current language, returns null if nothing is found
public GetTexture ( string key ) : Texture
key string /// Key. ///
리턴 Texture
예제 #1
0
    private void ChangeSprite()
    {
        Texture2D texture = languageManager.GetTexture(Key) as Texture2D;
        Rect      rec     = new Rect(0, 0, texture.width, texture.height);

        image.sprite = Sprite.Create(texture, rec, Vector2.one, 100);
    }
예제 #2
0
    public Sprite getTexture(string key)
    {
        Texture2D tempText = languageManager.GetTexture(key) as Texture2D;
        Rect      rec      = new Rect(0, 0, tempText.width, tempText.height);
        Sprite    tempSpr  = Sprite.Create(tempText, rec, new Vector2(0.5f, 0.5f), 100);

        return(tempSpr);
    }