summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-15 07:04:38 +0800
committerchai <chaifix@163.com>2020-10-15 07:04:38 +0800
commitb71d5611db087772179505ed10c82ca958900df7 (patch)
tree5160f6af41d45529e435550879e0c87ea59c09a8 /Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs
parentb1b14c45ce95dcf7b81867d68d6006345d98959e (diff)
+advanced inspector
Diffstat (limited to 'Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs')
-rw-r--r--Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs b/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs
new file mode 100644
index 00000000..83df7802
--- /dev/null
+++ b/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using UnityEngine;
+using AdvancedInspector;
+
+[AdvancedInspector]
+public class AIExample34_TitleDynamic : MonoBehaviour
+{
+ // Similar to other IRuntimeAttribute, Title can be modified at runtime from a bound method.
+ [Inspect, Title("GetTitle")]
+ public FontStyle style = FontStyle.Bold;
+
+ private TitleAttribute GetTitle()
+ {
+ return new TitleAttribute(style, "This Title Is Dynamic");
+ }
+}