From b71d5611db087772179505ed10c82ca958900df7 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Oct 2020 07:04:38 +0800 Subject: +advanced inspector --- .../Examples/CSharp/AIExample5_Descriptor.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample5_Descriptor.cs (limited to 'Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample5_Descriptor.cs') diff --git a/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample5_Descriptor.cs b/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample5_Descriptor.cs new file mode 100644 index 00000000..9641b787 --- /dev/null +++ b/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample5_Descriptor.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using System.Collections; + +using AdvancedInspector; + +[AdvancedInspector] +public class AIExample5_Descriptor : MonoBehaviour +{ + // The Descriptor attribute is used to give more information about an item. + // It can also change the displayed name of the item; + [Inspect, Descriptor("Variable New Name", "")] + public float myFloat; + + // The second parameter - "Description" - is used as a tooltip in the inspector. + [Inspect, Descriptor("With Tooltip", "This is the tooltip description")] + public float myFloat2; + + // The third parameter - "URL" - is used as a web info in the inspector. + // Try right-clicking on this label to see "Online Help". + [Inspect, Descriptor("With URL", "This is the tooltip description", "http://www.lightstrikersoftware.com/")] + public float myFloat3; + + // The descriptor also contains a RGB value, that is used to tint the item. + // Because of the limits of attributes, the color has to be passed by floats. + [Inspect, Descriptor("With Color", "This is the tooltip description", "", 1, 0, 0)] + public float myFloat4; +} -- cgit v1.1-26-g67d0