The usernode added to the TiledLayer is not visible in the scene

I have created a tiled map in tiled software and integrated in cocos too. As my game has pathfinding algorithm, I want to add the pathfinder grid in one of my tiled layer as a user node but the node is not visible in the scene but i can see it in the hierarchy.

Anyone know the reason?

Try to set the opacity of the node to make it invisible.

@Tom_k how would that make the user node visible? Actually the example in the manual is showing the user node but i have followed the same but user-node is not showing up

When adding custom nodes/prefabs, you can’t just set their parent as the TiledLayer node.

You must manage those using the TiledLayer API.

Since the TiledLayer batches the drawing of such elements, you may have a small delay to update. You can force it by using → Cocos Creator API

@rybones Actually, I did not set the parent for the nodes instead I used the tiled layer method addUserNode to add my instantiated prefab node to tiled layer. Then the nodes are added as child automatically. But cannot see them in the scene.

This is how they have shown in the manual example