Exemplo n.º 1
0
 void OnEnable()
 {
     // Create your settings now and its associated Inspector
     // that allows to create only one custom Inspector for the settings in the window and the Preset.
     m_SerializedSettings = ScriptableObject.CreateInstance <MyWindowSettings>();
     m_SerializedSettings.Init(this);
     m_SettingsEditor = Editor.CreateEditor(m_SerializedSettings);
 }
Exemplo n.º 2
0
 void OnEnable()
 {
     // 立即创建您的设置及其关联的 Inspector,
     // 用于为窗口和预设中的设置仅创建一个自定义 Inspector。
     m_SerializedSettings = ScriptableObject.CreateInstance <MyWindowSettings>();
     m_SerializedSettings.Init(this);
     m_SettingsEditor = Editor.CreateEditor(m_SerializedSettings);
 }
Exemplo n.º 3
0
 void OnEnable()
 {
     m_SerializedSettings = ScriptableObject.CreateInstance <MyWindowSettings>();
     m_SerializedSettings.Init(this);
     m_SettingEditor = Editor.CreateEditor(m_SerializedSettings);
 }
Exemplo n.º 4
0
 public void Init(MyWindowSettings settings, MyEditorWindow window)
 {
     currentWindow   = window;
     currentSettings = settings;
     initialValues   = new Preset(currentSettings);
 }