Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
DMD3502-Cutscene-JacobTomassi/Cutscene/Assets/LowpolySimpleHouse/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
37 lines (31 sloc)
1.41 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine.PostProcessing; | |
namespace UnityEditor.PostProcessing | |
{ | |
using Settings = DepthOfFieldModel.Settings; | |
[PostProcessingModelEditor(typeof(DepthOfFieldModel))] | |
public class DepthOfFieldModelEditor : PostProcessingModelEditor | |
{ | |
SerializedProperty m_FocusDistance; | |
SerializedProperty m_Aperture; | |
SerializedProperty m_FocalLength; | |
SerializedProperty m_UseCameraFov; | |
SerializedProperty m_KernelSize; | |
public override void OnEnable() | |
{ | |
m_FocusDistance = FindSetting((Settings x) => x.focusDistance); | |
m_Aperture = FindSetting((Settings x) => x.aperture); | |
m_FocalLength = FindSetting((Settings x) => x.focalLength); | |
m_UseCameraFov = FindSetting((Settings x) => x.useCameraFov); | |
m_KernelSize = FindSetting((Settings x) => x.kernelSize); | |
} | |
public override void OnInspectorGUI() | |
{ | |
EditorGUILayout.PropertyField(m_FocusDistance); | |
EditorGUILayout.PropertyField(m_Aperture, EditorGUIHelper.GetContent("Aperture (f-stop)")); | |
EditorGUILayout.PropertyField(m_UseCameraFov, EditorGUIHelper.GetContent("Use Camera FOV")); | |
if (!m_UseCameraFov.boolValue) | |
EditorGUILayout.PropertyField(m_FocalLength, EditorGUIHelper.GetContent("Focal Length (mm)")); | |
EditorGUILayout.PropertyField(m_KernelSize); | |
} | |
} | |
} |