Home
  • Manual
  • Node Index
  • API
  • Changelog
Show / Hide Table of Contents
  • InsaneScatterbrain
    • Calc
    • Color32EqualityComparer
    • EqualityComparer
    • TrigMath
  • InsaneScatterbrain.DataStructures
    • Pair<T>
  • InsaneScatterbrain.DelaunatorSharp
    • DelaunatorNoAlloc
  • InsaneScatterbrain.Dependencies
    • DependencyContainer
    • DependencyNotFoundException
    • IDependencyContainer
  • InsaneScatterbrain.Editor.Services
    • Assets
  • InsaneScatterbrain.Editor.Updates
    • UpdateAction
    • Updater
  • InsaneScatterbrain.Extensions
    • ColorExtensions
    • ExceptionExtensions
    • FieldInfoExtensions
    • HashSetExtensions
    • IntExtensions
    • ListExtensions
    • RandomExtensions
    • SortedListExtensions
    • StackExtensions
    • Texture2DDrawingExtensions
    • Texture2DExtensions
    • TypeExtensions
    • Vector2Extensions
    • Vector2IntExtensions
  • InsaneScatterbrain.MapGraph
    • AddFloatsNode
    • AddFloatToVector2Node
    • AddFloatToVector3Node
    • AddIntsNode
    • AddIntToVector2IntNode
    • AddIntToVector3IntNode
    • AddRandomEdgesNode
    • AddVector2IntsNode
    • AddVector2sNode
    • AddVector3IntsNode
    • AddVector3sNode
    • ApplyMaskNode
    • Area
    • AreaExtractor
    • AreaGraph
    • AreaGraphBuilder
    • AreaGraphEdge
    • AreaGraphEdgePool
    • AreaGraphPool
    • AreaPool
    • AreasCentroidPointsNode
    • AreasSpecialBorderPointsNode
    • AreasToPointsNode
    • BasicMathOperationNode<T>
    • BasicMathOperationNode<T1, T2, TOut>
    • BspLeafCenterPointsNode
    • BspNode
    • BspNodePool
    • BspTree
    • BspTreePool
    • CellularAutomataSmoothingNode
    • ChangeTextureSizeNode
    • ClampFloatsNode
    • ClampIntsNode
    • CollectionPool<TCollection, TValue>
    • ConnectAreaGraphCentroidsNode
    • ConnectAreaGraphClosestBorderPointsNode
    • ConnectAreaGraphRandomPointsNode
    • ConnectedPointsToPointsNode
    • ConvertTextureToTilemapNode
    • CopyTilemapDataNode
    • CornerPointsNode
    • CurrentOrEmptyTextureNode
    • DataToTextureNode
    • DictionaryPool<TDictionary, TKey, TValue>
    • DivideFloatsNode
    • DivideIntsNode
    • DivideVector2ByFloatNode
    • DivideVector2IntByIntNode
    • DivideVector2IntsNode
    • DivideVector2sNode
    • DivideVector3ByFloatNode
    • DivideVector3IntByIntNode
    • DivideVector3IntsNode
    • DivideVector3sNode
    • DomainWarpFractalType
    • DomainWarpType
    • DrawAreasNode
    • DrawBorderNode
    • DrawCirclesNode
    • DrawConnectionsBiasedRandomWalkNode
    • DrawGridNode
    • DrawManhattanConnectionsNode
    • DrawNoiseThresholdNode
    • DrawOutlineNode
    • DrawPointsNode
    • DrawRectsNode
    • DrawShortestPathNode
    • EmptyTextureNode
    • ExtractAreasNode
    • ExtractColorNode
    • ExtractPointsNode
    • ExtractPointsWithNeighboursNode
    • FastNoiseEnum
    • FlipTextureNode
    • FractalType
    • GenerateAreaGraphNode
    • GenerateMstAreaGraphNode
    • GenerateRstAreaGraphNode
    • HexagonalGridOffsetType
    • InvertMaskNode
    • IObjectType<TEntry, TObject>
    • IObjectTypeEntry<T>
    • IObjectTypeSet<TType, TObject>
    • ListPool<TValue>
    • LoadTextureData
    • MapGraphGraph
    • MapGraphTilemapPrefab
    • Mask
    • MaskPool
    • MaxFloatsNode
    • MaxIntsNode
    • MergeAreasNode
    • MergeMasksNode
    • MergePointsNode
    • MergeTilemapsNode
    • MinFloatsNode
    • MinIntsNode
    • MultiplyFloatsNode
    • MultiplyIntsNode
    • MultiplyVector2ByFloatNode
    • MultiplyVector2IntByIntNode
    • MultiplyVector2IntsNode
    • MultiplyVector2sNode
    • MultiplyVector3ByFloatNode
    • MultiplyVector3IntByIntNode
    • MultiplyVector3IntsNode
    • MultiplyVector3sNode
    • NamedColor
    • NamedColorNode
    • NamedColorSet
    • NoiseNode
    • ObjectType<TEntry, TObject>
    • ObjectTypeEntry<T>
    • ObjectTypeSet<TType, TEntry, TObject>
    • ObjectTypeSetScriptableObject<TType, TEntry, TObject>
    • OpenObjectTypeSet<TType, TEntry, TObject>
    • Outliner
    • PerlinNoiseFillTextureNode
    • PointsToAreasNode
    • PoolInitializer
    • PowerNode
    • PrefabSet
    • PrefabType
    • PrefabTypeEntry
    • RandomBoolNode
    • RandomBspRoomsNode
    • RandomBspTreeNode
    • RandomColorNode
    • RandomExtensions
    • RandomFloatNode
    • RandomIntNode
    • RandomlyFillTextureNode
    • RandomlyStampTilemapsNode
    • RandomNode<T>
    • RandomPointsNode
    • RandomRectsNode
    • RandomRngStateNode
    • RandomVector2IntNode
    • RandomVector2Node
    • RandomVector3IntNode
    • RandomVector3Node
    • RandomWalkerNode
    • RangeRandomNode<T>
    • RectCenterPointsNode
    • RectsToAreasNode
    • ReplaceColorNode
    • ReplaceGameObjectChildrenNode
    • ResizeTextureNode
    • RotateTextureNode
    • RotationalSymmetry
    • SaveData
    • SaveTextureData
    • ScaleTextureNode
    • ScaleTextureToNode
    • ScaleTextureVector2Node
    • ShiftTextureNode
    • SplitConnectionsManhattanNode
    • SquareRootNode
    • StackPool<T>
    • StampNode
    • SubtractFloatFromVector2Node
    • SubtractFloatFromVector3Node
    • SubtractFloatsNode
    • SubtractIntFromVector2IntNode
    • SubtractIntFromVector3IntNode
    • SubtractIntsNode
    • SubtractMaskNode
    • SubtractVector2IntsNode
    • SubtractVector2sNode
    • SubtractVector3IntsNode
    • SubtractVector3sNode
    • TextureData
    • TextureData.Color32ArrayFacade
    • TextureDataDrawingExtensions
    • TextureDataExtensions
    • TextureDataPool
    • TextureSizeNode
    • TextureToChildGameObjectsNode
    • TextureToDataNode
    • TextureToGameObjectsNode
    • TextureToMaskNode
    • TextureToTilemapNode
    • TilemapData
    • TilemapDataPool
    • TilemapSet
    • TilemapToDataNode
    • TilemapToTextureNode
    • TilemapType
    • TilemapTypeEntry
    • Tileset
    • TileType
    • TileTypeEntry
    • TransparentColorNode
    • Vector2IntComparer
    • Vector2IntFromFloats
    • Vector2IntFromInts
    • Vector2IntToInts
    • Vector2IntToVector2
    • Vector3IntComparer
    • WaveformFunctionCollapseNode
  • InsaneScatterbrain.MapGraph.Editor
    • AboutWindow
    • AddRandomEdgesNodeView
    • ApplyMaskNodeView
    • AreaSpecialPointsNodeView
    • CellularAutomataSmoothingNodeView
    • CellularDistanceFunctionConstantNodeView
    • CellularReturnTypeConstantNodeView
    • ChangeTextureSizeNodeView
    • CornerPointsNodeView
    • DataSetList<T>
    • DataSetListBase<T>
    • DomainWarpFractalTypeNodeView
    • DomainWarpTypeConstantNodeView
    • DrawAreasNodeView
    • DrawBorderNodeView
    • DrawCirclesNodeView
    • DrawConnectionsBiasedRandomWalkNodeView
    • DrawGridNodeView
    • DrawManhattanConnectionsNodeView
    • DrawNoiseThresholdNodeView
    • DrawOutlineNodeView
    • DrawPointsNodeView
    • DrawRectsNodeView
    • DrawShortestPathConnectionsNodeView
    • EmptyTextureNodeView
    • EnumConstantNodeView<T>
    • ExtractAreasNodeView
    • ExtractColorNodeView
    • ExtractPointsNodeView
    • ExtractPointsWithNeighboursNodeView
    • FlipTextureNodeView
    • FractalTypeNodeView
    • GenerateAreaGraphNodeView
    • GenerateMstAreaGraphNodeView
    • GenerateRstAreaGraphNodeView
    • Initializer
    • InputParametersList
    • InvertMaskNodeView
    • ListBase
    • MapGraphAsset
    • MapGraphAssetUpdater
    • MapGraphCreateMenu
    • MapGraphEditor
    • MapGraphEditorInfo
    • MapGraphEditorSettingsWindow
    • MapGraphEditorSettingsWindowInitializer
    • MapGraphInitializer
    • MapGraphUpdater
    • MergeAreasNodeView
    • NamedColorNodeView
    • NamedColorSetEditor
    • NamedColorSetList
    • NewUpdatesWindow
    • NoiseNodeView
    • NoiseTypeNodeView
    • ObjectTypeEntryList<TType, TEntry, TObject>
    • ObjectTypeSetList<TType, TEntry, TObject>
    • OutputParametersList
    • ParametersList
    • PerlinNoiseFillTextureNodeView
    • PrefabSetEditor
    • PrefabTypeEntryList
    • PrefabTypeList
    • ProcessGraphNodeView
    • RandomBspRoomsNodeView
    • RandomBspTreeNodeView
    • RandomlyFillTextureNodeView
    • RandomlyStampTilemapsNodeView
    • RandomPointsNodeView
    • RandomRectsNodeView
    • RandomWalkerNodeView
    • ReplaceColorNodeView
    • ResizeTextureNodeView
    • RotateTextureNodeView
    • RotationalSymmetryNodeView
    • RotationType3dConstantNodeView
    • ScaleTextureNodeView
    • ScaleTextureToNodeView
    • ScaleTextureVector2NodeView
    • ScriptGraphAssetUpdater
    • ScriptNodeViewExtensions
    • ShiftTextureNodeView
    • StampNodeView
    • TextureConstantNodeView
    • TextureToMaskNodeView
    • TilemapConstantNodeView
    • TilemapPrefabEditor
    • TilemapSetConstantNodeView
    • TilemapSetEditor
    • TilemapToTextureNodeView
    • TilemapTypeEntryList
    • TilemapTypeList
    • TilesetConstantNodeView
    • TilesetEditor
    • TileTypeEntryList
    • TileTypeList
    • TransparentColorNodeView
    • UpdateAction_1_10
    • UpdateAction_1_14
    • UpdateAction_1_15
    • UpdateAction_1_2
    • UpdateChecker
    • WaveformFunctionCollapseNodeView
  • InsaneScatterbrain.Pooling
    • IPool
    • Pool<T>
    • PoolManager
  • InsaneScatterbrain.RandomNumberGeneration
    • Rng
    • RngState
  • InsaneScatterbrain.ScriptGraph
    • BoolParameterField
    • BoundsIntParameterField
    • BoundsParameterField
    • Color32ParameterField
    • ConstantNode
    • ConsumerNode
    • CopyData
    • CopyPaste
    • DataSet<T>
    • DataSetItem
    • DataSetScriptableObject<TItem, TOpenSet>
    • DataSetScriptableObject<TItem>
    • ExecutionGraph
    • ExecutionGraphBuilder
    • ExplicitInPortTypesAttribute
    • ExplicitOutPortTypesAttribute
    • ExplicitPortTypesAttribute
    • FloatParameterField
    • IConsumerNode
    • IDataSet
    • IDataSet<T>
    • IDataSetItem
    • IInstanceProvider
    • IncompatiblePortTypeException
    • INode
    • InPort
    • InPortAttribute
    • InputNode
    • IntParameterField
    • IOpenDataSet<T>
    • IParameterField
    • IPool
    • IPoolInitializer
    • IPreparable
    • IProcessorNode
    • IProviderNode
    • IScriptGraphInstanceProvider
    • IScriptNode
    • NewInstanceProvider
    • NewScriptGraphInstanceProvider
    • NodeEdge
    • ObjectParameterField
    • OpenDataSet<T>
    • OutPort
    • OutPortAttribute
    • OutputNode
    • PairVector2IntParameterField
    • Pool<T>
    • PoolManager
    • PoolManagerInitializer
    • PoolManagerSingleton
    • Pools
    • PortAttribute
    • PortNotFoundException
    • ProcessGraphNode
    • ProcessorNode
    • ProviderNode
    • RectIntParameterField
    • RectParameterField
    • RequiredPortNotConnectedException
    • RngExtensions
    • ScriptGraphComponents
    • ScriptGraphEditorInfo
    • ScriptGraphGraph
    • ScriptGraphInput
    • ScriptGraphInput<T>
    • ScriptGraphInputBool
    • ScriptGraphInputBounds
    • ScriptGraphInputBoundsInt
    • ScriptGraphInputColor32
    • ScriptGraphInputFloat
    • ScriptGraphInputFloatAsInt
    • ScriptGraphInputInt
    • ScriptGraphInputObject
    • ScriptGraphInputRect
    • ScriptGraphInputRectInt
    • ScriptGraphInputString
    • ScriptGraphInputTexture2D
    • ScriptGraphInputTilemap
    • ScriptGraphInputTilemapSet
    • ScriptGraphInputTileset
    • ScriptGraphInputVector2
    • ScriptGraphInputVector2Int
    • ScriptGraphInputVector3
    • ScriptGraphInputVector3Int
    • ScriptGraphMonoBehaviour
    • ScriptGraphParameter
    • ScriptGraphParameters
    • ScriptGraphPool
    • ScriptGraphPoolManager
    • ScriptGraphPoolManagerSingleton
    • ScriptGraphPort
    • ScriptGraphProcessor
    • ScriptGraphRunner
    • ScriptNode
    • ScriptNodeAttribute
    • SeedType
    • StringParameterField
    • Vector2IntParameterField
    • Vector2ParameterField
    • Vector3IntParameterField
    • Vector3ParameterField
  • InsaneScatterbrain.ScriptGraph.Editor
    • BoolConstantNodeView
    • BoundsConstantNodeView
    • BoundsIntConstantNodeView
    • ColorConstantNodeView
    • ConstantNodeView
    • ConstantNodeViewAttribute
    • FloatConstantNodeView
    • GroupNodeView
    • InputNodeView
    • IntConstantNodeView
    • NodeDuplicator
    • NodeFactory
    • ObjectConstantNodeView
    • OutPortEdgeConnectListener
    • OutputNodeView
    • RandomBspRoomsPreviewBehaviour
    • RectConstantNodeView
    • RectIntConstantNodeView
    • ScriptGraphContextMenu
    • ScriptGraphDebugger
    • ScriptGraphDependencyInstaller
    • ScriptGraphEditor
    • ScriptGraphInitializer
    • ScriptGraphInputEditor
    • ScriptGraphRunnerEditor
    • ScriptGraphValidator
    • ScriptGraphView
    • ScriptGraphViewSelection
    • ScriptGraphViewWindow
    • ScriptNodeView
    • ScriptNodeViewAttribute
    • ScriptNodeViewFactory
    • ScriptNodeViewTypesRegistry
    • StringConstantNodeView
    • Urls
    • Vector2ConstantNodeView
    • Vector2IntConstantNodeView
    • Vector3ConstantNodeView
    • Vector3IntConstantNodeView
  • InsaneScatterbrain.ScriptGraph.Editor.NodeSearch
    • ConstantEntryRegistry
    • DefaultEntryRegistry
    • EntryData
    • EntryFactory
    • GraphEntryRegistry
    • IEntryRegistry
    • InputParametersEntryRegistry
    • ISearchFilter
    • NodeSearchWindow
    • NodeType
    • OutputParametersEntryRegistry
    • ParametersEntryRegistry
    • PortFilter
  • InsaneScatterbrain.Serialization
    • ArraySerializer<T>
    • BoundsIntSerializer
    • BoundsSerializer
    • DataBag
    • DefaultArraySerializer
    • IDeserializer
    • ISerializer
    • RectIntSerializer
    • RectSerializer
    • Serializer
    • Vector2IntSerializer
    • Vector3IntSerializer
  • InsaneScatterbrain.Services
    • Disposer
    • Rng
    • Texture2DFactory
    • Types
  • InsaneScatterbrain.Threading
    • IMainThreadCommand
    • IMainThreadCommandHandler
    • IMainThreadCoroutineCommand
    • IMainThreadCoroutineCommandHandler
    • MainThread
    • MainThreadCommand
    • MainThreadCommandHandler
    • MainThreadCoroutine
    • MainThreadCoroutineCommand
    • MainThreadCoroutineCommandHandler
    • MainThreadUpdater
  • InsaneScatterbrain.Versioning
    • IVersioned
    • SerializedVersion
    • VersionedMonoBehaviour
    • VersionedScriptableObject

