docs.unity3d.com
    Show / Hide Table of Contents

    Class VisualScriptingCanvas<TGraph>

    Inheritance
    Object
    VisualScriptingCanvas<TGraph>
    FlowCanvas
    StateCanvas
    Namespace: Unity.VisualScripting
    Syntax
    public abstract class VisualScriptingCanvas<TGraph> : ICanvas, IDisposable, IDragAndDropHandler where TGraph : class, IGraph
    Type Parameters
    Name Description
    TGraph

    Constructors

    VisualScriptingCanvas(TGraph)

    Declaration
    protected VisualScriptingCanvas(TGraph graph)
    Parameters
    Type Name Description
    TGraph graph

    Properties

    alignableAndDistributable

    Declaration
    public IEnumerable<IGraphElementWidget> alignableAndDistributable { get; }
    Property Value
    Type Description
    IEnumerable<IGraphElementWidget>

    context

    Declaration
    protected IGraphContext context { get; }
    Property Value
    Type Description
    IGraphContext

    delayedCalls

    Declaration
    public Queue<Action> delayedCalls { get; }
    Property Value
    Type Description
    Queue<Action>
    Implements
    ICanvas.delayedCalls

    dragAndDropVisualMode

    Declaration
    public virtual DragAndDropVisualMode dragAndDropVisualMode { get; }
    Property Value
    Type Description
    DragAndDropVisualMode
    Implements
    IDragAndDropHandler.dragAndDropVisualMode

    e

    Declaration
    protected EventWrapper e { get; }
    Property Value
    Type Description
    EventWrapper

    eventDeltaTime

    Declaration
    [DoNotSerialize]
    public float eventDeltaTime { get; }
    Property Value
    Type Description
    Single
    Implements
    ICanvas.eventDeltaTime

    frameDeltaTime

    Declaration
    [DoNotSerialize]
    public float frameDeltaTime { get; }
    Property Value
    Type Description
    Single
    Implements
    ICanvas.frameDeltaTime

    graph

    Declaration
    public TGraph graph { get; }
    Property Value
    Type Description
    TGraph

    groupArea

    Declaration
    public Rect groupArea { get; }
    Property Value
    Type Description
    Rect
    Implements
    ICanvas.groupArea

    hoveredWidget

    Declaration
    public IWidget hoveredWidget { get; }
    Property Value
    Type Description
    IWidget
    Implements
    ICanvas.hoveredWidget

    isDragging

    Declaration
    public bool isDragging { get; }
    Property Value
    Type Description
    Boolean
    Implements
    ICanvas.isDragging

    isGrouping

    Declaration
    public bool isGrouping { get; }
    Property Value
    Type Description
    Boolean
    Implements
    ICanvas.isGrouping

    isLassoing

    Declaration
    public bool isLassoing { get; }
    Property Value
    Type Description
    Boolean
    Implements
    ICanvas.isLassoing

    isMouseOver

    Declaration
    public bool isMouseOver { get; }
    Property Value
    Type Description
    Boolean
    Implements
    ICanvas.isMouseOver

    isMouseOverBackground

    Declaration
    public bool isMouseOverBackground { get; }
    Property Value
    Type Description
    Boolean
    Implements
    ICanvas.isMouseOverBackground

    isSelecting

    Declaration
    public bool isSelecting { get; }
    Property Value
    Type Description
    Boolean
    Implements
    ICanvas.isSelecting

    lassoArea

    Declaration
    public Rect lassoArea { get; }
    Property Value
    Type Description
    Rect
    Implements
    ICanvas.lassoArea

    mousePosition

    Declaration
    public Vector2 mousePosition { get; }
    Property Value
    Type Description
    Vector2
    Implements
    ICanvas.mousePosition

    pan

    Declaration
    public Vector2 pan { get; }
    Property Value
    Type Description
    Vector2
    Implements
    ICanvas.pan

    reference

    Declaration
    protected GraphReference reference { get; }
    Property Value
    Type Description
    GraphReference

    repaintDeltaTime

    Declaration
    [DoNotSerialize]
    public float repaintDeltaTime { get; }
    Property Value
    Type Description
    Single
    Implements
    ICanvas.repaintDeltaTime

    selection

    Declaration
    public GraphSelection selection { get; }
    Property Value
    Type Description
    GraphSelection
    Implements
    ICanvas.selection

    selectionArea

    Declaration
    public Rect selectionArea { get; }
    Property Value
    Type Description
    Rect
    Implements
    ICanvas.selectionArea

    shouldEdgePan

    Declaration
    protected virtual bool shouldEdgePan { get; }
    Property Value
    Type Description
    Boolean

    viewport

    Declaration
    public Rect viewport { get; set; }
    Property Value
    Type Description
    Rect
    Implements
    ICanvas.viewport

    widgetProvider

    Declaration
    public WidgetProvider widgetProvider { get; }
    Property Value
    Type Description
    WidgetProvider
    Implements
    ICanvas.widgetProvider

    window

    Declaration
    public ICanvasWindow window { get; set; }
    Property Value
    Type Description
    ICanvasWindow
    Implements
    ICanvas.window

    zoom

    Declaration
    public float zoom { get; }
    Property Value
    Type Description
    Single
    Implements
    ICanvas.zoom

    Methods

    AcceptsDragAndDrop()

    Declaration
    public virtual bool AcceptsDragAndDrop()
    Returns
    Type Description
    Boolean
    Implements
    IDragAndDropHandler.AcceptsDragAndDrop()

    Align(AlignOperation)

    Declaration
    public void Align(AlignOperation operation)
    Parameters
    Type Name Description
    AlignOperation operation
    Implements
    ICanvas.Align(AlignOperation)

    BeforeFrame()

    Declaration
    public void BeforeFrame()
    Implements
    ICanvas.BeforeFrame()

    BeginDrag(EventWrapper)

    Declaration
    public void BeginDrag(EventWrapper e)
    Parameters
    Type Name Description
    EventWrapper e
    Implements
    ICanvas.BeginDrag(EventWrapper)

    Cache()

    Declaration
    public void Cache()
    Implements
    ICanvas.Cache()

    CacheWidgetCollections()

    Declaration
    public void CacheWidgetCollections()
    Implements
    ICanvas.CacheWidgetCollections()

    CacheWidgetItems()

    Declaration
    public void CacheWidgetItems()

    CacheWidgetPositions()

    Declaration
    public void CacheWidgetPositions()
    Implements
    ICanvas.CacheWidgetPositions()

    CacheWidgetVisibility()

    Declaration
    public void CacheWidgetVisibility()

    Close()

    Declaration
    public virtual void Close()
    Implements
    ICanvas.Close()

    DeleteSelection()

    Declaration
    public void DeleteSelection()
    Implements
    ICanvas.DeleteSelection()

    Dispose()

    Declaration
    public virtual void Dispose()

    Distribute(DistributeOperation)

    Declaration
    public void Distribute(DistributeOperation operation)
    Parameters
    Type Name Description
    DistributeOperation operation
    Implements
    ICanvas.Distribute(DistributeOperation)

    Drag(EventWrapper)

    Declaration
    public void Drag(EventWrapper e)
    Parameters
    Type Name Description
    EventWrapper e
    Implements
    ICanvas.Drag(EventWrapper)

    DrawBackground()

    Declaration
    protected virtual void DrawBackground()

    DrawDragAndDropPreview()

    Declaration
    public virtual void DrawDragAndDropPreview()
    Implements
    IDragAndDropHandler.DrawDragAndDropPreview()

    DrawOverlay()

    Declaration
    protected virtual void DrawOverlay()

    DrawWidgetsBackground()

    Declaration
    protected void DrawWidgetsBackground()

    DrawWidgetsForeground()

    Declaration
    protected void DrawWidgetsForeground()

    DrawWidgetsOverlay()

    Declaration
    protected void DrawWidgetsOverlay()

    EndDrag(EventWrapper)

    Declaration
    public void EndDrag(EventWrapper e)
    Parameters
    Type Name Description
    EventWrapper e
    Implements
    ICanvas.EndDrag(EventWrapper)

    ExitDragAndDrop()

    Declaration
    public virtual void ExitDragAndDrop()
    Implements
    IDragAndDropHandler.ExitDragAndDrop()

    GetContextOptions()

    Declaration
    protected virtual IEnumerable<DropdownOption> GetContextOptions()
    Returns
    Type Description
    IEnumerable<DropdownOption>

    GetExtendedContextOptions()

    Declaration
    protected IEnumerable<DropdownOption> GetExtendedContextOptions()
    Returns
    Type Description
    IEnumerable<DropdownOption>

    HandleEventCapture()

    Declaration
    protected void HandleEventCapture()

    HandleEventRelease()

    Declaration
    protected void HandleEventRelease()

    HandleHighPriorityInput()

    Declaration
    protected virtual void HandleHighPriorityInput()

    HandleLowPriorityInput()

    Declaration
    protected virtual void HandleLowPriorityInput()

    HandleMaximization()

    Declaration
    protected virtual void HandleMaximization()

    HandleWidgetInput()

    Declaration
    protected void HandleWidgetInput()

    IsVisible(IWidget)

    Declaration
    public bool IsVisible(IWidget widget)
    Parameters
    Type Name Description
    IWidget widget
    Returns
    Type Description
    Boolean
    Implements
    ICanvas.IsVisible(IWidget)

    OnContext()

    Declaration
    protected virtual void OnContext()

    OnGUI()

    Declaration
    public void OnGUI()
    Implements
    ICanvas.OnGUI()

    OnToolbarGUI()

    Declaration
    public virtual void OnToolbarGUI()
    Implements
    ICanvas.OnToolbarGUI()

    Open()

    Declaration
    public virtual void Open()
    Implements
    ICanvas.Open()

    PerformDragAndDrop()

    Declaration
    public virtual void PerformDragAndDrop()
    Implements
    IDragAndDropHandler.PerformDragAndDrop()

    Recollect()

    Declaration
    public void Recollect()
    Implements
    ICanvas.Recollect()

    RegisterControls()

    Declaration
    public void RegisterControls()
    Implements
    ICanvas.RegisterControls()

    ShrinkCopyGroup(HashSet<IGraphElement>)

    Declaration
    public virtual void ShrinkCopyGroup(HashSet<IGraphElement> copyGroup)
    Parameters
    Type Name Description
    HashSet<IGraphElement> copyGroup
    Implements
    ICanvas.ShrinkCopyGroup(HashSet<IGraphElement>)

    ToggleMaximized()

    Declaration
    protected void ToggleMaximized()

    TweenViewport(Vector2, Single, Single)

    Declaration
    public void TweenViewport(Vector2 pan, float zoom, float duration)
    Parameters
    Type Name Description
    Vector2 pan
    Single zoom
    Single duration

    Update()

    Declaration
    public void Update()
    Implements
    ICanvas.Update()

    UpdateDragAndDrop()

    Declaration
    public virtual void UpdateDragAndDrop()
    Implements
    IDragAndDropHandler.UpdateDragAndDrop()

    UpdateViewport()

    Declaration
    public void UpdateViewport()
    Implements
    ICanvas.UpdateViewport()

    ViewElements(IEnumerable<IGraphElement>)

    Declaration
    public void ViewElements(IEnumerable<IGraphElement> elements)
    Parameters
    Type Name Description
    IEnumerable<IGraphElement> elements
    Implements
    ICanvas.ViewElements(IEnumerable<IGraphElement>)

    Events

    delayCall

    Declaration
    public event Action delayCall
    Event Type
    Type Description
    Action
    Implements
    ICanvas.delayCall

    Explicit Interface Implementations

    ICanvas.graph

    Declaration
    IGraph ICanvas.graph { get; }
    Returns
    Type Description
    IGraph
    Implements
    ICanvas.graph

    ICanvas.widgets

    Declaration
    IEnumerable<IWidget> ICanvas.widgets { get; }
    Returns
    Type Description
    IEnumerable<IWidget>
    Implements
    ICanvas.widgets

    Extension Methods

    XAnalyserProvider.Analyser(Object, IGraphContext)
    XAnalyserProvider.Analyser<TAnalyser>(Object, IGraphContext)
    XAnalyserProvider.Analysis(Object, IGraphContext)
    XAnalyserProvider.Analysis<TAnalysis>(Object, IGraphContext)
    XAnalyserProvider.Analyser(Object, GraphReference)
    XAnalyserProvider.Analyser<TAnalyser>(Object, GraphReference)
    XAnalyserProvider.Analysis(Object, GraphReference)
    XAnalyserProvider.Analysis<TAnalysis>(Object, GraphReference)
    XCanvasProvider.Widget(ICanvas, IGraphItem)
    XCanvasProvider.Widget<TWidget>(ICanvas, IGraphItem)
    XCanvasProvider.Widget(ICanvas, IGraphElement)
    XCanvasProvider.Widget<TWidget>(ICanvas, IGraphElement)
    XDescriptorProvider.Describe(Object)
    XDescriptorProvider.HasDescriptor(Object)
    XDescriptorProvider.Descriptor(Object)
    XDescriptorProvider.Descriptor<TDescriptor>(Object)
    XDescriptorProvider.Description(Object)
    XDescriptorProvider.Description<TDescription>(Object)
    Cloning.Clone(Object, ICloner, Boolean)
    Cloning.Clone<T>(T, ICloner, Boolean)
    Cloning.CloneViaFakeSerialization(Object)
    Cloning.CloneViaFakeSerialization<T>(T)
    ConversionUtility.IsConvertibleTo(Object, Type, Boolean)
    ConversionUtility.IsConvertibleTo<T>(Object, Boolean)
    ConversionUtility.ConvertTo(Object, Type)
    ConversionUtility.ConvertTo<T>(Object)
    TypeUtility.ToShortString(Object, Int32)
    Serialization.CloneViaSerialization<T>(T, Boolean)
    Serialization.CloneViaSerializationInto<TSource, TDestination>(TSource, ref TDestination, Boolean)
    Serialization.Serialize(Object, Boolean)
    LinqUtility.Yield<T>(T)
    UnityObjectUtility.IsUnityNull(Object)
    UnityObjectUtility.ToSafeString(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023