Description
The SkipToolsMaterials
method in the Editor.Trace
struct is used to configure a trace operation to ignore materials that are marked with the tools.toolsmaterial
attribute. This is particularly useful when you want to perform trace operations that should not interact with certain tool-specific materials, allowing for more precise and relevant trace results.
Usage
To use the SkipToolsMaterials
method, you should call it on an instance of Editor.Trace
. This method modifies the trace configuration to skip over any materials that have the tools.toolsmaterial
attribute. This is typically used in conjunction with other trace configuration methods to set up a trace operation before executing it with the Run
method.
Example
// Example of using SkipToolsMaterials in a trace operation
Editor.Trace trace = new Editor.Trace();
trace = trace.SkipToolsMaterials();
// Configure other trace settings as needed
trace = trace.MeshesOnly();
// Run the trace in a specific world context
Editor.TraceResult result = trace.Run(world);