# GetIndicesWithoutFlags

> Gets the indices of all hierarchy nodes that do not have all of the specified flags set.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Hierarchy](/engine/6000.5/script-reference/unity/hierarchy.md)
* **Assembly:** UnityEngine.HierarchyCoreModule

## GetIndicesWithoutFlags(HierarchyNodeFlags, Span\<int>)

Gets the indices of all hierarchy nodes that do not have all of the specified flags set.

```csharp
public int GetIndicesWithoutFlags(HierarchyNodeFlags flags, Span<int> outIndices)
```

### Parameters

**** (\[HierarchyNodeFlags]\(/engine/6000.5/script-reference/unity/hierarchy/hierarchynodeflags)): The hierarchy node flags.**** (\[Span\<int>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): The hierarchy node indices.

### Returns

| Type                                                       | Description                                             |
| ---------------------------------------------------------- | ------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of indices written in the `outIndices` span. |

## GetIndicesWithoutFlags(HierarchyNodeFlags)

Gets the indices of all hierarchy nodes that do not have all of the specified flags set.

```csharp
public int[] GetIndicesWithoutFlags(HierarchyNodeFlags flags)
```

### Parameters

**** (\[HierarchyNodeFlags]\(/engine/6000.5/script-reference/unity/hierarchy/hierarchynodeflags)): The hierarchy node flags.

### Returns

| Type                                                           | Description                 |
| -------------------------------------------------------------- | --------------------------- |
| [int\[\]](https://learn.microsoft.com/dotnet/api/system.int32) | The hierarchy node indices. |
