Table of Contents

Struct QueryBuilder

Namespace
Ghost.Entities
Assembly
Ghost.Entities.dll
public ref struct QueryBuilder : IDisposable
Implements
Inherited Members

Constructors

QueryBuilder()

public QueryBuilder()

Methods

Build(World, bool)

public Identifier<EntityQuery> Build(World world, bool dispose = true)

Parameters

world World
dispose bool

Returns

Identifier<EntityQuery>

BuildWithoutCache(World, AllocationHandle, bool)

public EntityQuery BuildWithoutCache(World world, AllocationHandle allocationHandle, bool dispose = true)

Parameters

world World
allocationHandle AllocationHandle
dispose bool

Returns

EntityQuery

Clear()

public void Clear()

Create()

public static QueryBuilder Create()

Returns

QueryBuilder

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public readonly void Dispose()

WithAbsent(params Span<Identifier<IComponent>>)

public void WithAbsent(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithAbsent<T0>()

Adds the specified component type(s) to the 'Absent' filter of the query. Targets entities that do not have any of the specified component types.

[UnscopedRef]
public ref QueryBuilder WithAbsent<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithAbsent<T0, T1>()

Adds the specified component type(s) to the 'Absent' filter of the query. Targets entities that do not have any of the specified component types.

[UnscopedRef]
public ref QueryBuilder WithAbsent<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithAbsent<T0, T1, T2>()

Adds the specified component type(s) to the 'Absent' filter of the query. Targets entities that do not have any of the specified component types.

[UnscopedRef]
public ref QueryBuilder WithAbsent<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithAll(params Span<Identifier<IComponent>>)

public void WithAll(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithAllRW<T0>()

Adds the specified component type(s) to the 'All' filter of the query and requires read-write access. Targets entities that have all of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAllRW<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithAllRW<T0, T1>()

Adds the specified component type(s) to the 'All' filter of the query and requires read-write access. Targets entities that have all of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAllRW<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithAllRW<T0, T1, T2>()

Adds the specified component type(s) to the 'All' filter of the query and requires read-write access. Targets entities that have all of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAllRW<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithAll<T0>()

Adds the specified component type(s) to the 'All' filter of the query. Targets entities that have all of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAll<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithAll<T0, T1>()

Adds the specified component type(s) to the 'All' filter of the query. Targets entities that have all of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAll<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithAll<T0, T1, T2>()

Adds the specified component type(s) to the 'All' filter of the query. Targets entities that have all of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAll<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithAny(params Span<Identifier<IComponent>>)

public void WithAny(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithAny<T0>()

Adds the specified component type(s) to the 'Any' filter of the query. Targets entities that have at least one of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAny<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithAny<T0, T1>()

Adds the specified component type(s) to the 'Any' filter of the query. Targets entities that have at least one of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAny<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithAny<T0, T1, T2>()

Adds the specified component type(s) to the 'Any' filter of the query. Targets entities that have at least one of the specified component types and those component(s) must be enabled.

[UnscopedRef]
public ref QueryBuilder WithAny<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithDisabled(params Span<Identifier<IComponent>>)

public void WithDisabled(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithDisabled<T0>()

Adds the specified component type(s) to the 'Disabled' filter of the query. Targets entities that have all of the specified component types and those component(s) are disabled.

[UnscopedRef]
public ref QueryBuilder WithDisabled<T0>() where T0 : unmanaged, IEnableableComponent

Returns

QueryBuilder

Type Parameters

T0

WithDisabled<T0, T1>()

Adds the specified component type(s) to the 'Disabled' filter of the query. Targets entities that have all of the specified component types and those component(s) are disabled.

[UnscopedRef]
public ref QueryBuilder WithDisabled<T0, T1>() where T0 : unmanaged, IEnableableComponent where T1 : unmanaged, IEnableableComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithDisabled<T0, T1, T2>()

Adds the specified component type(s) to the 'Disabled' filter of the query. Targets entities that have all of the specified component types and those component(s) are disabled.

[UnscopedRef]
public ref QueryBuilder WithDisabled<T0, T1, T2>() where T0 : unmanaged, IEnableableComponent where T1 : unmanaged, IEnableableComponent where T2 : unmanaged, IEnableableComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithNone(params Span<Identifier<IComponent>>)

public void WithNone(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithNone<T0>()

Adds the specified component type(s) to the 'None' filter of the query. Targets entities that do not have any of the specified component types, or those component(s) are disabled.

[UnscopedRef]
public ref QueryBuilder WithNone<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithNone<T0, T1>()

Adds the specified component type(s) to the 'None' filter of the query. Targets entities that do not have any of the specified component types, or those component(s) are disabled.

[UnscopedRef]
public ref QueryBuilder WithNone<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithNone<T0, T1, T2>()

Adds the specified component type(s) to the 'None' filter of the query. Targets entities that do not have any of the specified component types, or those component(s) are disabled.

[UnscopedRef]
public ref QueryBuilder WithNone<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithPresent(params Span<Identifier<IComponent>>)

public void WithPresent(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithPresentRW(params Span<Identifier<IComponent>>)

public void WithPresentRW(params Span<Identifier<IComponent>> componentIDs)

Parameters

componentIDs Span<Identifier<IComponent>>

WithPresentRW<T0>()

Adds the specified component type(s) to the 'Present' filter of the query and requires read-write access. Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.

[UnscopedRef]
public ref QueryBuilder WithPresentRW<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithPresentRW<T0, T1>()

Adds the specified component type(s) to the 'Present' filter of the query and requires read-write access. Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.

[UnscopedRef]
public ref QueryBuilder WithPresentRW<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithPresentRW<T0, T1, T2>()

Adds the specified component type(s) to the 'Present' filter of the query and requires read-write access. Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.

[UnscopedRef]
public ref QueryBuilder WithPresentRW<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2

WithPresent<T0>()

Adds the specified component type(s) to the 'Present' filter of the query. Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.

[UnscopedRef]
public ref QueryBuilder WithPresent<T0>() where T0 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0

WithPresent<T0, T1>()

Adds the specified component type(s) to the 'Present' filter of the query. Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.

[UnscopedRef]
public ref QueryBuilder WithPresent<T0, T1>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1

WithPresent<T0, T1, T2>()

Adds the specified component type(s) to the 'Present' filter of the query. Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.

[UnscopedRef]
public ref QueryBuilder WithPresent<T0, T1, T2>() where T0 : unmanaged, IComponent where T1 : unmanaged, IComponent where T2 : unmanaged, IComponent

Returns

QueryBuilder

Type Parameters

T0
T1
T2