Unity는 최신 .NET 런타임을 지원합니다. .NET 런타임을 사용하는 경우 다음과 같은 문제가 발생할 수 있습니다.
안정적인 스크립팅 런타임은 레거시 스크립팅 런타임보다 큰 .NET 클래스 라이브러리 API와 함께 제공됩니다. 따라서 코드 크기도 더 큰 경우가 많습니다. 이 크기 증가는 특히 크기 제약이 있는 AOT(Ahead-of-Time) 플랫폼에서 중요할 수 있습니다.
코드 크기 증가를 완화하는 방법:
가능한 한 가장 작은 .NET 프로파일을 선택합니다(.NET 프로파일 지원 참조). .NET Standard 2.0 프로파일의 크기는 .NET 4.x 프로파일 크기의 절반 정도이므로 가능한 경우 .NET Standard 2.0 프로파일을 사용합니다.
Unity 에디터의 Player 설정에서 Strip Engine Code 를 활성화합니다(Edit > Project Settings 로 이동한 다음 Player 카테고리 선택). 이 옵션을 선택하면 프로젝트의 관리되는 코드가 정적으로 분석되고 사용되지 않는 코드가 제거됩니다.
참고: 이 옵션은 IL2CPP 스크립팅 백엔드에서만 사용 가능합니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.