Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetGeometryIslands(Allocator)

Get the geometry islands from a previous polygon geometry composition i.e. a call to PhysicsComposer.CreatePolygonGeometry or PhysicsComposer.CreateConvexHulls. Each generated polygon or convex-hull belongs to a unique island defining a set of polygons that are connected together as they share edges. The array returned contains a series of ranges where each range is a unique connected island where the range indicates both the start index and length of the original polygon indices. The number of discovered unique islands is defined by the size of the returned array.
Read time 1 minuteLast updated 10 days ago

Definition

public NativeArray<RangeInt> GetGeometryIslands(Allocator allocator)

Parameters

allocator

The memory allocator to use for the results. This can only be Allocator.Temp, Allocator.TempJob or Allocator.Persistent.

Returns

Type

Description

NativeArray<RangeInt>A NativeArray containing a series of ranges where each range is uniquely connected island where the range indicates both the start and end indices of the original polygon indices.