Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ToggleFlags

Toggles the specified flags on all hierarchy nodes.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Method
  • Namespace: Unity.Hierarchy
  • Assembly: UnityEngine.HierarchyCoreModule

ToggleFlags(HierarchyNodeFlags)

Toggles the specified flags on all hierarchy nodes.
public void ToggleFlags(HierarchyNodeFlags flags)

Parameters

The hierarchy node flags.

ToggleFlags(HierarchyNode, HierarchyNodeFlags)

Toggles the specified flags on the hierarchy node.
public void ToggleFlags(in HierarchyNode node, HierarchyNodeFlags flags)

Parameters

The hierarchy node.

The hierarchy node flags.

ToggleFlags(ReadOnlySpan<HierarchyNode>, HierarchyNodeFlags)

Toggles the specified flags on the hierarchy nodes.
public int ToggleFlags(ReadOnlySpan<HierarchyNode> nodes, HierarchyNodeFlags flags)

Parameters

The hierarchy nodes.

The hierarchy node flags.

Returns

Type

Description

intThe number of nodes that had their flags cleared.

Remarks

Null or invalid nodes are ignored.

ToggleFlags(ReadOnlySpan<int>, HierarchyNodeFlags)

Toggles the specified flags on the hierarchy node indices.
public int ToggleFlags(ReadOnlySpan<int> indices, HierarchyNodeFlags flags)

Parameters

The hierarchy node indices.

The hierarchy node flags.

Returns

Type

Description

intThe number of nodes that had their flags cleared.

Remarks

Invalid node indices are ignored.

ToggleFlags(HierarchyNode, HierarchyNodeFlags, bool)

Toggles the specified flags on all hierarchy nodes.
Warning
Deprecated. ToggleFlags(node, flags, recurse) with a bool parameter is obsolete, please use ToggleFlags(node, flags) or ToggleFlags(node, flags, direction) instead.
public void ToggleFlags(in HierarchyNode node, HierarchyNodeFlags flags, bool recurse)

Parameters


The hierarchy node flags.

recurse