Accessing nodes by name

Accessing nodes by name
0.0 0



Is there a way to get a node by name in a scene that has been designed with CocoStudio?

I am loading my scene using CCSSceneReader::sharedSceneReader()->createNodeWithSceneFile(“test.json”);

I notice that you can set an alias for each node in CocoStudio, and the alias is set in the json scene file. Can I use this alias somehow to retrieve the node?

I am currently using getChildByTag, but this is not ideal when dealing with nested nodes.

Many thanks,



Thanks for using cocostudio.
An alias for each node in CocoStudio is just used for easily finding node when you are building scene, In cocos2dx 2.2,CCNode can not be getted by alias, but your question is worth discussing, please make a issue in github, we may discuss it.:slight_smile: