Skip to main content

HitboxVisualizer

A class in Root.Township, the global namespace.

Debug visual for a capsule hitbox: scales an object to the capsule's height and shows it only while the collider is enabled.

Constructors​

MemberWhat it is
HitboxVisualizer()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private CapsuleCollider capsuleColliderThe hitbox being shown.
private GameObject visualObject that draws the hitbox.

Methods​

2 private and internal methods
MemberWhat it is
private void Start()Scales the visual by the capsule's height.
private void Update()Shows the visual only while the capsule collider is enabled.