format
typescript
NavMeshObstacle.sizeclass: NavMeshObstacle
description
The length of the Box in the x, y, and z directions.
When the shape is Box, the extend represents the length of the Box in the x, y, and z directions. When the shape is Cylinder, reading the extend is an invalid operation.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
Vector3 | The length of the Box in the x, y, and z directions. |
code example
typescript
let obj = new GameObject();
let com = obj.AddComponent<NavMeshObstacle>(NavMeshObstacle);
com.shape = NavMeshObstacleShape.Box;
com.centerOffset = new Vector3(0, 1, 0);
com.size = new Vector3(1, 1, 1);
Debug.Log("NavMeshObstacle: size = ", com.size);