Hi
I’m currently keeping my variables sorted in the inspector by breaking them up with Strings like “—Character—” .etc, I don’t enjoy having these sit in memory however. Is there a way to create custom headers for use in the inspector?
Hi
I’m currently keeping my variables sorted in the inspector by breaking them up with Strings like “—Character—” .etc, I don’t enjoy having these sit in memory however. Is there a way to create custom headers for use in the inspector?
Hi,
Header annotation is probably what you are looking for:
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
[Header("Health Settings")]
public int health = 0;
public int maxHealth = 100;
[Header("Shield Settings")]
public int shield = 0;
public int maxShield = 0;
}
You may also want to annotate individual variables, in which case a Tooltip is useful:
[Tooltip("This is a tooltip")]
public string tooltippedString;
[Header(“Insert Header”)]
Is this what you mean?