Version: 2022.2
Experimental: this API is experimental and might be changed or removed in the future.

GraphElement

class in UnityEditor.Experimental.GraphView


实现接口:IEventHandler, IExperimentalFeatures, IResolvedStyle, ISelectable, ITransform, ITransitionAnimations, IVisualElementScheduler

切换到手册

描述

主要 GraphView VisualElements 的基类。

变量

capabilitiesGraphElement 的功能。
elementTypeColor用于 MiniMap 视图的颜色。
layer图形中的 GraphElement 图层。
selected如果当前已选择 GraphElement,则为 true。
showInMiniMapWhether the element is shown in the minimap.
titleGraphElement 的标题。

公共函数

GetGlobalCenter获取 GraphElement 的中心点。
GetPosition获取 GraphElement 定位。
HitTest查看点是否在 GraphElement 之上。
IsAscendable检查 GraphElement 被选中时是否会被自动带到前面。
IsCopiableChecks whether the GraphElement is copiable.
IsDroppableGraphElement 可拖放。
IsGroupableChecks whether the GraphElement is groupable.
IsMovableGraphElement 可以移动。
IsRenamableGraphElement 可以重命名。
IsResizableGraphElement 可以重新确定大小。
IsSelectableGraphElement 是可选择的。
IsSelected当前已在特定容器中选择 GraphElement。
IsSnappableChecks whether the GraphElement is snappable.
IsStackableChecks whether the GraphElement is stackable.
OnSelected在选择 GraphElement 时调用。
OnUnselected在取消选择 GraphElement 时调用。
ResetLayer将 GraphElement 重置为其原始图层。
Select选择 GraphElement。
SetPosition设置 GraphElement 定位。
Unselect取消选择 GraphElement。

受保护的函数

OnCustomStyleResolved当自定义样式属性解析时调用。