diff --git a/source/FrameRecorder/Core/Editor/InputEditor.cs b/source/FrameRecorder/Core/Editor/InputEditor.cs index c83d7b8..9a87e2f 100644 --- a/source/FrameRecorder/Core/Editor/InputEditor.cs +++ b/source/FrameRecorder/Core/Editor/InputEditor.cs @@ -6,11 +6,12 @@ namespace UnityEditor.FrameRecorder { public delegate EFieldDisplayState IsFieldAvailableDelegate(SerializedProperty property); - public IsFieldAvailableDelegate IsFieldAvailableForHost { get; set; } + public IsFieldAvailableDelegate isFieldAvailableForHost { get; set; } protected virtual void AddProperty(SerializedProperty prop, Action action ) { - var state = IsFieldAvailableForHost(prop); + var state = isFieldAvailableForHost == null ? EFieldDisplayState.Disabled : isFieldAvailableForHost(prop); + if (state == EFieldDisplayState.Enabled) state = IsFieldAvailable(prop); if (state != EFieldDisplayState.Hidden) diff --git a/source/FrameRecorder/Core/Editor/RecorderEditor.cs b/source/FrameRecorder/Core/Editor/RecorderEditor.cs index ed85b6d..c2a1f62 100644 --- a/source/FrameRecorder/Core/Editor/RecorderEditor.cs +++ b/source/FrameRecorder/Core/Editor/RecorderEditor.cs @@ -32,7 +32,7 @@ namespace UnityEditor.FrameRecorder editor = Editor.CreateEditor(m_SettingsObj); if (editor is InputEditor) - (editor as InputEditor).IsFieldAvailableForHost = m_Validator; + (editor as InputEditor).isFieldAvailableForHost = m_Validator; } }