Last active
August 29, 2015 14:02
-
-
Save paulhayes/c127c1d0b89f8c2ee09c to your computer and use it in GitHub Desktop.
Unity MonoBehaviour Attribute Examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[SelectionBase] | |
public class Character : MonoBehaviour | |
{ | |
[Header("Info")] | |
public string name; | |
[Space(10)] | |
[TextArea(3,8)] // or the more basic alternative [Multiline(3)] | |
[Tooltip("140 characters or less")] | |
public string description; | |
[Header("Stats")] | |
[Range(0,100)] | |
public float intelligence; | |
[Range(0,100)] | |
public float bravery; | |
[Header("Equipment")] | |
[Tooltip("Character starts with the following items")] | |
public string[] items; | |
public float weightLimit; | |
void Start () | |
{ | |
} | |
void Update () | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment