‪TechbloxModdingAPI  ‪v2.2.0
‪The unofficial Techblox modding API
TechbloxModdingAPI.Utility.ManagedApiExtensions Class Reference

Static Public Member Functions

static OptionalRef< T > QueryEntityOptional< T > (this EntitiesDB entitiesDB, EcsObjectBase obj, ExclusiveGroupStruct group=default)
 ‪Attempts to query an entity and returns the result in an optional reference. More...
 
static OptionalRef< T > QueryEntityOptional< T > (this EntitiesDB entitiesDB, EGID egid)
 ‪Attempts to query an entity and returns an optional that contains the result if succeeded. This overload does not take initializer data into account. More...
 
static ref T QueryEntityOrDefault< T > (this EntitiesDB entitiesDB, EcsObjectBase obj, ExclusiveGroupStruct group=default)
 ‪Attempts to query an entity and returns the result or a dummy value that can be modified. More...
 

Member Function Documentation

◆ QueryEntityOptional< T >() [1/2]

static OptionalRef<T> TechbloxModdingAPI.Utility.ManagedApiExtensions.QueryEntityOptional< T > ( this EntitiesDB  entitiesDB,
EcsObjectBase  obj,
ExclusiveGroupStruct  group = default 
)
inlinestatic

‪Attempts to query an entity and returns the result in an optional reference.

Parameters
entitiesDB‪The entities DB to query from
obj‪The ECS object to query
group‪The group of the entity if the object can have multiple
Template Parameters
T‪The component to query
Returns
‪A reference to the component or a dummy value
Type Constraints
T :struct 
T :IEntityViewComponent 

◆ QueryEntityOptional< T >() [2/2]

static OptionalRef<T> TechbloxModdingAPI.Utility.ManagedApiExtensions.QueryEntityOptional< T > ( this EntitiesDB  entitiesDB,
EGID  egid 
)
inlinestatic

‪Attempts to query an entity and returns an optional that contains the result if succeeded. This overload does not take initializer data into account.

Parameters
entitiesDB‪The entities DB
egid‪The EGID to query
Template Parameters
T‪The component type to query
Returns
‪An optional that contains the result on success or is empty if not found
Type Constraints
T :struct 
T :IEntityViewComponent 

◆ QueryEntityOrDefault< T >()

static ref T TechbloxModdingAPI.Utility.ManagedApiExtensions.QueryEntityOrDefault< T > ( this EntitiesDB  entitiesDB,
EcsObjectBase  obj,
ExclusiveGroupStruct  group = default 
)
inlinestatic

‪Attempts to query an entity and returns the result or a dummy value that can be modified.

Parameters
entitiesDB‪The entities DB to query from
obj‪The ECS object to query
group‪The group of the entity if the object can have multiple
Template Parameters
T‪The component to query
Returns
‪A reference to the component or a dummy value
Type Constraints
T :struct 
T :IEntityViewComponent 

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