How to disable a node like in the creator?

if i do this in the creator: = false

my fps, a device performance etc goes up

How can i disable a node in a cpp project?

1 Like


This is not a true
cocos2d::Node class does not have “setEnabled(bool)” function

And as i see only an ui classes have this function. But in the creator you could do it for all game object on a scene.

And this function does not disable an ui node. I still see an ui node on a scene. Creator’s way looks like remove a node from scene. It stops rendering a node, updating a node, etc.

I am using v4.0

If you want to remove the node:


depending upon your needs.


To show/hide


Pause pauses the node’s scheduled function calls, its actions and its events


to resume.

I misread your first post. I apologize. I was driving to an appointment and answering at the same time.

1 Like

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