요즘엔 UGUI를 쓴다지만, NGUI를 사용하는 라이브도 많다면.. 사용하는 법을 알긴 하고 있어야 하지 않을까!
* 유료버전
https://assetstore.unity.com/packages/tools/gui/ngui-next-gen-ui-2413?locale=ko-KR
NGUI: Next-Gen UI | GUI 도구 | Unity Asset Store
Use the NGUI: Next-Gen UI from Tasharen Entertainment Inc. on your next project. Find this GUI tool & more on the Unity Asset Store.
assetstore.unity.com
* 무료버전 (2.7)
https://www.tasharen.com/?page_id=140
에서 받기 가능
Script Updating Consent에서.. 아마도 Yes, just for these files 를 선택했더니 에러가 6개가 떴다
* NGUITools
* NGUIMath
* UIAnchor
* UIPanel
RuntimePlatform.WindowsWebPlayer 나 RuntimePlatform.OSXWebPlayer은 유니티 5.4이상 버전에서 지원되지 않는다고 한다.
그래서 해당 부분의 코드들을 WebGLPlayer로 전부 바꿔줬다.
아예 주석처리하고, NGUITools는 return true로 해도 될 것 같았지만 안전하게 기존 스크립트와 비슷하게 변경했다.
에러를 다 수정해주고 나니, NGUI탭이 생겼다!
NGUI 공부 준비 완료!
처음에 NGUI 패키지를 임포트하고, 에러가 뜨고 에러 내용을 해결하기 전까지 '어.. 내가 이거 해결할 수 있으려나..?'라는 의문을 가졌었다.
코드 수정없이 사용하려면 버전 몇을 사용하면 되지?라는 궁금증이 있었는데, 오류를 다 해결했지만 찾아보기로 했다.
* 최근 Unity RuntimePlatform
https://docs.unity3d.com/2022.3/Documentation/ScriptReference/RuntimePlatform.html
Unity - Scripting API: RuntimePlatform
Note: The difference between using RuntimePlatform and Platform dependent Compilation is that using RuntimePlatform is evaluated at runtime while Platform dependent Compilation is evaluated at compile time. So if you can use platform dependent compilation,
docs.unity3d.com
5.4는 언제 나온 버전일까.. 하고 검색해봤더니 2016년이었다
https://unity.com/kr/releases/editor/archive
Download Archive
Download Archive
unity.com
해당 페이지에서 5.X를 클릭했다
...
유니티 5 이하 버전은 제공되지 않는다는 걸 알았고..
8년 전 유니티를 사용하면 코드 수정을 하지않고 NGUI를 사용할 수 있다는 결론이다
'공부 > Unity' 카테고리의 다른 글
[unity]canvas 위에 보이는 클릭/터치 이펙트 구현 - 2 (0) | 2024.05.27 |
---|---|
[unity]canvas 위에 보이는 클릭/터치 이펙트 구현 - 1 (0) | 2024.05.26 |
[unity/모바일]화면 꺼짐 방지 (0) | 2024.04.25 |
[unity]콜라이더 연산 처리 속도 순서 (0) | 2024.03.21 |
[unity]Invalid Android NDK directory 해결 (MAC에서 Android NDK 설치하기) (0) | 2024.03.09 |