Skip to content

Blueprint Editor User Guide

This guide covers how to use the Blueprint Visual Scripting Editor in Cocos Creator.

Download the latest version from GitHub Release (Free):

Download Cocos Node Editor v1.2.0

QQ Group: 481923584 | Website: esengine.cn

  1. Extract cocos-node-editor.zip to your project’s extensions directory:
your-project/
├── assets/
├── extensions/
│ └── cocos-node-editor/ ← Extract here
└── ...
  1. Restart Cocos Creator

  2. Confirm the plugin is enabled via Extensions → Extension Manager

  3. Open the editor via Panel → Node Editor

  • Toolbar - Located at the top, contains New, Open, Save, Undo, Redo operations
  • Variables Panel - Located at the top-left, for defining and managing blueprint variables
  • Canvas Area - Main area for placing and connecting nodes
  • Node Menu - Right-click on empty canvas to open, lists all available nodes by category
OperationMethod
Pan canvasMiddle-click drag / Alt + Left-click drag
Zoom canvasMouse wheel
Open node menuRight-click on empty space
Box select nodesDrag on empty canvas
Additive selectCtrl + Drag
Delete selectedDelete key
  1. Drag from Node Panel - Drag nodes from the left panel onto the canvas
  2. Right-click Menu - Right-click on empty canvas space to select nodes
  1. Drag from an output pin to an input pin
  2. Compatible pins will highlight
  3. Release to complete the connection

Pin Type Reference:

Pin ColorTypeDescription
White ▶ExecExecution flow (controls order)
Cyan ◆EntityEntity reference
Purple ◆ComponentComponent reference
Light Blue ◆StringString value
Green ◆NumberNumeric value
Red ◆BooleanBoolean value
Gray ◆AnyAny type

Click a connection line to select it, then press Delete.

Event nodes are entry points for blueprint execution, triggered when specific events occur.

NodeTriggerOutputs
Event BeginPlayWhen blueprint startsExec, Self (Entity)
Event TickEvery frameExec, Delta Time
Event EndPlayWhen blueprint stopsExec

Example: Print message on game start

[Event BeginPlay] ──Exec──→ [Print]
└─ Message: "Game Started!"

Nodes for operating on ECS entities.

NodeFunctionInputsOutputs
Get SelfGet current entity-Entity
Create EntityCreate new entityExec, NameExec, Entity
Destroy EntityDestroy entityExec, EntityExec
Find Entity By NameFind by nameNameEntity
Find Entities By TagFind by tagTagEntity[]
Is ValidCheck entity validityEntityBoolean
Get/Set Entity NameGet/Set nameEntityString
Set ActiveSet active stateExec, Entity, ActiveExec

Example: Create new entity

[Event BeginPlay] ──→ [Create Entity] ──→ [Add Component]
└─ Name: "Bullet" └─ Type: Transform

Access and manipulate ECS components.

NodeFunction
Has ComponentCheck if entity has component
Get ComponentGet component instance
Add ComponentAdd component to entity
Remove ComponentRemove component
Get/Set PropertyGet/Set component property

Example: Modify Transform component

[Get Self] ─Entity─→ [Get Component: Transform] ─Component─→ [Set Property]
├─ Property: x
└─ Value: 100

Nodes that control execution flow.

Conditional branching, similar to if/else.

┌─ True ──→ [DoSomething]
[Branch]─┤
└─ False ─→ [DoOtherThing]

Execute multiple branches in order.

┌─ Then 0 ──→ [Step1]
[Sequence]─┼─ Then 1 ──→ [Step2]
└─ Then 2 ──→ [Step3]

Execute a specified number of times.

[For Loop] ─Loop Body─→ [Execute each iteration]
└─ Completed ────→ [Execute after loop ends]
InputDescription
First IndexStarting index
Last IndexEnding index
OutputDescription
Loop BodyExecute each iteration
IndexCurrent index
CompletedExecute after loop ends

Iterate over array elements.

Loop while condition is true.

Execute only once, skip afterwards.

Alternate between A and B outputs each execution.

Control whether execution passes through via Open/Close/Toggle.

NodeFunctionOutput Type
DelayDelay execution by specified timeExec
Get Delta TimeGet frame delta timeNumber
Get TimeGet total runtimeNumber

Example: Execute after 2 second delay

[Event BeginPlay] ──→ [Delay] ──→ [Print]
└─ Duration: 2.0 └─ "Executed after 2s"
NodeFunction
Add / Subtract / Multiply / DivideArithmetic operations
AbsAbsolute value
ClampClamp to range
LerpLinear interpolation
Min / MaxMinimum/Maximum value
Random RangeRandom number
Sin / Cos / TanTrigonometric functions
NodeFunction
PrintOutput to console

Variables store and share data within a blueprint.

  1. Click the + button in the Variables panel
  2. Enter variable name
  3. Select variable type
  4. Set default value (optional)
  • Drag to canvas - Creates Get or Set node
  • Get Node - Read variable value
  • Set Node - Write variable value
TypeDescriptionDefault
BooleanBoolean valuefalse
NumberNumeric value0
StringString value""
EntityEntity referencenull
Vector22D vector(0, 0)
Vector33D vector(0, 0, 0)

If you delete a variable but nodes still reference it:

  • Nodes display a red border and warning icon
  • You need to recreate the variable or delete these nodes

You can organize multiple nodes into a visual group box to help manage complex blueprints.

  1. Box-select or Ctrl+click to select multiple nodes (at least 2)
  2. Right-click on the selected nodes
  3. Choose Create Group
  4. A group box will automatically wrap all selected nodes
ActionMethod
Move groupDrag the group header, all nodes move together
UngroupRight-click on group box → Ungroup
  • Dynamic sizing: Group box automatically resizes to wrap all nodes
  • Independent movement: You can move nodes within the group individually, and the box adjusts
  • Editor only: Groups are purely visual organization, no runtime impact
ShortcutFunction
Ctrl + SSave blueprint
Ctrl + ZUndo
Ctrl + Shift + ZRedo
Ctrl + CCopy selected nodes
Ctrl + XCut selected nodes
Ctrl + VPaste nodes
DeleteDelete selected items
Ctrl + ASelect all
  1. Click the Save button in the toolbar
  2. Choose save location (must be saved in assets/resources directory, otherwise Cocos Creator cannot load dynamically)
  3. File extension is .blueprint.json

Important: Blueprint files must be placed in the resources directory for runtime loading via cc.resources.load().

  1. Click the Open button in the toolbar
  2. Select a .blueprint.json file

Blueprints are saved as JSON, compatible with @esengine/blueprint runtime:

{
"version": 1,
"type": "blueprint",
"metadata": {
"name": "PlayerController",
"description": "Player control logic"
},
"variables": [],
"nodes": [],
"connections": []
}

Move entity every frame:

Event Tick
Delta Time
Multiply
A
B (Speed) 100
Result
Set Property
Exec
Target
x

Check death after taking damage. Event OnDamage is a custom event node that can be triggered from code via vm.triggerCustomEvent('OnDamage', { damage: 50 }):

Spawn an enemy every 2 seconds:

Event BeginPlay
Do N Times
Exec
N 10
Loop Body
Index
Completed
Delay
Exec
Duration 2.0
Done
Create Entity
Exec
Name "Enemy"
Entity

Check if pin types are compatible. Execution pins (white) can only connect to execution pins. Data pins need matching types.

  1. Ensure entity has BlueprintComponent attached
  2. Ensure scene has BlueprintSystem added
  3. Check if autoStart is true

Use Print nodes to output variable values to the console.