이 페이지에는 Unity가 사용하는 활성 렌더 파이프라인 설정에 대한 정보가 포함되어 있습니다. 이 정보를 사용하여 빌트인 렌더 파이프라인, 유니버설 렌더 파이프라인(URP), 고해상도 렌더 파이프라인(HDRP) 또는 커스텀 렌더 파이프라인으로 전환할 수 있습니다.
다른 렌더 파이프라인으로 전환할 때에는 프로젝트의 에셋과 코드가 새 렌더 파이프라인과 호환되는지 확인해야 합니다. 그렇지 않으면 오류 또는 의도하지 않은 시각 효과가 발생할 수 있습니다.
Unity 에디터에서 활성 렌더 파이프라인을 설정하면 Unity가 이를 사용하여 렌더링을 즉시 시작합니다. 여기에는 게임 뷰, 씬 뷰, 그리고 프로젝트 패널과 인스펙터에 표시되는 머티리얼의 미리보기가 포함됩니다.
활성 렌더 파이프라인을 빌트인 렌더 파이프라인으로 설정하려면 현재 스크립터블 렌더 파이프라인 기반 렌더 파이프라인을 사용하지 않고 있음을 Unity에 알려야 합니다. 프로젝트 설정에서 이에 대한 레퍼런스를 모두 제거하면 Unity는 빌트인 렌더 파이프라인 사용으로 다시 기본 설정됩니다.
이 작업을 수행하는 방법은 다음과 같습니다.
활성 렌더 파이프라인을 SRP 기반 렌더 파이프라인 중 하나로 설정하려면 사용할 렌더 파이프라인 에셋을 Unity에 알려야 합니다. 렌더 파이프라인 에셋은 사용할 렌더 파이프라인과 해당 렌더 파이프라인을 사용하는 방법에 대한 데이터가 들어 있는 에셋입니다.
동일한 렌더 파이프라인을 다른 설정으로 사용하도록 Unity에 지시하는 여러 개의 렌더 파이프라인 에셋을 보유할 수 있습니다. 예를 들어 고사양 하드웨어에 적합한 설정이 있는 렌더 파이프라인 에셋과 저사양 하드웨어에 적합한 설정이 있는 렌더 파이프라인 에셋을 보유할 수 있습니다.
렌더 파이프라인 에셋에 대한 일반적인 소개는 스크립터블 렌더 파이프라인 소개를 참조하십시오. URP의 렌더 파이프라인 에셋에 대한 자세한 내용은 유니버설 렌더 파이프라인 에셋을 참조하십시오. HDRP의 렌더 파이프라인 에셋에 대한 자세한 내용은 고해상도 렌더 파이프라인 에셋을 참조하십시오.
C# 코드를 사용하여 렌더 파이프라인 에셋을 설정할 수 있습니다. 이 모드는 Unity 에디터의 편집 모드 또는 플레이 모드에서 실행하거나, 빌드된 플레이어에서 런타임 시점에 실행할 수 있습니다.
SRP는 매우 고도로 설정이 가능하므로 활성 렌더 파이프라인 에셋을 변경하면 매우 작은 변화가 발생하거나, 매우 큰 변화(예: URP에서 HDRP로 전환하는 경우)가 발생할 수 있습니다. 런타임 시점에 렌더 파이프라인 에셋을 변경할 경우의 성능 부하는 그에 따라 달라집니다.
새로운 렌더 파이프라인 에셋으로 변경하면 Unity는 현재 렌더 파이프라인 인스턴스를 삭제하고 새로운 렌더 파이프라인 에셋의 CreatePipeline()
메서드를 호출합니다. SRP의 코드에 따라 이 작업에 매우 많은 계산 리소스가 소모될 수 있습니다.
다음 예제 코드는 GraphicsSettings.renderPipelineAsset에 저장된 기본 렌더 파이프라인 에셋을 설정하는 방법을 보여줍니다.
프로젝트의 품질 설정에서 렌더 파이프라인 에셋을 품질 레벨에 할당한 경우 현재 품질 레벨에 대한 렌더 파이프라인 에셋이 기본 렌더 파이프라인 에셋을 오버라이드합니다. QualitySettings-renderPipeline API를 사용하여 아래와 동일한 방법으로 C# 코드에서 이를 업데이트할 수 있습니다.
using UnityEngine;
using UnityEngine.Rendering;
public class SwitchRenderPipelineAsset : MonoBehaviour
{
public RenderPipelineAsset exampleAssetA;
public RenderPipelineAsset exampleAssetB;
void Update()
{
if (Input.GetKeyDown(KeyCode.A)) {
GraphicsSettings.renderPipelineAsset = exampleAssetA;
Debug.Log("Default render pipeline asset is: " + GraphicsSettings.renderPipelineAsset.name);
}
else if (Input.GetKeyDown(KeyCode.B)) {
GraphicsSettings.renderPipelineAsset = exampleAssetB;
Debug.Log("Default render pipeline asset is: " + GraphicsSettings.renderPipelineAsset.name);
}
}
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.