Click or drag to resize

GameObjectExtensionsAddComponentCopy Method

Adds a copy of a particular component

Namespace:  ImmerseSDK.Extensions
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.5.0.0 (3.5.0.0)
Syntax
C#
public static UnityEngine.Component AddComponentCopy(
	this UnityEngine.GameObject go,
	UnityEngine.Component toCopy
)

Parameters

go
Type: UnityEngine.GameObject
The GameObject to add the component to
toCopy
Type: UnityEngine.Component
The component to copy

Return Value

Type: UnityEngine.Component

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