Hey guys, so here’s the deal:
There are multiple nodes on Canvas each has a custom component with script Node.ts
Nodes have various amount of neighbours (let it be from 2 to 4)
So what I want is to customise each node with amount of its’ neighbours like this:
The properties in Node.ts are like this:
@property([cc.Node])
neighbors: cc.Node[] = [];
@property([cc.Vec2])
validDirections: cc.Vec2[] = [];
The trouble is each time I bind a neighbours in Cocos Creator, when I select another object it removes all the properties except the length, like this:
So I really don’t get it how to make it static and save the values inside the node
What am I doing wrong?