您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

31 行
910 B

#if URP_PRESENT
using System;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering.Universal;
namespace UnityEngine.Perception.GroundTruth
{
public class GroundTruthRendererFeature : ScriptableRendererFeature
{
public override void Create() {}
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
var cameraObject = renderingData.cameraData.camera.gameObject;
var perceptionCamera = cameraObject.GetComponent<PerceptionCamera>();
if (perceptionCamera == null)
return;
#if UNITY_EDITOR
if (!EditorApplication.isPlaying)
return;
#endif
perceptionCamera.MarkGroundTruthRendererFeatureAsPresent();
foreach (var pass in perceptionCamera.passes)
renderer.EnqueuePass(pass);
}
}
}
#endif