[NGUI] 한국어 word wrapping

유니티 2015. 9. 17. 16:36 Posted by friday13th

NGUI UILabel에서 Word Wrapping이 안됨..

(해결법)

NGUIText.cs 파일내 아래와 같이 수정


// Run through all characters

for (; offset < textLength; ++offset)

{

char ch = text[offset];

//if (ch > 12287) eastern = true;  //주석치리

            if (ch > 12287 && !(ch >= 44032 && ch <=55215 ) ) eastern = true;      // 수정 (한국어제외)


// New line character -- start a new line

if (ch == '\n')

{

if (lineCount == maxLineCount) break;

remainingWidth = regionWidth;


// Add the previous word to the final string

if (start < offset) sb.Append(text.Substring(start, offset - start + 1));

else sb.Append(ch);


lineIsEmpty = true;

++lineCount;

start = offset + 1;

prev = 0;

continue;

}