Photon Bolt Engine API  1.2.0.3
Public Member Functions | Public Attributes | Properties | List of all members
Bolt.CachedComponent< T > Struct Template Reference

Utility struct for caching a unity component on the same object (or children) field on a class More...

Public Member Functions

 CachedComponent (GameObject gameObject, bool scanChildren)
 

Public Attributes

readonly bool children
 
component
 
readonly GameObject go
 

Properties

Component [get]
 Returns the cached component More...
 
bool Exists [get]
 Returns false if the component is currently null More...
 

Detailed Description

Utility struct for caching a unity component on the same object (or children) field on a class

Template Parameters
TThe component type
Type Constraints
T :Component 

Constructor & Destructor Documentation

◆ CachedComponent()

Bolt.CachedComponent< T >.CachedComponent ( GameObject  gameObject,
bool  scanChildren 
)
inline

Member Data Documentation

◆ children

readonly bool Bolt.CachedComponent< T >.children

◆ component

T Bolt.CachedComponent< T >.component

◆ go

readonly GameObject Bolt.CachedComponent< T >.go

Property Documentation

◆ Component

T Bolt.CachedComponent< T >.Component
get

Returns the cached component

◆ Exists

bool Bolt.CachedComponent< T >.Exists
get

Returns false if the component is currently null