Skip to content

format

typescript
BoxCollider.size

class: BoxCollider

description

The size of the box collider.

This value represents the width, height, and depth of the box collider.

parameter

param_nametypedescription

reture

typedescription
Vector3The size of the box collider.

code example

typescript
let obj = new GameObject();
let box = obj.AddComponent<BoxCollider>(BoxCollider);
box.size;