Entitas  0.40.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
Static Public Member Functions | List of all members
Entitas.CollectionExtension Class Reference

Static Public Member Functions

static IEntity SingleEntity (this ICollection< IEntity > collection)
 
static TEntity SingleEntity< TEntity > (this ICollection< TEntity > collection)
 

Detailed Description

Definition at line 5 of file CollectionExtension.cs.

Member Function Documentation

◆ SingleEntity()

static IEntity Entitas.CollectionExtension.SingleEntity ( this ICollection< IEntity collection)
inlinestatic

Returns the only entity in the collection. It will throw an exception if the collection doesn't have exactly one entity.

Definition at line 10 of file CollectionExtension.cs.

◆ SingleEntity< TEntity >()

static TEntity Entitas.CollectionExtension.SingleEntity< TEntity > ( this ICollection< TEntity >  collection)
inlinestatic

Returns the only entity in the collection. It will throw an exception if the collection doesn't have exactly one entity.

Type Constraints
TEntity :class 
TEntity :IEntity 
TEntity :new() 

Definition at line 21 of file CollectionExtension.cs.


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