How can I get the root node (Canvas in my case) in a best way?
Get the Root Node in hierarchy
Can I look for node set as canvas by simple code?
var rootNode = cc.find(“Canvas”);
- let canvas = cc.game.canvas;
- let canvas = cc.director.getScene().getChildByName(“Canvas”);
1st way is most efficient out of all.