| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
On its own Command Palette doesn't do much besides displaying a window.
There are samples included that showcase how to develop plugins for Command Palette.
Other keybinds:
using CommandPalette.Core;
using CommandPalette.Plugins;
public class MyPlugin : IPlugin {
[UnityEditor.InitializeOnLoadMethod]
private static void InitializePlugin() {
CommandPalette.RegisterPlugin(new MyPlugin());
}
// This is an overall plugin multiplier. Controls the order in which entries are displayed
public string PriorityMultiplier => 1.0f;
public string Name => "My Plugin";
public CommandPaletteWindow Window { get; set; }
// Validate input here
public bool IsValid(Query query) {
return true;
}
// Generate entries based on query
public IEnumerable<ResultEntry> GetResults(Query query) {
yield return new ResultEntry(
new ResultDisplaySettings("Title", ...),
100, // Per-entry priority
() => {
UnityEngine.Debug.Log("Selected entry!");
}
);
}
}| Back | FazBrowse Home | New Git URL |