Method WithAll
WithAll<T1>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T1, T2>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1, T2>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
T2 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T1, T2, T3>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1, T2, T3>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
T2 | A required component type |
T3 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T1, T2, T3, T4>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1, T2, T3, T4>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
T2 | A required component type |
T3 | A required component type |
T4 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T1, T2, T3, T4, T5>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1, T2, T3, T4, T5>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
T2 | A required component type |
T3 | A required component type |
T4 | A required component type |
T5 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T1, T2, T3, T4, T5, T6>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1, T2, T3, T4, T5, T6>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
T2 | A required component type |
T3 | A required component type |
T4 | A required component type |
T5 | A required component type |
T6 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T1, T2, T3, T4, T5, T6, T7>()
Add required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData), typeof(BurstCompatibleComponentData) })]
public EntityQueryBuilder WithAll<T1, T2, T3, T4, T5, T6, T7>()
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T1 | A required component type |
T2 | A required component type |
T3 | A required component type |
T4 | A required component type |
T5 | A required component type |
T6 | A required component type |
T7 | A required component type |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.
WithAll accepts up to seven type arguments. You can add more component types by chaining calls together.
var query = new EntityQueryBuilder(Allocator.Temp)
.WithAll<ObjectPosition, ObjectVelocity>()
.WithAll<ObjectRotation, ObjectRotationSpeed>()
.Build(this);
To add component types that are not known at compile time, use WithAll<T>(ref T)
The query will request read-only access to the referenced component(s). To request read/write access, use Unity.Entities.EntityQueryBuilder.WithAllRW``1(``0@)
WithAll<T>(ref T)
Add a list of required component types to the query.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(FixedList32Bytes<ComponentType>) })]
public EntityQueryBuilder WithAll<T>(ref T componentTypes) where T : INativeList<ComponentType>
Parameters
Type | Name | Description |
---|---|---|
T | componentTypes | A list of component types that implements INativeList<T>. For example, NativeList<T> or FixedList64Bytes<T> |
Returns
Type | Description |
---|---|
EntityQueryBuilder | The builder object that invoked this method. |
Type Parameters
Name | Description |
---|---|
T | A container of component types |
Remarks
To match the resulting query, an Entity must have all of the query's required component types.