ObjectExtensions.FindNonNullReference<T>

Extension Method in ObjectExtensions

Declaration

public static T FindNonNullReference<T>(this T obj)

Description

Finds a reference to the specified object type in the scene. If the object reference is already assigned, then the current reference will be returned.

Type Parameters

TThe type of object to find.

Parameters

objThe object to find the reference for.

Returns

TThe reference to the object if it exists.