Click or drag to resize

GameObjectExtensionsAddToChildrenT Method

Adds a component to all children

Namespace:  ImmerseSDK.Extensions
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.5.0.0 (3.5.0.0)
Syntax
C#
public static T[] AddToChildren<T>(
	this UnityEngine.GameObject target,
	bool recursive
)
where T : UnityEngine.Component

Parameters

target
Type: UnityEngine.GameObject
Parent GameObject
recursive
Type: SystemBoolean
Should it include children of children?

Type Parameters

T
Type of component

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type UnityEngine.GameObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also