public void InitIfNeeded()
{
if (this.m_CurveLibraryEditorState == null)
{
this.m_CurveLibraryEditorState = new PresetLibraryEditorState(this.GetEditorPrefBaseName());
this.m_CurveLibraryEditorState.TransferEditorPrefsState(true);
}
if (this.m_CurveLibraryEditor == null)
{
ScriptableObjectSaveLoadHelper<DoubleCurvePresetLibrary> helper = new ScriptableObjectSaveLoadHelper<DoubleCurvePresetLibrary>(PresetLibraryLocations.GetParticleCurveLibraryExtension(this.m_DoubleCurve.IsSingleCurve(), this.m_DoubleCurve.signedRange), SaveType.Text);
this.m_CurveLibraryEditor = new PresetLibraryEditor<DoubleCurvePresetLibrary>(helper, this.m_CurveLibraryEditorState, new Action<int, object>(this, (IntPtr) this.ItemClickedCallback));
this.m_CurveLibraryEditor.addDefaultPresets = (Action<PresetLibrary>) Delegate.Combine(this.m_CurveLibraryEditor.addDefaultPresets, new Action<PresetLibrary>(this.AddDefaultPresetsToLibrary));
this.m_CurveLibraryEditor.presetsWasReordered = new Action(this, (IntPtr) this.PresetsWasReordered);
this.m_CurveLibraryEditor.previewAspect = 4f;
this.m_CurveLibraryEditor.minMaxPreviewHeight = new Vector2(24f, 24f);
this.m_CurveLibraryEditor.showHeader = true;
}
}