Manual

Graph

class in Doozy.Engine.Nody.Models / Inherits from ScriptableObject

Description

The Graph is the base class for graphs that contains all logic needed to manage multiple Node and SubGraph references.
See Also: Node, Socket, Connection

Properties

  • public DateTime LastModified – Returns the last date and time when this Graph was modified

  • public Graph ActiveSubGraph – Returns a reference to any SubGraph that is currently active

  • public List<Node> GlobalNodes – Keeps track of all the global Nodes this graph contains

  • public List<~Node> Nodes – Keeps track of all the Nodes this graph contains

  • public Node ActiveNode – Returns the Node that is currently active

  • public Node PreviousActiveNode – Returns the Node that was previously active

  • public bool HasGlobalNodes – Returns TRUE if this Graph contains at least one global Node

  • public bool IsDirty – [Editor Only] Keeps track if this Graph is dirty or not (needs to be saved)

  • public bool IsSubGraph – Returns TRUE if this Graph is a SubGraph

  • public string Description – Returns this graph’s description

  • public string Id – Returns this graph’s id

  • public int Version – Returns the class version of this graph

Public Variables

  • public bool DebugMode – Enables relevant debug messages to be printed to the console

  • public Graph ParentGraph – Reference to the Graph that contains this Graph (if this is a SubGraph)

  • public ~SubGraphNode~ ParentSubGraphNode – Reference to the ~SubGraphNode~ that points this Graph (if this is a SubGraph)

Public Methods

  • public virtual void ActivateGlobalNodes() – Activates all the global nodes

  • public virtual void DeactivateGlobalNodes() – Deactivates all the global nodes

  • public virtual void FixedUpdate() – FixedUpdate is called every fixed framerate frame, if this graph has been loaded by a GraphController

  • public virtual void LateUpdate() – LateUpdate is called every frame, after all Update functions have been called and if this graph has been loaded by a GraphController

  • public virtual void Update() – Update is called every frame, if this graph has been loaded by a GraphController

  • public void ActivateStartOrEnterNode() – Activates this graph’s first node (either the ~StartNode~ or the ~EnterNode~)

  • public bool ContainsNode(Node node) – Returns TRUE if the passed Node is found in the graph

  • public bool ContainsNodeById(string nodeId) – Returns TRUE if a Node, with the passed node id, is found in the graph

  • public bool ContainsNodeByName(string nodeName) – Returns TRUE if a Node, with the given node name, is found in the graph

  • public bool ContainsSocket(string socketId) – Returns TRUE if a Socket, with the passed socket id, is found in the Graph

  • public Node GetEnterNode() – Returns the ~EnterNode~ if this is a SubGraph. Returns null if the Node is not found or if this is a Graph

  • public Node GetExitNode() – Returns the ~ExitNode~ if this is a SubGraph. Returns null if the Node is not found or if this is a Graph

  • public Node GetNodeById(string nodeId) – Returns the Node, with the passed node id, found in the Graph. Returns null if the Node is not found

  • public Node GetNodeByName(string nodeName) – Returns the first Node, with the passed node name, found in the Graph. Returns null if the Node is not found

  • public string GetNodeIdFromNodeName(string nodeName) – Returns the node id of the first Node, with the passed node name, found in the Graph. Returns ‘Node Not Found’ if the Node is not found

  • public string GetNodeNameFromNodeId(string nodeId) – Returns the node name of the Node, with the passed node id, found in the Graph. Returns ‘Node Not Found’ if the Node is not found

  • public Node GetStartNode() – Returns the ~StartNode~ if this is a Graph. Returns null if the Node is not found or if this is a SubGraph

  • public Node GetStartOrEnterNode() – Returns the graph’s first node (either the ~StartNode~ or the ~EnterNode~)

  • public Socket GetSocket(string socketId) – Returns the Socket, with the passed socket id, from the graph (if it exists)

  • public void SetActiveNode(Node nextActiveNode, Connection connection = null) – Activate a Node

  • public void SetActiveNodeByConnection(Connection connection) – Activate the input Node of the passed Connection

  • public void SetActiveNodeById(string nodeId, Connection connection = null) – Activate a Node by node id

  • public void SetActiveNodeByName(string nodeName, Connection connection = null) – Activate a Node by node name

  • public void SetLastModified(string time) – Updates the last modified date and time for this graph

  • public void SetVersion(int version) – Updates the class version of this graph