using System.Linq; using UnityEngine; namespace UnityEditor.Rendering { /// Camera UI Shared Properties among SRP public static partial class CameraUI { /// /// Physical camera content content /// public static partial class PhysicalCamera { /// /// Styles /// public static class Styles { // Camera Body /// /// Camera Body content /// public static readonly GUIContent cameraBody = EditorGUIUtility.TrTextContent("Camera Body"); /// /// Sensor type content /// public static readonly GUIContent sensorType = EditorGUIUtility.TrTextContent("Sensor Type", "Common sensor sizes. Choose an item to set Sensor Size, or edit Sensor Size for your custom settings."); /// /// Aperture format names /// public static readonly string[] apertureFormatNames = CameraEditor.Settings.ApertureFormatNames.ToArray(); /// /// Aperture format values /// public static readonly Vector2[] apertureFormatValues = CameraEditor.Settings.ApertureFormatValues.ToArray(); /// /// Custom preset index /// public static readonly int customPresetIndex = apertureFormatNames.Length - 1; /// /// Sensor size /// public static readonly GUIContent sensorSize = EditorGUIUtility.TrTextContent("Sensor Size", "The size of the camera sensor in millimeters."); /// /// Gate Fit /// public static readonly GUIContent gateFit = EditorGUIUtility.TrTextContent("Gate Fit", "Determines how the rendered area (resolution gate) fits into the sensor area (film gate)."); // Lens /// /// Lens content /// public static readonly GUIContent lens = EditorGUIUtility.TrTextContent("Lens"); /// /// Focal Length Content /// public static readonly GUIContent focalLength = EditorGUIUtility.TrTextContent("Focal Length", "The simulated distance between the lens and the sensor of the physical camera. Larger values give a narrower field of view."); /// /// Shift content /// public static readonly GUIContent shift = EditorGUIUtility.TrTextContent("Shift", "Offset from the camera sensor. Use these properties to simulate a shift lens. Measured as a multiple of the sensor size."); } } } }