SceneTrace WithAllTags( System.String[] tags )
SceneTrace WithAllTags( ITagSet tags )

book_4_sparkGenerated
code_blocksInput

Description

The WithAllTags method in the SceneTrace struct is used to filter entities in a scene trace operation. It ensures that only entities possessing all specified tags are considered in the trace results. This method is particularly useful when you need to perform operations on entities that meet multiple tag criteria simultaneously.

Usage

To use the WithAllTags method, you need to pass an array of strings representing the tags that the entities must have. The method returns a SceneTrace object, allowing for method chaining to further refine the trace operation.

Example

// Example usage of WithAllTags method
SceneTrace trace = new SceneTrace();
trace = trace.WithAllTags(new string[] { "enemy", "active" });
SceneTraceResult result = trace.Run();

// This will only return entities that have both "enemy" and "active" tags.