From e846c64d6f927879cb8a095e62d773a8d7b3c9f4 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Oct 2020 07:24:10 +0800 Subject: *ability system --- .../Interface/IRuntimeAttribute.cs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Assets/Plugins/AdvancedInspector/Interface/IRuntimeAttribute.cs (limited to 'Assets/Plugins/AdvancedInspector/Interface/IRuntimeAttribute.cs') diff --git a/Assets/Plugins/AdvancedInspector/Interface/IRuntimeAttribute.cs b/Assets/Plugins/AdvancedInspector/Interface/IRuntimeAttribute.cs new file mode 100644 index 00000000..10710819 --- /dev/null +++ b/Assets/Plugins/AdvancedInspector/Interface/IRuntimeAttribute.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; + +namespace AdvancedInspector +{ + /// + /// Define an attribute that stores a method name + /// Which should be turned into a delegate at runtime. + /// + public interface IRuntimeAttribute : IRuntimeAttribute + { + /// + /// Invoke the internal delegates and returns the requested values. + /// T should be the same type as the Delegate return type. + /// + T Invoke(int index, object instance, object value); + } + + public interface IRuntimeAttribute + { + /// + /// Name of the MethodInfo to retrieve at runtime. + /// + string MethodName { get; } + + /// + /// Prototype template of the delegate to create + /// + Type Template { get; } + + /// + /// Prototype template for static external delegate + /// + Type TemplateStatic { get; } + + /// + /// List of delegates to invoke. + /// + List Delegates { get; set; } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0