void drawToolbar() { EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, GUILayout.ExpandWidth(true)); { if (GUILayout.Button("Check for Updates", EditorStyles.toolbarButton)) { EntitasCheckForUpdates.CheckForUpdates(); } if (GUILayout.Button("Chat", EditorStyles.toolbarButton)) { EntitasFeedback.EntitasChat(); } if (GUILayout.Button("Docs", EditorStyles.toolbarButton)) { EntitasFeedback.EntitasDocs(); } if (GUILayout.Button("Wiki", EditorStyles.toolbarButton)) { EntitasFeedback.EntitasWiki(); } if (GUILayout.Button("Donate", EditorStyles.toolbarButton)) { EntitasFeedback.Donate(); } } EditorGUILayout.EndHorizontal(); }
void OnEnable() { _headerTexture = EntitasEditorLayout.LoadTexture("l:EntitasHeader"); _localVersion = EntitasCheckForUpdates.GetLocalVersion(); _config = EntitasPreferences.LoadConfig(); _preferencesDrawers = Assembly.GetAssembly(typeof(IEntitasPreferencesDrawer)).GetTypes() .Where(type => type.ImplementsInterface <IEntitasPreferencesDrawer>()) .Select(type => (IEntitasPreferencesDrawer)Activator.CreateInstance(type)) .OrderBy(drawer => drawer.priority) .ToArray(); foreach (var drawer in _preferencesDrawers) { drawer.Initialize(_config); } }
void OnEnable() { var guid = AssetDatabase.FindAssets("l:Entitas-Header")[0]; if (guid != null) { var path = AssetDatabase.GUIDToAssetPath(guid); _headerTexture = AssetDatabase.LoadAssetAtPath <Texture2D>(path); } _localVersion = EntitasCheckForUpdates.GetLocalVersion(); _config = EntitasPreferences.LoadConfig(); _preferencesDrawers = Assembly.GetAssembly(typeof(IEntitasPreferencesDrawer)).GetTypes() .Where(type => type.GetInterfaces().Contains(typeof(IEntitasPreferencesDrawer))) .OrderBy(type => type.FullName) .Select(type => (IEntitasPreferencesDrawer)Activator.CreateInstance(type)) .ToArray(); foreach (var drawer in _preferencesDrawers) { drawer.Initialize(_config); } }
public static void OpenPreferences() { EntitasEditorLayout.ShowWindow <EntitasPreferencesWindow>("Entitas " + EntitasCheckForUpdates.GetLocalVersion()); }