A worked example, rendered from real sample data. Sign in to run the tool on your own input.
PlayerController
# Movement
speed:float = 6 [0,20] "Units per second"
jumpForce:float = 12
# Combat
health:int = 100 [0,100]
isGrounded:boolusing UnityEngine;
public class PlayerController : MonoBehaviour
{
[Header("Movement")]
[Tooltip("Units per second")]
[Range(0f, 20f)]
[SerializeField] private float speed = 6f;
[SerializeField] private float jumpForce = 12f;
[Header("Combat")]
[Range(0f, 100f)]
[SerializeField] private int health = 100;
[SerializeField] private bool isGrounded;
public float Speed => speed;
public float JumpForce => jumpForce;
public int Health => health;
public bool IsGrounded => isGrounded;
private void Awake()
{
}
private void Start()
{
}
private void Update()
{
}
}
Generate Unity MonoBehaviour, ScriptableObject, or Editor scripts from a template. Part of the DevTools Surf developer suite. Browse more tools in the Game Dev collection.