Photon Bolt Engine API
Networking Middleware
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

component
 
readonly GameObject go
 
readonly bool children
 

Properties

bool Exists [get]
 Returns false if the component is currently null More...
 
Component [get]
 Returns the cached component 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

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

Member Data Documentation

readonly bool Bolt.CachedComponent< T >.children
T Bolt.CachedComponent< T >.component
readonly GameObject Bolt.CachedComponent< T >.go

Property Documentation

T Bolt.CachedComponent< T >.Component
get

Returns the cached component

bool Bolt.CachedComponent< T >.Exists
get

Returns false if the component is currently null