# GetAllCategories

> Returns all ProfilerCategory registered in Profiler.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Profiling](/engine/6000.0/script-reference/unityengine/profiling.md)
* **Assembly:** UnityEngine.CoreModule

## GetAllCategories(ProfilerCategory\[])

Returns all [ProfilerCategory](/engine/6000.0/script-reference/unity/profiling/profilercategory.md) registered in Profiler.

```csharp
[Conditional("ENABLE_PROFILER")]
public static void GetAllCategories(ProfilerCategory[] categories)
```

### Parameters

**** (\[ProfilerCategory\[]]\(/engine/6000.0/script-reference/unity/profiling/profilercategory)):&#x20;

### Remarks

Fills the provided array with a list of [ProfilerCategory](/engine/6000.0/script-reference/unity/profiling/profilercategory.md) registered in the Profiler. It is a user's responsibility to provide an array with enough space. Returns first N [ProfilerCategory](/engine/6000.0/script-reference/unity/profiling/profilercategory.md) where N is the size of the provided array if the size isn't enough. Use together with [Profiler.GetCategoriesCount](/engine/6000.0/script-reference/unityengine/profiling/profiler/getcategoriescount.md) to get the required size.

## GetAllCategories(NativeArray\<ProfilerCategory>)

Returns all [ProfilerCategory](/engine/6000.0/script-reference/unity/profiling/profilercategory.md) registered in Profiler.

```csharp
[Conditional("ENABLE_PROFILER")]
public static void GetAllCategories(NativeArray<ProfilerCategory> categories)
```

### Parameters

**** (\[NativeArray\<ProfilerCategory>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)):&#x20;

### Remarks

Fills the provided array with a list of [ProfilerCategory](/engine/6000.0/script-reference/unity/profiling/profilercategory.md) registered in the Profiler. It is a user's responsibility to provide an array with enough space. Returns first N [ProfilerCategory](/engine/6000.0/script-reference/unity/profiling/profilercategory.md) where N is the size of the provided array if the size isn't enough. Use together with [Profiler.GetCategoriesCount](/engine/6000.0/script-reference/unityengine/profiling/profiler/getcategoriescount.md) to get the required size.
