ClickedObject
The element directly under the cursor at the time of the right-click, or null when the click landed on empty space or on an element that is not exposed through the public API.
読み終わるまでの所要時間 1 分最終更新 3日前
Definition
- Type: Property
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public object ClickedObject { get; }
Remarks
Test the runtime type to filter on a specific element kind, for example . Depending on the surface the handler is registered for, the value can be an INode, an IPort, a Wire, an IVariable, an IState, an ITransition or an ICondition. A subgraph state is an ISubgraphState, which derives from IState.
context.ClickedObject is INode nodeIf the script of a node, state or condition is missing, the value is still an INode, IState or ICondition, but not your own subclass.
Elements with no public representation, such as placemats and sticky notes, also report , so a value does not guarantee the click landed on nothing.
nullnull