I’m trying to print the Bounds.size of an object, but I can’t find out how. This doesn’t work:
function Update () {
Debug.Log(Collider.bounds.size);
}
I’d like some help with this.
I’m trying to print the Bounds.size of an object, but I can’t find out how. This doesn’t work:
function Update () {
Debug.Log(Collider.bounds.size);
}
I’d like some help with this.
Lowercase c:
Debug.Log(collider.bounds.size);
“Collider” refers to the Collider class, “collider” is a shortcut for GetComponent(Collider).
You need to get the Collider component first:
Debug.Log(GetComponent(Collider).bounds.size);
Debug.Log(Collider.bounds.size);