CustomGraphEditorAttribute.cs 655 B

12345678910111213141516171819
  1. namespace Pathfinding {
  2. /// <summary>Added to editors of custom graph types</summary>
  3. [System.AttributeUsage(System.AttributeTargets.All, Inherited = false, AllowMultiple = true)]
  4. public class CustomGraphEditorAttribute : System.Attribute {
  5. /// <summary>Graph type which this is an editor for</summary>
  6. public System.Type graphType;
  7. /// <summary>Name displayed in the inpector</summary>
  8. public string displayName;
  9. /// <summary>Type of the editor for the graph</summary>
  10. public System.Type editorType;
  11. public CustomGraphEditorAttribute (System.Type t, string displayName) {
  12. graphType = t;
  13. this.displayName = displayName;
  14. }
  15. }
  16. }