Language
Edit

ComponentCache<T> Class

Definition

A static helper class which caches instances of a component of type T. This is called in place of calling FindFirstObjectByType and FindObjectsByType to improve performance.

public static class ComponentCache<T> where T : Component
type ComponentCache<'T (requires 'T :> Component)> = class
Public Class ComponentCache(Of T)

Type Parameters

T
Inheritance
ComponentCache<T>

Methods

Name Description
FindFirstActiveInstance()

Finds the first instance of an object of the given type.

TryFindFirstActiveInstance(T)

Finds the first instance of an object of the given type.

Applies to