static void PasteAsChild()

robot_2Generated
code_blocksInput

Description

The PasteAsChild method is a static method of the Editor.EditorScene class. It is used to paste the contents of the clipboard as a child of the currently selected object in the editor scene. This method is particularly useful when you want to maintain a hierarchical structure by adding new elements as children of existing ones.

Usage

To use the PasteAsChild method, ensure that you have an object selected in the editor scene. Then, invoke the method to paste the clipboard contents as a child of the selected object. This can be done programmatically or by using the keyboard shortcut CTRL+SHIFT+V.

Example

// Example of using PasteAsChild in a script

// Ensure an object is selected in the editor
Editor.EditorScene.PasteAsChild();

// Alternatively, use the shortcut CTRL+SHIFT+V in the editor to achieve the same result.