浏览代码

Fix exceptions in non-development players on some graphics backends (#66)

/main
GitHub 4 年前
当前提交
8765c436
共有 2 个文件被更改,包括 8 次插入30 次删除
  1. 28
      TestProjects/PerceptionURP/Assets/Scenes/SampleScene.unity
  2. 10
      com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs

28
TestProjects/PerceptionURP/Assets/Scenes/SampleScene.unity


m_Component:
- component: {fileID: 705507995}
- component: {fileID: 705507994}
- component: {fileID: 705507996}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged

m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!114 &705507996
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 705507993}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 963194229}
- component: {fileID: 963194227}
- component: {fileID: 963194231}
- component: {fileID: 963194232}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera

- id: 1
- id: 2
- id: 3
showVisualizations: 1
showVisualizations: 0
references:
version: 1
00000000:

m_EditorClassIdentifier:
targetLight: {fileID: 705507993}
target: {fileID: 1640252278}
--- !u!114 &963194232
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 53f4c974fdf704444959724a41de0cfe, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1640252278
GameObject:
m_ObjectHideFlags: 0

10
com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs


[SerializeField]
public bool showVisualizations = true;
bool m_ShowingVisualizations;
bool m_ShowingVisualizations = false;
/// <summary>
/// The <see cref="SensorHandle"/> associated with this camera. Use this to report additional annotations and metrics at runtime.

SetupInstanceSegmentation();
var cam = GetComponent<Camera>();
#if UNITY_EDITOR || DEVELOPMENT_BUILD
#endif
DatasetCapture.SimulationEnding += OnSimulationEnding;
}

void SetupVisualizationCamera(Camera cam)
{
#if !UNITY_EDITOR && !DEVELOPMENT_BUILD
showVisualizations = false;
#else
var visualizationAllowed = s_VisualizedPerceptionCamera == null;
if (!visualizationAllowed && showVisualizations)

s_VisualizedPerceptionCamera = this;
hudPanel = gameObject.AddComponent<HUDPanel>();
#endif
}
void CheckForRendererFeature(ScriptableRenderContext context, Camera camera)

正在加载...
取消
保存