Version: 2022.2

HierarchyDropFlags

enumeration

切换到手册

描述

Define how dragged objects should be dropped relative to already existing Hierarchy items.

变量

NoneInsert dragged object in the Hierarchy. The default flag value is 0. The only case in which DropMode is 0 is when dragging outside items and parentForDraggedObjects is set. Then dropTargetInstanceID is 0 and the target is passed to the parentForDraggedObjects.
DropUponDrop a dragged object on the Hierarchy item the mouse is hovering over. The hovered-over item is the dropTargetInstanceID and the dropped object is inserted as a child of the target. This flag is also used when dragging and dropping objects from outside the Hierarchy and into and below the last item in the Hierarchy to add to the Scene. In this case, the dropTargetInstanceID is the Scene handle.
DropBetweenDrop a dragged object between two Hierarchy sibling items the mouse is hovered over. The dropTargetInstanceID is the Hierarchy item above the hover point, the dropped object is inserted below the target.
DropAfterParentDrop a dragged object into the first child position after the parent of the Hierarchy item when the mouse is hovering between the parent and the first child. The dropTargetInstanceID is the first child under a parent and the dropped object is inserted between the parent and the first child. When using DropAfterParent, DropBetween and DropAbove are also used to provide information to locate the dropped object.
SearchActiveThis flag is set if the Hierarchy is showing search results. If a search is active, only DropUpon is allowed (no other actions can be performed on a partial list of items).
DropAboveDrop a dragged object above the Hierarchy sibling item the mouse is hovered over. The dropTargetInstanceID is the Hierarchy item below the hover point and the dropped object is inserted above the target.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961