public void Init(string title, IEditorWindow editorWindow, string editorPrefsTag, Type[] allowedTypes, StateMachineEditorStyle style, TimelineScrollArea.eTimeFormat timeFormat = TimelineScrollArea.eTimeFormat.Default) { _title = title; _editorPrefsTag = editorPrefsTag; _allowedEvents = allowedTypes; _style = style; _timelineEditorTimeFormat = timeFormat; string editorPrefsText = ProjectEditorPrefs.GetString(_editorPrefsTag, ""); try { _editorPrefs = Serializer.FromString <StateMachineEditorPrefs>(editorPrefsText); } catch { _editorPrefs = null; } if (_editorPrefs == null) { _editorPrefs = new StateMachineEditorPrefs(); } SetEditorWindow(editorWindow); CreateViews(); }
public void Init(string title, IEditorWindow editorWindow, string editorPrefsTag) { _title = title; _editorPrefsTag = editorPrefsTag; string editorPrefsText = ProjectEditorPrefs.GetString(_editorPrefsTag, ""); _editorPrefs = Serializer.FromString <NodeGraphEditorPrefs>(editorPrefsText); if (_editorPrefs == null) { _editorPrefs = new NodeGraphEditorPrefs(); } SetEditorWindow(editorWindow); CreateViews(); }
private void Init() { string editorPrefsText = ProjectEditorPrefs.GetString(kEditorPrefKey, ""); try { _editorPrefs = Serializer.FromString <LocalisationEditorPrefs>(editorPrefsText); } catch { _editorPrefs = null; } if (_editorPrefs == null) { _editorPrefs = new LocalisationEditorPrefs(); } _controlID = GUIUtility.GetControlID(FocusType.Passive); }