Class ScriptGraphView

The ScriptGraphView allows for the visual editing of a script graph.

Inheritance
System.Object
ScriptGraphView
Namespace: InsaneScatterbrain.ScriptGraph.Editor
Syntax
public class ScriptGraphView : GraphView

Constructors

ScriptGraphView(String, Boolean)

Creates a new graph view.

Declaration
public ScriptGraphView(string title, bool showDebugInfo)
Parameters
Type Name Description
System.String title

The title to display.

System.Boolean showDebugInfo

Whether or not to display the debug info on node views.

Properties

Graph

Gets the graph that's currently being displayed/edited.

Declaration
public ScriptGraphGraph Graph { get; }
Property Value
Type Description
ScriptGraphGraph

IsClearing

Declaration
public bool IsClearing { get; }
Property Value
Type Description
System.Boolean

MaxZoom

Declaration
public static float MaxZoom { get; set; }
Property Value
Type Description
System.Single

MinZoom

Declaration
public static float MinZoom { get; set; }
Property Value
Type Description
System.Single

NodeViewTypesRegistry

Gets the registry that contains all the node view types for each node type.

Declaration
protected ScriptNodeViewTypesRegistry NodeViewTypesRegistry { get; }
Property Value
Type Description
ScriptNodeViewTypesRegistry

Selection

Declaration
public ScriptGraphViewSelection Selection { get; }
Property Value
Type Description
ScriptGraphViewSelection

ShowDebugInfo

Gets/sets whether or not to show debug info on the node views.

Declaration
public bool ShowDebugInfo { get; set; }
Property Value
Type Description
System.Boolean

ZoomStep

Declaration
public static float ZoomStep { get; set; }
Property Value
Type Description
System.Single

Methods

AddNewGroupNode(GroupNode, Vector2)

Declaration
public void AddNewGroupNode(GroupNode newGroupNode, Vector2 position)
Parameters
Type Name Description
GroupNode newGroupNode
Vector2 position

AddNewNode(IScriptNode, Vector2, Boolean)

Adds the given node to the graph and graph view at the given position.

Declaration
public void AddNewNode(IScriptNode newNode, Vector2 position, bool autoAddToGroup = true)
Parameters
Type Name Description
IScriptNode newNode

The node to add.

Vector2 position

The position in the graph view.

System.Boolean autoAddToGroup

If set to true, nodes will be automatically added to any group node they are on top of.

AddNewReferenceNode(ReferenceNode, Vector2)

Adds a reference node to the graph.

Declaration
public void AddNewReferenceNode(ReferenceNode referenceNode, Vector2 position)
Parameters
Type Name Description
ReferenceNode referenceNode

The reference node to add.

Vector2 position

The position where the reference node should be placed in the graph.

BuildContextualMenu(ContextualMenuPopulateEvent)

Declaration
public override void BuildContextualMenu(ContextualMenuPopulateEvent e)
Parameters
Type Name Description
ContextualMenuPopulateEvent e

ClearHighlights()

Removes all the highlight colors from nodes.

Declaration
public void ClearHighlights()

Connect(InPort, OutPort, ReferenceNode)

Declaration
public Edge Connect(InPort inPort, OutPort outPort, ReferenceNode referenceNode = null)
Parameters
Type Name Description
InPort inPort
OutPort outPort
ReferenceNode referenceNode
Returns
Type Description
Edge

Dispose()

Declaration
public void Dispose()

FrameNode(IScriptNode)

Focus view on the node's view.

Declaration
public void FrameNode(IScriptNode node)
Parameters
Type Name Description
IScriptNode node

The node.

FrameNodes(IEnumerable<IScriptNode>)

Focus view on the nodes' view.

Declaration
public void FrameNodes(IEnumerable<IScriptNode> frameNodes)
Parameters
Type Name Description
IEnumerable<IScriptNode> frameNodes

The nodes.

GetCompatiblePorts(Port, NodeAdapter)

Declaration
public override List<Port> GetCompatiblePorts(Port startPort, NodeAdapter nodeAdapter)
Parameters
Type Name Description
Port startPort
NodeAdapter nodeAdapter
Returns
Type Description
List<Port>

GetGroupView(GroupNode)

Declaration
public GroupNodeView GetGroupView(GroupNode groupNode)
Parameters
Type Name Description
GroupNode groupNode
Returns
Type Description
GroupNodeView

GetReferenceNodeView(ReferenceNode)

Declaration
public ScriptNodeView GetReferenceNodeView(ReferenceNode referenceNode)
Parameters
Type Name Description
ReferenceNode referenceNode
Returns
Type Description
ScriptNodeView

GetView(IScriptNode)

Declaration
public ScriptNodeView GetView(IScriptNode node)
Parameters
Type Name Description
IScriptNode node
Returns
Type Description
ScriptNodeView

HighlightFailedNode(IScriptNode, Boolean)

Colors the node's view red in the script graph view, to indicate that it failed.

Declaration
public void HighlightFailedNode(IScriptNode node, bool warning = false)
Parameters
Type Name Description
IScriptNode node

The node to mark.

System.Boolean warning

If true, it's just a warning, color orange instead of red.

HighlightFailedNodes(IEnumerable<IScriptNode>, Boolean)

Colors the node's view red in the script graph view, to indicate that it failed.

Declaration
public void HighlightFailedNodes(IEnumerable<IScriptNode> markNodes, bool warning = false)
Parameters
Type Name Description
IEnumerable<IScriptNode> markNodes

The nodes to mark.

System.Boolean warning

If true, it's just a warning, color orange instead of red.

Initialize()

Initializes the script graph view.

Declaration
public void Initialize()

InitializePort(Port)

Declaration
public void InitializePort(Port port)
Parameters
Type Name Description
Port port

Load(ScriptGraphGraph)

Loads the given script graph into the graph view.

Declaration
public void Load(ScriptGraphGraph graphToLoad)
Parameters
Type Name Description
ScriptGraphGraph graphToLoad

The graph to load.

Reload()

Declaration
public void Reload()

RemoveFromGroup(GroupNode, IScriptNode)

Declaration
public void RemoveFromGroup(GroupNode groupNode, IScriptNode node)
Parameters
Type Name Description
GroupNode groupNode
IScriptNode node

RemoveFromGroup(GroupNode, ReferenceNode)

Declaration
public void RemoveFromGroup(GroupNode groupNode, ReferenceNode referenceNode)
Parameters
Type Name Description
GroupNode groupNode
ReferenceNode referenceNode

TriggerKeyDown(KeyCode, EventModifiers, Vector2)

Declaration
public void TriggerKeyDown(KeyCode keyCode, EventModifiers modifiers, Vector2 originalMousePosition)
Parameters
Type Name Description
KeyCode keyCode
EventModifiers modifiers
Vector2 originalMousePosition

Events

OnInitialized

Event triggers whenever the script graph view has been initialized.

Declaration
public event Action OnInitialized
Event Type
Type Description
Action

OnShowDebugInfoChanged

Event triggers when the debug info has been updated.

Declaration
public event Action<bool> OnShowDebugInfoChanged
Event Type
Type Description
Action<System.Boolean>
In This Article
Back to top Generated by DocFX