Table of Contents

Class Extensions

Namespace
TMPEffects.Extensions
Assembly
TMPEffects.dll
public static class Extensions
Inheritance
Extensions
Inherited Members

Methods

GetOrAddComponent<T>(GameObject)

Gets a reference to a component of type T on the specified GameObject.
Will first add the component if not already present.

public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component

Parameters

gameObject GameObject

Returns

T

A reference to a component of the type T.

Type Parameters

T

The type of Component to search for.