Skip to content

Instantly share code, notes, and snippets.

@jawinn
Created July 14, 2016 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawinn/2108f2ecbcb8a6c75b02068c229acd77 to your computer and use it in GitHub Desktop.
Save jawinn/2108f2ecbcb8a6c75b02068c229acd77 to your computer and use it in GitHub Desktop.
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