A game about forced loneliness, made by TACStudios
1using UnityEngine;
2
3namespace UnityEditor.Rendering
4{
5 public static partial class CameraUI
6 {
7 /// <summary>
8 /// Output Section
9 /// </summary>
10 public static partial class Output
11 {
12 /// <summary>Draws Allow Dynamic Resolution related fields on the inspector</summary>
13 /// <param name="p"><see cref="ISerializedCamera"/> The serialized camera</param>
14 /// <param name="owner"><see cref="Editor"/> The editor owner calling this drawer</param>
15 /// <param name="customLabel">Override property name</param>
16 public static void Drawer_Output_AllowDynamicResolution(ISerializedCamera p, Editor owner, GUIContent customLabel = null)
17 {
18 EditorGUILayout.PropertyField(p.allowDynamicResolution, customLabel ?? Styles.allowDynamicResolution);
19 p.baseCameraSettings.allowDynamicResolution.boolValue = p.allowDynamicResolution.boolValue;
20 }
21
22 /// <summary>Draws Normalized ViewPort related fields on the inspector</summary>
23 /// <param name="p"><see cref="ISerializedCamera"/> The serialized camera</param>
24 /// <param name="owner"><see cref="Editor"/> The editor owner calling this drawer</param>
25 public static void Drawer_Output_NormalizedViewPort(ISerializedCamera p, Editor owner)
26 {
27 EditorGUILayout.PropertyField(p.baseCameraSettings.normalizedViewPortRect, Styles.viewport);
28 }
29
30 /// <summary>Draws Depth related fields on the inspector</summary>
31 /// <param name="p"><see cref="ISerializedCamera"/> The serialized camera</param>
32 /// <param name="owner"><see cref="Editor"/> The editor owner calling this drawer</param>
33 public static void Drawer_Output_Depth(ISerializedCamera p, Editor owner)
34 {
35 EditorGUILayout.PropertyField(p.baseCameraSettings.depth, Styles.depth);
36 }
37
38 /// <summary>Draws Render Target related fields on the inspector</summary>
39 /// <param name="p"><see cref="ISerializedCamera"/> The serialized camera</param>
40 /// <param name="owner"><see cref="Editor"/> The editor owner calling this drawer</param>
41 public static void Drawer_Output_RenderTarget(ISerializedCamera p, Editor owner)
42 {
43 EditorGUILayout.PropertyField(p.baseCameraSettings.targetTexture);
44 }
45 }
46 }
47}