Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
EditorSelection¶
Inherits: Object
管理编辑器中的 SceneTree 选择。
Description¶
这个对象管理编辑器中的 SceneTree 选择。
注意:这个类不应该直接实例化。相反,使用EditorInterface.get_selection访问单例。
Methods¶
void |
|
void |
clear ( ) |
void |
remove_node ( Node node ) |
Signals¶
selection_changed ( )
更改选择时发出。
Method Descriptions¶
void add_node ( Node node )
将一个节点添加到选择中。
注意:新选择的节点不会在检查器中自动被编辑。如果你想编辑一个节点,请使用 EditorInterface.edit_node。
void clear ( )
清除选中项。
Node[] get_selected_nodes ( )
获取所选节点的列表。
Node[] get_transformable_selected_nodes ( )
获取所选节点的列表,针对变换操作(如移动、旋转等)进行优化。这个列表避免了节点被选中的情况,也避免了子/孙节点被选中的情况。
void remove_node ( Node node )
从选择中删除一个节点。