From 8722a9920c1f6119bf6e769cba270e63097f8e25 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Thu, 23 May 2024 10:08:29 +0800 Subject: + astar project --- .../Editor/CustomGraphEditorAttribute.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/Editor/CustomGraphEditorAttribute.cs (limited to 'Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/Editor/CustomGraphEditorAttribute.cs') diff --git a/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/Editor/CustomGraphEditorAttribute.cs b/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/Editor/CustomGraphEditorAttribute.cs new file mode 100644 index 0000000..614c66c --- /dev/null +++ b/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/Editor/CustomGraphEditorAttribute.cs @@ -0,0 +1,19 @@ +namespace Pathfinding { + /// Added to editors of custom graph types + [System.AttributeUsage(System.AttributeTargets.All, Inherited = false, AllowMultiple = true)] + public class CustomGraphEditorAttribute : System.Attribute { + /// Graph type which this is an editor for + public System.Type graphType; + + /// Name displayed in the inpector + public string displayName; + + /// Type of the editor for the graph + public System.Type editorType; + + public CustomGraphEditorAttribute (System.Type t, string displayName) { + graphType = t; + this.displayName = displayName; + } + } +} -- cgit v1.1-26-g67d0