Struct ComponentSet
Represents an immutable set of component identifiers used to define a group of components within an entity or system.
public struct ComponentSet : IDisposable, IEquatable<ComponentSet>
- Implements
- Inherited Members
Constructors
ComponentSet(AllocationHandle, params ReadOnlySpan<Identifier<IComponent>>)
public ComponentSet(AllocationHandle allocationHandle, params ReadOnlySpan<Identifier<IComponent>> components)
Parameters
allocationHandleAllocationHandlecomponentsReadOnlySpan<Identifier<IComponent>>
ComponentSet(Allocator, params ReadOnlySpan<Identifier<IComponent>>)
public ComponentSet(Allocator allocator, params ReadOnlySpan<Identifier<IComponent>> components)
Parameters
allocatorAllocatorcomponentsReadOnlySpan<Identifier<IComponent>>
Properties
Components
public readonly ReadOnlySpan<Identifier<IComponent>> Components { get; }
Property Value
- ReadOnlySpan<Identifier<IComponent>>
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equals(ComponentSet)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(ComponentSet other)
Parameters
otherComponentSetAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(ComponentSet, ComponentSet)
public static bool operator ==(ComponentSet left, ComponentSet right)
Parameters
leftComponentSetrightComponentSet
Returns
operator !=(ComponentSet, ComponentSet)
public static bool operator !=(ComponentSet left, ComponentSet right)
Parameters
leftComponentSetrightComponentSet