Class CeresGraphView
public abstract class CeresGraphView : GraphView, IVariableSource
- Inheritance
-
CeresGraphView
- Implements
- Derived
- Extension Methods
Constructors
CeresGraphView(CeresGraphEditorWindow)
protected CeresGraphView(CeresGraphEditorWindow editorWindow)
Parameters
editorWindowCeresGraphEditorWindow
Properties
Blackboard
public CeresBlackboard Blackboard { get; }
Property Value
ContextualMenuRegistry
public ContextualMenuRegistry ContextualMenuRegistry { get; }
Property Value
EditorWindow
public CeresGraphEditorWindow EditorWindow { get; set; }
Property Value
NodeGroupHandler
public NodeGroupHandler NodeGroupHandler { get; }
Property Value
NodeViews
public HashSet<ICeresNodeView> NodeViews { get; }
Property Value
SearchWindow
protected CeresNodeSearchWindow SearchWindow { get; }
Property Value
SharedVariables
public List<SharedVariable> SharedVariables { get; }
Property Value
Methods
AddBlackboard(CeresBlackboard)
Add custom blackboard to graph
public void AddBlackboard(CeresBlackboard blackboard)
Parameters
blackboardCeresBlackboard
AddBlackboard(CeresBlackboard, Rect)
Add custom blackboard to graph
public void AddBlackboard(CeresBlackboard blackboard, Rect rect)
Parameters
blackboardCeresBlackboardrectRect
AddNodeGroupHandler(NodeGroupHandler)
Add custom NodeGroupHandler to graph
public void AddNodeGroupHandler(NodeGroupHandler groupHandler)
Parameters
groupHandlerNodeGroupHandler
AddNodeView(ICeresNodeView)
Add custom node view to graph
public virtual void AddNodeView(ICeresNodeView nodeView)
Parameters
nodeViewICeresNodeView
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
variablesList<SharedVariable>duplicateWhenConflictbool
AddStyleSheet(string)
Add custom StyleSheet to graph
public void AddStyleSheet(string resourcePath)
Parameters
resourcePathstring
BuildContextualMenu(ContextualMenuPopulateEvent)
public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)
Parameters
CanPasteSerializedGraph(string)
protected virtual bool CanPasteSerializedGraph(string serializedData)
Parameters
serializedDatastring
Returns
ClearDirty()
Clear graph view's dirty flag.
public void ClearDirty()
FindNodeView(string)
Find node by guid
public ICeresNodeView FindNodeView(string guid)
Parameters
guidstring
Returns
FindNodeView<TNodeView>(string)
Find generic node by guid
public TNodeView FindNodeView<TNodeView>(string guid) where TNodeView : class, ICeresNodeView
Parameters
guidstring
Returns
- TNodeView
Type Parameters
TNodeView
GetCompatiblePorts(Port, NodeAdapter)
public override List<Port> GetCompatiblePorts(Port startPort, NodeAdapter nodeAdapter)
Parameters
startPortPortnodeAdapterNodeAdapter
Returns
GetOrLoadStyleSheet(string)
Get or load custom StyleSheet
public static StyleSheet GetOrLoadStyleSheet(string resourcePath)
Parameters
resourcePathstring
Returns
GetOrLoadVisualTreeAsset(string)
Get or load custom VisualTreeAsset
public static VisualTreeAsset GetOrLoadVisualTreeAsset(string resourcePath)
Parameters
resourcePathstring
Returns
InsertRelayNode(CeresPortElement, CeresPortElement, Vector2)
Insert a relay node between two connected ports
public virtual void InsertRelayNode(CeresPortElement inputPort, CeresPortElement outputPort, Vector2 position)
Parameters
inputPortCeresPortElementInput port of the original edge
outputPortCeresPortElementOutput port of the original edge
positionVector2Position to place the relay node
IsDirty()
Whether graph view is dirty
public bool IsDirty()
Returns
OnCopySerializedGraph(IEnumerable<GraphElement>)
protected virtual string OnCopySerializedGraph(IEnumerable<GraphElement> elements)
Parameters
elementsIEnumerable<GraphElement>
Returns
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
selectablesList<ISelectable>graphElementGraphElementmousePositionVector2
OnDragDropObjectPerform(Object, Vector2)
protected virtual void OnDragDropObjectPerform(Object data, Vector2 mousePosition)
Parameters
OnGraphViewChanged(GraphViewChange)
protected virtual GraphViewChange OnGraphViewChanged(GraphViewChange graphViewChange)
Parameters
graphViewChangeGraphViewChange
Returns
OnNodeCreationRequest(NodeCreationContext)
protected virtual void OnNodeCreationRequest(NodeCreationContext context)
Parameters
contextNodeCreationContext
OnPasteSerializedGraph(string, string)
protected virtual void OnPasteSerializedGraph(string operationName, string serializedData)
Parameters
OpenSearch(Vector2)
Open node search window
public virtual void OpenSearch(Vector2 screenPosition)
Parameters
screenPositionVector2
OpenSearch(Vector2, CeresPortView)
Open node search window with input port
public virtual void OpenSearch(Vector2 screenPosition, CeresPortView portView)
Parameters
screenPositionVector2portViewCeresPortView
SetDirty()
Marks graph view as dirty
public void SetDirty()