Параметры
settingsPath | Путь настроек элемента для выбора (например, «Настройки/Ключи» или «Настройки/2D»). |
Возвращает
EditorWindow Возвращает экземпляр в окно настроек.
Описание
Откройте окно настроек с уже выбранным указанным элементом настроек.
using UnityEditor;
using UnityEngine;
class MyCustomWindow : EditorWindow
{
void OnGUI()
{
if (GUILayout.Button("Open my custom preference"))
{
SettingsService.OpenUserPreferences("Preferences/MyCustomPref");
}
if (GUILayout.Button("Open my custom project settings"))
{
SettingsService.OpenProjectSettings("Project/MyCustomSettings");
}
}
}