Method Create
Create(NativeArray<float>, int2, float3, CollisionMethod)
Create a terrain collider from a grid of heights.
Declaration
public static BlobAssetReference<Collider> Create(NativeArray<float> heights, int2 size, float3 scale, TerrainCollider.CollisionMethod collisionMethod)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<float> | heights | The heights. |
int2 | size | The size. |
float3 | scale | The scale. |
TerrainCollider.CollisionMethod | collisionMethod | The collision method. |
Returns
Type | Description |
---|---|
BlobAssetReference<Collider> | A BlobAssetReference<Collider> |
Create(NativeArray<float>, int2, float3, CollisionMethod, CollisionFilter)
Creates a new BlobAssetReference<Collider>
Declaration
public static BlobAssetReference<Collider> Create(NativeArray<float> heights, int2 size, float3 scale, TerrainCollider.CollisionMethod collisionMethod, CollisionFilter filter)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<float> | heights | The heights. |
int2 | size | The size. |
float3 | scale | The scale. |
TerrainCollider.CollisionMethod | collisionMethod | The collision method. |
CollisionFilter | filter | Specifies the filter. |
Returns
Type | Description |
---|---|
BlobAssetReference<Collider> | A BlobAssetReference<Collider> |
Create(NativeArray<float>, int2, float3, CollisionMethod, CollisionFilter, Material)
Creates a new BlobAssetReference<Collider>
Declaration
public static BlobAssetReference<Collider> Create(NativeArray<float> heights, int2 size, float3 scale, TerrainCollider.CollisionMethod collisionMethod, CollisionFilter filter, Material material)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<float> | heights | The heights. |
int2 | size | The size. |
float3 | scale | The scale. |
TerrainCollider.CollisionMethod | collisionMethod | The collision method. |
CollisionFilter | filter | Specifies the filter. |
Material | material | The material. |
Returns
Type | Description |
---|---|
BlobAssetReference<Collider> | A BlobAssetReference<Collider> |