Scope
This class allows for nodes to be grouped into a common area, or Scope. This class includes methods that automatically resize and position the Scope to encompass the group of nodes.
Read time 10 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: GraphElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
public class Scope : GraphElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, ISelectable
Constructors
Constructor | Description |
|---|---|
| Scope() | Scope constructor. |
Properties
Property | Description |
|---|---|
| autoUpdateGeometry | Enables or disables the automatic resizing and positioning of the Scope. |
| containedElements | The list of GraphElements contained by the Scope. |
| containedElementsRect | The rect containing the GraphElements encompassed by the Scope. The rect is expressed in local coordinates. |
| headerContainer | Returns the header container for the Scope. Use this header container to customizer the header of the Scope. |
Methods
Method | Description |
|---|---|
| AcceptsElement | Whether the GraphElement can be added to this scope. |
| AddElement | Adds a GraphElement to the Scope. |
| AddElements | Adds GraphElements to the Scope. |
| ContainsElement | Determines if the Scope contains the specified GraphElement. |
| GetPosition | Returns the geometry of the Scope. |
| HitTest | Determines whether the specified point is within the selectable area of the Scope. |
| OnElementsAdded | Called when GraphElements are added to the Scope. |
| OnElementsRemoved | Called when GraphElements are removed from the Scope. |
| Overlaps | Determines whether the specified rect overlaps the Scope. |
| RemoveElement | Removes an element from the Scope. |
| RemoveElements | Removes elements from the Scope. |
| RemoveElementsWithoutNotification | Removes elements from the Scope but do not send a notification. |
| ScheduleUpdateGeometryFromContent | Schedules the update of the size and position of the Scope based on its contents. |
| SetPosition | Sets the geometry of the Scope. |
| SetScopePositionOnly | Change the position of the scope but does not move its elements. |
| UpdateGeometryFromContent | Updates the size and position of the Scope based on its contents. |