Cocos Creator 3.2.1 can't add persistent node to the parent

Hi all. I have an object what will be shown on all scenes of the game (the top status panel).
So I decided to use it as Persistent Node.

I added it to the game:


and stored it in my global variable for persistent nodes:

persistRootNodes.topPanel = persistRootNodeTopPanel;

And then change the scene… I am trying to add my top panel to the container in the scene:

protected onLoad() {

        const { topPanelPersistRootNodeContainer, node } = this;

        const topPanelPersistRootNode = persistRootNodes.topPanel;

        topPanelPersistRootNodeContainer.addChild(topPanelPersistRootNode); = true;

then I am getting error:

I am wondering if persistent nodes can change the parent? Thanks.

I can ask engineering to have a look.

persistent nodes canot change the parent.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.