Hello, I have a, I think, simple issue. I’m trying to get a childNode by using it’s tag. I have a function that is called several times:
var drawPrefab = cc.instantiate(this.drawPathNode);
var drawPrefab = this.node.getChildByTag(111);
As you can see, I create a childNode when the function is called and the ‘positionOnPath’ variable is set to ‘1’. The position get incremented elsewhere then the function is called again. I am wanting something different to happen when the position is not ‘1’ and I’m trying to update the childNode I created previously but I am unable to reference it. This is why I’m trying to use the getChildByTag feature.
Is there something obvious that I am doing wrong here?
Thanks in advance!