Struct: FArchetypeSignature
struct SYSTEMS_API FArchetypeSignature;
Reflection-enabled
Signature of actor components set.
More in depth about archetype signatures in this architecture book section.
Signatures are used internally by USystemsWorld to allow
identification of to which buckets (archetypes) given set of components
belongs to - that allows for querying iterators over only these actor
components that contain all requested components and omiting ones that
doesn't, which improves performance of querying systems world (which is the
most frequently used operation in systems game architecture, hence the
importance of making it fast).
Note
Although constructing signatures has no real value for common usecases while developing games this API can be useful for users that needs to perform more advanced operations.
Example
// Instead of this:
const auto A = Systems.Query<UShiaComponent>().Count();
// You can do this:
auto Signature = FArchetypeSignature();
if (const auto Index = Systems.ComponentTypeIndex(UShiaComponent::StaticClass()))
{
Signature.EnableBit(Index.GetValue());
}
const auto B = Systems.CountRaw(Signature);
Methods
-
Clearpublic: void Clear();
Clears components set.
-
ContainsAllpublic: bool ContainsAll( const FArchetypeSignature& Other ) const;
Checks if this signature fully contain component set of another signature.
Used by
USystemsWorld::Queryto filter archetypes that are valid for iteration.
Arguments
-
Otherconst FArchetypeSignature& OtherOther signature to compare with.
-
-
ContainsAnypublic: bool ContainsAny( const FArchetypeSignature& Other ) const; -
CountBitspublic: uint32 CountBits() const;
Counts bits of enabled components in set.
-
Differencepublic: FArchetypeSignature Difference( const FArchetypeSignature& Other ) const; -
DisableBitpublic: void DisableBit( uint32 Index ); -
EnableBitpublic: void EnableBit( uint32 Index ); -
Excludepublic: FArchetypeSignature Exclude( const FArchetypeSignature& Other ) const; -
FArchetypeSignaturepublic: FArchetypeSignature();
Constructs signature of empty components set.
-
FArchetypeSignaturepublic: FArchetypeSignature( const FArchetypeSignature& Other ); -
FArchetypeSignaturepublic: FArchetypeSignature( uint32 Bit ); -
HasBitpublic: bool HasBit( uint32 Index ) const; -
Includepublic: FArchetypeSignature Include( const FArchetypeSignature& Other ) const; -
IsEmptypublic: bool IsEmpty() const;
Checks if components set is empty.
-
Unionpublic: FArchetypeSignature Union( const FArchetypeSignature& Other ) const;
Documentation built with Unreal-Doc v1.0.8 tool by PsichiX