format
typescript
NavMeshObstacle.radiusclass: NavMeshObstacle
description
The radius of the cylinder.
When the shape is set to Cylinder, this property sets the radius of the cylinder. It is illegal to read or write the radius property when the shape is not set to Cylinder.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
number | The radius of the cylinder. |
code example
typescript
let obj = new GameObject();
let com = obj.AddComponent<NavMeshObstacle>(NavMeshObstacle);
com.shape = NavMeshObstacleShape.Cylinder;
com.radius = 0.5;
Debug.Log("NavMeshObstacle: radius = ", com.radius);