void RemoveChild( SceneObject child )

book_4_sparkGenerated
code_blocksInput

Description

The RemoveChild method is used to remove a specified child SceneObject from the current SceneObject. This operation detaches the child from its parent, effectively removing it from the scene hierarchy under this object.

Usage

To use the RemoveChild method, you need to have a reference to the parent SceneObject and the child SceneObject you wish to remove. Call the method on the parent object, passing the child object as a parameter.

Example

// Assume 'parentObject' is a SceneObject with children
// and 'childObject' is a SceneObject that is a child of 'parentObject'

parentObject.RemoveChild(childObject);

// After this call, 'childObject' will no longer be a child of 'parentObject'.