Depiction Engine For Unity 2023.0 (Alpha)
Loading...
Searching...
No Matches
DepictionEngine.GameObjectExtension Class Reference

Static Public Member Functions

static T AddComponentInitialized< T > (this GameObject go, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false, bool initialize=true, bool registerCreatedUndo=false)
 A wrapper method to GameObject.AddComponent<T> which automatically initializes the component, if it is an IDisposable, and optionaly registers a create Undo if in Editor.
 
static Component AddComponentInitialized (this GameObject go, Type type, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false, bool initialize=true, bool registerCreatedUndo=false)
 A wrapper method to GameObject.AddComponent(Type) which automatically initializes the component, if it is an IDisposable, and optionaly registers a create Undo if in Editor.
 
static T GetComponentInitialized< T > (this GameObject go, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 A wrapper method to GameObject.GetComponent<T> which returns an initialized Component, if it is an IDisposable, of the requested type.
 
static Component GetComponentInitialized (this GameObject go, Type type, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 A wrapper method to GameObject.GetComponent(Type) which returns an initialized Component, if it is an IDisposable, of the requested type.
 
static T GetComponentInParentInitialized< T > (this GameObject go, bool includeInactive, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 A wrapper method to GameObject.GetComponentInParent<T> which returns an initialized Component found in a parent, if it is an IDisposable, of the requested type.
 
static Component GetComponentInParentInitialized (this GameObject go, Type type, bool includeInactive, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 A wrapper method to GameObject.GetComponentInParent(Type) which returns an initialized Component found in a parent(if it is an IDisposable) of the requested type.
 
static IDisposable GetObjectOrVisualComponent (this GameObject _, Component[] components)
 Returns an DepictionEngine.Object or DepictionEngine.Visual component found in the GameObject.
 
static void SetLayerRecursively (this GameObject go, int layer)
 

Member Function Documentation

◆ AddComponentInitialized()

static Component DepictionEngine.GameObjectExtension.AddComponentInitialized ( this GameObject  go,
Type  type,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false,
bool  initialize = true,
bool  registerCreatedUndo = false 
)
static

A wrapper method to GameObject.AddComponent(Type) which automatically initializes the component, if it is an IDisposable, and optionaly registers a create Undo if in Editor.

Parameters
go
type
initializingContext
json
propertyModifiers
isFallbackValues
initialize
registerCreatedUndo
Returns
The created Component.

◆ AddComponentInitialized< T >()

static T DepictionEngine.GameObjectExtension.AddComponentInitialized< T > ( this GameObject  go,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false,
bool  initialize = true,
bool  registerCreatedUndo = false 
)
static

A wrapper method to GameObject.AddComponent<T> which automatically initializes the component, if it is an IDisposable, and optionaly registers a create Undo if in Editor.

Template Parameters
T
Parameters
go
initializingContext
json
propertyModifiers
isFallbackValues
initialize
registerCreatedUndo
Returns
The created Component.
Type Constraints
T :Component 

◆ GetComponentInitialized()

static Component DepictionEngine.GameObjectExtension.GetComponentInitialized ( this GameObject  go,
Type  type,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false 
)
static

A wrapper method to GameObject.GetComponent(Type) which returns an initialized Component, if it is an IDisposable, of the requested type.

Parameters
go
type
initializingContext
json
propertyModifiers
isFallbackValues
Returns
The initialized Component, if one was found.

◆ GetComponentInitialized< T >()

static T DepictionEngine.GameObjectExtension.GetComponentInitialized< T > ( this GameObject  go,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false 
)
static

A wrapper method to GameObject.GetComponent<T> which returns an initialized Component, if it is an IDisposable, of the requested type.

Template Parameters
T
Parameters
go
initializingContext
json
propertyModifiers
isFallbackValues
Returns
The initialized Component, if one was found.
Type Constraints
T :Component 

◆ GetComponentInParentInitialized()

static Component DepictionEngine.GameObjectExtension.GetComponentInParentInitialized ( this GameObject  go,
Type  type,
bool  includeInactive,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false 
)
static

A wrapper method to GameObject.GetComponentInParent(Type) which returns an initialized Component found in a parent(if it is an IDisposable) of the requested type.

Parameters
go
type
includeInactive
initializingContext
json
propertyModifiers
isFallbackValues
Returns
The initialized Component, if one was found.

◆ GetComponentInParentInitialized< T >()

static T DepictionEngine.GameObjectExtension.GetComponentInParentInitialized< T > ( this GameObject  go,
bool  includeInactive,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false 
)
static

A wrapper method to GameObject.GetComponentInParent<T> which returns an initialized Component found in a parent, if it is an IDisposable, of the requested type.

Template Parameters
T
Parameters
go
includeInactive
initializingContext
json
propertyModifiers
isFallbackValues
Returns
The initialized Component, if one was found.
Type Constraints
T :Component 

◆ GetObjectOrVisualComponent()

static IDisposable DepictionEngine.GameObjectExtension.GetObjectOrVisualComponent ( this GameObject  _,
Component[]  components 
)
static

Returns an DepictionEngine.Object or DepictionEngine.Visual component found in the GameObject.

Parameters
_
components
Returns

The documentation for this class was generated from the following file: