summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample35_ToString.cs
blob: 6ab519b49dacb5d4dcbc774d8b7cabac4c1fb3ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using UnityEngine;
using AdvancedInspector;

[AdvancedInspector]
public class AIExample35_ToString : MonoBehaviour
{
    [Inspect]
    public Nested[] collection;

    [Serializable]
    public class Nested
    {
        [Inspect]
        public string name;

        // When overriding ToString, the AdvancedInspector display that string on the right side of the item when there is no picker.
        public override string ToString()
        {
            return name;
        }
    }
}