# HasFlags

> Gets whether or not all of the specified flags are set on any hierarchy node.

## Definition

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

## HasFlags(HierarchyNodeFlags)

Gets whether or not all of the specified flags are set on any hierarchy node.

```csharp
public bool HasFlags(HierarchyNodeFlags flags)
```

### Parameters

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

### Returns

| Type                                                          | Description                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if any node have all of the flags set, `false` otherwise. |

## HasFlags(HierarchyNode, HierarchyNodeFlags)

Gets whether or not all of the specified flags are set on the hierarchy node.

```csharp
public bool HasFlags(in HierarchyNode node, HierarchyNodeFlags flags)
```

### Parameters

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

### Returns

| Type                                                          | Description                                            |
| ------------------------------------------------------------- | ------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if all of the flags are set, `false` otherwise. |
