summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs
diff options
context:
space:
mode:
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");
+ }
+}