Table of Contents

Class CeresGraphView

Namespace
Ceres.Editor.Graph
Assembly
Ceres.Graph.Editor.dll
public abstract class CeresGraphView : GraphView, IVariableSource
Inheritance
CeresGraphView
Implements
Derived
Extension Methods

Constructors

CeresGraphView(CeresGraphEditorWindow)

protected CeresGraphView(CeresGraphEditorWindow editorWindow)

Parameters

editorWindow CeresGraphEditorWindow

Properties

Blackboard

public CeresBlackboard Blackboard { get; }

Property Value

CeresBlackboard

ContextualMenuRegistry

public ContextualMenuRegistry ContextualMenuRegistry { get; }

Property Value

ContextualMenuRegistry

EditorWindow

public CeresGraphEditorWindow EditorWindow { get; set; }

Property Value

CeresGraphEditorWindow

NodeGroupHandler

public NodeGroupHandler NodeGroupHandler { get; }

Property Value

NodeGroupHandler

NodeViews

public HashSet<ICeresNodeView> NodeViews { get; }

Property Value

HashSet<ICeresNodeView>

SearchWindow

protected CeresNodeSearchWindow SearchWindow { get; }

Property Value

CeresNodeSearchWindow

SharedVariables

public List<SharedVariable> SharedVariables { get; }

Property Value

List<SharedVariable>

Methods

AddBlackboard(CeresBlackboard)

Add custom blackboard to graph

public void AddBlackboard(CeresBlackboard blackboard)

Parameters

blackboard CeresBlackboard

AddBlackboard(CeresBlackboard, Rect)

Add custom blackboard to graph

public void AddBlackboard(CeresBlackboard blackboard, Rect rect)

Parameters

blackboard CeresBlackboard
rect Rect

AddNodeGroupHandler(NodeGroupHandler)

Add custom NodeGroupHandler to graph

public void AddNodeGroupHandler(NodeGroupHandler groupHandler)

Parameters

groupHandler NodeGroupHandler

AddNodeView(ICeresNodeView)

Add custom node view to graph

public virtual void AddNodeView(ICeresNodeView nodeView)

Parameters

nodeView ICeresNodeView

AddSearchWindow<T>()

Add custom node search window to graph

public void AddSearchWindow<T>() where T : CeresNodeSearchWindow

Type Parameters

T

AddSharedVariables(List<SharedVariable>, bool)

Add shared variables to graph's blackboard

public virtual void AddSharedVariables(List<SharedVariable> variables, bool duplicateWhenConflict)

Parameters

variables List<SharedVariable>
duplicateWhenConflict bool

AddStyleSheet(string)

Add custom StyleSheet to graph

public void AddStyleSheet(string resourcePath)

Parameters

resourcePath string

BuildContextualMenu(ContextualMenuPopulateEvent)

public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)

Parameters

evt ContextualMenuPopulateEvent

CanPasteSerializedGraph(string)

protected virtual bool CanPasteSerializedGraph(string serializedData)

Parameters

serializedData string

Returns

bool

ClearDirty()

Clear graph view's dirty flag.

public void ClearDirty()

FindNodeView(string)

Find node by guid

public ICeresNodeView FindNodeView(string guid)

Parameters

guid string

Returns

ICeresNodeView

FindNodeView<TNodeView>(string)

Find generic node by guid

public TNodeView FindNodeView<TNodeView>(string guid) where TNodeView : class, ICeresNodeView

Parameters

guid string

Returns

TNodeView

Type Parameters

TNodeView

GetCompatiblePorts(Port, NodeAdapter)

public override List<Port> GetCompatiblePorts(Port startPort, NodeAdapter nodeAdapter)

Parameters

startPort Port
nodeAdapter NodeAdapter

Returns

List<Port>

GetOrLoadStyleSheet(string)

Get or load custom StyleSheet

public static StyleSheet GetOrLoadStyleSheet(string resourcePath)

Parameters

resourcePath string

Returns

StyleSheet

GetOrLoadVisualTreeAsset(string)

Get or load custom VisualTreeAsset

public static VisualTreeAsset GetOrLoadVisualTreeAsset(string resourcePath)

Parameters

resourcePath string

Returns

VisualTreeAsset

InsertRelayNode(CeresPortElement, CeresPortElement, Vector2)

Insert a relay node between two connected ports

public virtual void InsertRelayNode(CeresPortElement inputPort, CeresPortElement outputPort, Vector2 position)

Parameters

inputPort CeresPortElement

Input port of the original edge

outputPort CeresPortElement

Output port of the original edge

position Vector2

Position to place the relay node

IsDirty()

Whether graph view is dirty

public bool IsDirty()

Returns

bool

OnCopySerializedGraph(IEnumerable<GraphElement>)

protected virtual string OnCopySerializedGraph(IEnumerable<GraphElement> elements)

Parameters

elements IEnumerable<GraphElement>

Returns

string

OnDestroy()

Called after detached from editor window

protected virtual void OnDestroy()

OnDragDropElementPerform(List<ISelectable>, GraphElement, Vector2)

protected virtual void OnDragDropElementPerform(List<ISelectable> selectables, GraphElement graphElement, Vector2 mousePosition)

Parameters

selectables List<ISelectable>
graphElement GraphElement
mousePosition Vector2

OnDragDropObjectPerform(Object, Vector2)

protected virtual void OnDragDropObjectPerform(Object data, Vector2 mousePosition)

Parameters

data Object
mousePosition Vector2

OnGraphViewChanged(GraphViewChange)

protected virtual GraphViewChange OnGraphViewChanged(GraphViewChange graphViewChange)

Parameters

graphViewChange GraphViewChange

Returns

GraphViewChange

OnNodeCreationRequest(NodeCreationContext)

protected virtual void OnNodeCreationRequest(NodeCreationContext context)

Parameters

context NodeCreationContext

OnPasteSerializedGraph(string, string)

protected virtual void OnPasteSerializedGraph(string operationName, string serializedData)

Parameters

operationName string
serializedData string

OpenSearch(Vector2)

Open node search window

public virtual void OpenSearch(Vector2 screenPosition)

Parameters

screenPosition Vector2

OpenSearch(Vector2, CeresPortView)

Open node search window with input port

public virtual void OpenSearch(Vector2 screenPosition, CeresPortView portView)

Parameters

screenPosition Vector2
portView CeresPortView

SetDirty()

Marks graph view as dirty

public void SetDirty()