C# Class Rondo.NodeEditor.Base.NodeEditor

The base of the node editor
Inheritance: EditorWindow
Mostra file Open project: Randehh/Unity-NodeEditor Class Usage Examples

Public Properties

Property Type Description
instance NodeEditor

Public Methods

Method Description
AddNode ( BaseNode node ) : void

Add a node to the editor

CalculateStartNodes ( ) : void

Calculates the starting nodes based on connections, which is accessable via GetState()

ClearNodes ( ) : void

Removes all nodes from the screen

ConnectNodes ( BaseNode from, BaseNode to ) : NodeConnection
DrawWindow ( ) : void
GetContextMenu ( BaseNode node ) : GenericMenu

Gets the context menu of the current mouse over node. If no node is moused over, parameter will be null

GetContextMenu ( NodeHandle handle ) : GenericMenu

Gets the context menu of the current mouse over handle. If no handle is moused over, parameter will be null

GetEditorOptions ( ) : NodeEditorOptions
GetEditorState ( ) : NodeEditorState

Get the editor state which contains most frame by frame information

GetNode ( string tag ) : BaseNode

Gets a node by tag. Returns null if no node is found

OffsetNodes ( Vector2 v ) : void

Offsets all nodes on the screen

OrganizeNodes ( ) : void

Attempts to organize all nodes on the screen by their heirarchy

PrepareWindow ( ) : void

Called when the window is opened. Load any information the node editor requires here

RemoveNode ( BaseNode node ) : void

Remove a node from the editor

UpdateMouseOverState ( ) : void

Updates the mouseover state for handles and nodes

Private Methods

Method Description
DrawNode ( int id ) : void
DrawNodes ( ) : void
DrawSelectionRectangle ( ) : void
HandleLeftClick ( Event e ) : void
HandleRightClick ( Event e ) : void
OnGUI ( ) : void

Method Details

AddNode() public method

Add a node to the editor
public AddNode ( BaseNode node ) : void
node BaseNode
return void

CalculateStartNodes() public method

Calculates the starting nodes based on connections, which is accessable via GetState()
public CalculateStartNodes ( ) : void
return void

ClearNodes() public method

Removes all nodes from the screen
public ClearNodes ( ) : void
return void

ConnectNodes() public method

public ConnectNodes ( BaseNode from, BaseNode to ) : NodeConnection
from BaseNode
to BaseNode
return NodeConnection

DrawWindow() public method

public DrawWindow ( ) : void
return void

GetContextMenu() public method

Gets the context menu of the current mouse over node. If no node is moused over, parameter will be null
public GetContextMenu ( BaseNode node ) : GenericMenu
node BaseNode
return UnityEditor.GenericMenu

GetContextMenu() public method

Gets the context menu of the current mouse over handle. If no handle is moused over, parameter will be null
public GetContextMenu ( NodeHandle handle ) : GenericMenu
handle Assets.NodeEditor.Editor.NodeHandle
return UnityEditor.GenericMenu

GetEditorOptions() public method

public GetEditorOptions ( ) : NodeEditorOptions
return Rondo.NodeEditor.System.NodeEditorOptions

GetEditorState() public method

Get the editor state which contains most frame by frame information
public GetEditorState ( ) : NodeEditorState
return Rondo.NodeEditor.System.NodeEditorState

GetNode() public method

Gets a node by tag. Returns null if no node is found
public GetNode ( string tag ) : BaseNode
tag string
return BaseNode

OffsetNodes() public method

Offsets all nodes on the screen
public OffsetNodes ( Vector2 v ) : void
v Vector2
return void

OrganizeNodes() public method

Attempts to organize all nodes on the screen by their heirarchy
public OrganizeNodes ( ) : void
return void

PrepareWindow() public method

Called when the window is opened. Load any information the node editor requires here
public PrepareWindow ( ) : void
return void

RemoveNode() public method

Remove a node from the editor
public RemoveNode ( BaseNode node ) : void
node BaseNode
return void

UpdateMouseOverState() public method

Updates the mouseover state for handles and nodes
public UpdateMouseOverState ( ) : void
return void

Property Details

instance public_oe static_oe property

public static NodeEditor,Rondo.NodeEditor.Base instance
return NodeEditor