Windows 플랫폼에서 DirectX 11 또는 12를 사용하면 Visual Studio를 사용하여 Unity 애플리케이션의 셰이더를 디버그할 수 있습니다. 이 페이지에는 이를 수행하는 방법에 대한 정보가 포함되어 있습니다.
참고: DirectX 12를 사용하는 경우, Microsoft는 Visual Studio가 아닌 PIX를 사용하여 셰이더를 디버그하도록 권장합니다. Windows에서 Unity에 PIX를 사용하는 데 대한 자세한 내용은 PIX를 사용하여 셰이더 디버그를 참조하십시오.
셰이더를 디버그하려면 디버그 기호가 포함된 상태로 셰이더를 컴파일해야 합니다. 이를 수행하려면 디버그할 각 셰이더의 소스 코드에 #pragma enable_d3d11_debug_symbols
지시문을 삽입하십시오.
경고: 이 pragma 지시문은 성능에 부정적 영향을 미칠 수 있으므로, 최종 빌드를 만들기 전에 셰이더 코드에서 제거하십시오. 이 pragma 지시문에 대한 자세한 내용은 셰이더 컴파일: pragma 지시문을 참조하십시오.
Windows 스탠드얼론용으로 애플리케이션을 빌드하는 경우, 플레이스홀더 Visual Studio 프로젝트를 생성해야 합니다. 유니버설 Windows 플랫폼용으로 애플리케이션을 빌드하는 경우, Unity가 사용자 대신 Visual Studio 프로젝트를 생성합니다.
Visual Studio를 설정하는 방법은 Microsoft 문서 Visual Studio 설치를 참조하십시오.
Visual Studio의 그래픽스 디버깅 툴을 설정하고 사용하는 방법은 Microsoft 문서 Visual Studio 그래픽스 진단을 참조하십시오.
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.