Skip to content

Commit 7ea4dba

Browse files
Dominique LerouxDominique Leroux
authored andcommitted
Fixed initialization order error that was breaking recording.
1 parent f833b29 commit 7ea4dba

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

source/FrameRecorder/Core/Editor/RecorderEditor.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ protected virtual void OnEnable()
2424
{
2525
var pf = new PropertyFinder<RecorderSettings>(serializedObject);
2626
m_Inputs = pf.Find(x => x.m_SourceSettings);
27-
m_ShowInputEditor = new bool[m_Inputs.arraySize];
28-
for (int i = 0; i < m_ShowInputEditor.Length; ++i)
29-
m_ShowInputEditor[i] = true;
3027
m_Verbose = pf.Find(x => x.m_Verbose);
3128
m_FrameRateMode = pf.Find(x => x.m_FrameRateMode);
3229
m_FrameRate = pf.Find(x => x.m_FrameRate);
@@ -111,6 +108,14 @@ protected void PrepareInitialSources()
111108
{
112109
AddSourceSettings(newSetting);
113110
}
111+
}
112+
113+
if (m_ShowInputEditor == null || m_ShowInputEditor.Length != m_Inputs.arraySize)
114+
{
115+
var oldLength = m_ShowInputEditor == null ? 0 : m_ShowInputEditor.Length;
116+
m_ShowInputEditor = new bool[m_Inputs.arraySize];
117+
for (int i = oldLength; i < m_ShowInputEditor.Length; ++i)
118+
m_ShowInputEditor[i] = true;
114119
}
115120
}
116121

source/FrameRecorder/Core/Editor/RecorderWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void OnGUI()
115115
if (m_State == EState.Recording)
116116
try
117117
{
118-
Debug.LogError("Aborting recording due to an exception!");
118+
Debug.LogError("Aborting recording due to an exception!\n" + ex.ToString());
119119
StopRecording();
120120
}
121121
catch (Exception)

0 commit comments

Comments
 (0)