在Editor/Perferences…下添加自己的模块设置界面。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| public static class Preferences { #if UNITY_2019_1_OR_NEWER public class MarkownSettings : SettingsProvider { public MarkownSettings(string path, SettingsScope scopes = SettingsScope.User, IEnumerable<string> keywords = null) : base(path, scopes, keywords) { } public override void OnGUI(string searchContext) { GUILayout.Button("测试"); } }
[SettingsProvider] static SettingsProvider MarkdownPreferences() { return new MarkownSettings("Preferences/Markdown"); } #else [PreferenceItem( "Markdown" )] #endif }
|
效果图: