Skip to content

Node API

Antoine Lelievre edited this page Mar 28, 2018 · 2 revisions

Field attributes

name constructors descriptions
Input (), (string name) input field, this field will be displayed as an anchor left outside of the window, name is to specify the anchor name (max 4 chars)
Output (), (string name) same as PWInput but in output
Offset (int x, int y), (int y) add a visual offset to decal the anchor position
Color (float r, float g, float b), (float r, float g, float b, float a) background color of the anchor
Visibility (Visibility v) visibility of the anchor

Functions

TODO

Anchors manipulations

All anchor manipulation function takes 2 parameters (+1 optional): propertyName: the name of the target field *: value to set index: optional index for PWMultiple anchors

PWNode function name description
UpdatePropEnabled allow to disable/enable an anchor
UpdatePropName change the name of the anchor
UpdatePropBackgroundColor change the background color of the anchor
UpdatePropVisibility update the visibility of the anchor (VISIBLE, GONE or INVISIBLE)
GetPropLinkCount get the number of links connected to the anchor
GetAnchorRect get the anchor rect postion

PWNode bools

name description
seedHasChanged true when seed just changed
positionHasChanged true when chunk position just changed
chunkSizeHasChanged true when chunk size just changed
inputHasChanged true when an Input was linked to your node
outputHasChanged true when an Output was linked to your node
justReloaded true the first frame after script compilation / play mode / editor mode change (when OnEnable is called).
notifyDataChanged always false, set it to true when you modify an internal property which affect output. (must be called in OnNodeGUI())
Clone this wiki locally