Skip to content

Instantly share code, notes, and snippets.

@TigerHix
Created July 17, 2023 15:37
Show Gist options
  • Save TigerHix/b78aabffc2d03346ff3da526706ce2ca to your computer and use it in GitHub Desktop.
Save TigerHix/b78aabffc2d03346ff3da526706ce2ca to your computer and use it in GitHub Desktop.
using Warudo.Core.Attributes;
using Warudo.Core.Plugins;
namespace Tira.AwesomePlugin {
[PluginType(
Id = "Tira.AwesomePlugin",
Name = "Awesome Plugin",
Description = "Hello World!",
Author = "Hakuya Tira",
Version = "1.0.0",
AssetTypes = new[] {
typeof(MyAsset)
},
NodeTypes = new[] {
typeof(MyNode1),
typeof(MyNode2)
},
Icon = Icon)]
public class AwesomePlugin : Plugin {
// You can provide a SVG icon that shows up in the settings
public const string Icon = "<svg style=\"padding: 0.5px;\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"currentColor\" d=\"M391.17,103.47H352.54v109.7h38.63ZM285,103H246.37V212.75H285ZM120.83,0,24.31,91.42V420.58H140.14V512l96.53-91.42h77.25L487.69,256V0ZM449.07,237.75l-77.22,73.12H294.61l-67.6,64v-64H140.14V36.58H449.07Z\"/></svg>\n";
// You can create data inputs too!
[DataInput]
public string MySetting;
[Markdown(primary: true)]
public string Info = "This plugin is made by Hakuya Tira. Reach out to me on Discord if you have questions!";
protected override void OnCreate() {
base.OnCreate();
// On plugin load (app startup)
}
protected override void OnDestroy() {
base.OnDestroy();
// On plugin unload (app quit)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment