UnityEngine.Font.RequestCharactersInTexture C# (CSharp) Method

RequestCharactersInTexture() private method

private RequestCharactersInTexture ( string characters ) : void
characters string
return void
        public void RequestCharactersInTexture(string characters)
        {
            FontStyle normal = FontStyle.Normal;
            int size = 0;
            this.RequestCharactersInTexture(characters, size, normal);
        }

Same methods

Font::RequestCharactersInTexture ( string characters, [ size, [ style ) : void
Font::RequestCharactersInTexture ( string characters, int size ) : void

Usage Example

コード例 #1
0
    public void FixBrokenWord()
    {
        if (chineseTxt == null)
        {
            TextAsset txt = allText;
            chineseTxt = txt.ToString();
        }

//		Debug.Log (chineseTxt);

        if (null == baseFont)
        {
            baseFont = (UnityEngine.Font)Resources.Load("msyh");
        }
        baseFont.RequestCharactersInTexture(chineseTxt, 16);
//
//		NGUIText.dynamicFont=baseFont;
//
//
        Texture texture = baseFont.material.mainTexture;                                                       // Font的内部纹理

        Debug.Log(string.Format("texture:{0}   {1}   {2}", texture.width, texture.height, chineseTxt.Length)); // 纹理大小

        //Debug.Log ("FixBrokenWord");
    }
All Usage Examples Of UnityEngine.Font::RequestCharactersInTexture