Unity Custom Editor Attributes

using UnityEngine;
using System click now.Collections;

public class Headers : MonoBehaviour {

    [SerializeField]
    private string myName = "Need Name";

    [Range(0,100)]
    public int health = 0;

    [HideInInspector]
    public string desc = "Here is a public string that I want to hide in the inspector.";

    [TextArea(3,5)]
    public string editBox = "";

    [Multiline(10)]
    public string editBox2 = "";

    [Header("Currency")]
    public int gold = 0;
    public int silver = 0;
    public int copper = 0;

    [Header("Stats")]
    public int strenght = 0;
    public int decterdexterity = 0;
    public int constitution = 0;

    [Space(10)]   //[Header("")]
    public int rastring = 0;
    public int age = 0;

    [Space(10)]
    [Tooltip("This is the object postion in the game world")]
    public Vector3 vec3;


	void Start () {
        callMe(myName);
	}
	

    void callMe(string a) {
        Debug.Log("name is: " +a);
    }
}

Add a Comment

Your email address will not be published. Required fields are marked *

4 + 12 =