summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample34_TitleDynamic.cs
blob: 83df78025fa9655770b4b72aa868c956738e4991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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");
    }
}