Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Editor/PostProcessing/PaniniProjectionEditor.cs
2024-08-26 23:07:20 +03:00

34 lines
894 B
C#

using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
namespace UnityEditor.Rendering.HighDefinition
{
[CustomEditor(typeof(PaniniProjection))]
sealed class PaniniProjectionEditor : VolumeComponentEditor
{
SerializedDataParameter m_Distance;
SerializedDataParameter m_CropToFit;
public override void OnEnable()
{
var o = new PropertyFetcher<PaniniProjection>(serializedObject);
m_Distance = Unpack(o.Find(x => x.distance));
m_CropToFit = Unpack(o.Find(x => x.cropToFit));
base.OnEnable();
}
public override void OnInspectorGUI()
{
HDEditorUtils.EnsureFrameSetting(FrameSettingsField.PaniniProjection, "Panini Projection");
PropertyField(m_Distance);
PropertyField(m_CropToFit);
}
}
}