2015년 4월 29일 수요일

NGUI 2.7 레이블 인스펙터 버그

 던전워즈
유니티 4.3버전이상사용시 NGUI 2.7버전을 사용하면 Label인스펙터에 프로퍼티들이 겹쳐서 사용하기 매우 곤란해진다.


물론 NGUI최신버전을 사용하면 되겠지만
다른 프로젝트에서 3.X대의 NGUI를 사용해본결과 매우 사용하기 불편하게 바뀌었다.
그래서 계속 NGUI2.7 버전을 사용중인데

레이블 인스펙터쪽 버그를 어떻게 할 수 없는지 검색해보다 다음과 같은 해결책을 찾았다.

원문 : http://www.tasharen.com/forum/index.php?topic=6808.0

That did it:)

If someone else wonder what to do, then here is what I did:
1) Find the script "UILabelInspector.cs"
2) Search for the code line: "GUILayout.Label("Distance", GUILayout.Width(70f));"  (somewhere around line 100)
3) Add this line above it: "GUILayout.Space(16f);"

The code section should now look like this:
   ...
   if (mLabel.effectStyle != UILabel.Effect.None)
   {
      GUILayout.Space(16f);
      GUILayout.Label("Distance", GUILayout.Width(70f));


내용을 보자면 그냥 UILabelInspector.cs 파일을 찾아서 안에 보면  

"GUILayout.Label("Distance", GUILayout.Width(70f));" 라는 부분이 있는데

해당 코드 바로 위에

"GUILayout.Space(16f);"
코드를 추가하면된다는 거다.

해보니 잘되는듯하다.