Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unity Number Ranges and Serialized Class (Expandable)
[System.Serializable]
public class Movement
{
[Range(1f, 12.0f)]
public float speed = 6.0F;
[Range(1f, 12.0f)]
public float runSpeed = 8.0F;
[Range(1f, 12.0f)]
public float jumpSpeed = 8.0F;
[Range(0f, 1.0f)]
[Tooltip("Percent of speed")]
public float inAirControl = 0.25f;
[Range(1f, 12.0f)]
public float crouchWalkSpeed = 2.0F;
}
[Tooltip("Player speeds, etc.")]
public Movement movement;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment