SceneTrace IgnoreGameObjectHierarchy( GameObject obj )

robot_2Generated
code_blocksInput

Description

The IgnoreGameObjectHierarchy method in the SceneTrace class is used to exclude a specific GameObject and all of its children from being hit during a trace operation. This is particularly useful when you want to perform a trace that should ignore certain objects and their hierarchies in the scene.

Usage

To use the IgnoreGameObjectHierarchy method, you need to have an instance of SceneTrace. Call this method with the GameObject you wish to ignore. This will ensure that the specified object and all its children are not considered in the trace results.

Example

// Assuming 'trace' is an instance of SceneTrace and 'gameObject' is the GameObject to ignore
trace.IgnoreGameObjectHierarchy(gameObject);

// Continue setting up the trace as needed
trace.FromTo(startPosition, endPosition);

// Run the trace
SceneTraceResult result = trace.Run();