Simple tools for cocos creator
go get github.com/zhiruili/cckit
cd cckit
go build
# or use make command to build other platform version:
# > make win
Subcommand lsnode
can list all nodes from root by parse prefab file.
Example usage:
cckit lsnode --sep="." ~/projects/mygame/assets/resources/example.prefab
Output:
testRoot.pannel1.img11
testRoot.pannel1.img12
testRoot.pannel2.img21
testRoot.pannel2.panel3.img31
testRoot.pannel2.panel3.img32
cckit lsnode --cuthead=1 --maxdepth=3 --prefix='root' --suffix='.node' --nprefix='["' --nsuffix='"]' ~/projects/mygame/assets/resources/example.prefab
Output:
root["pannel1"]["img11"].node
root["pannel1"]["img12"].node
root["pannel2"]["img21"].node
root["pannel2"]["panel3"].node
Subcommand findref
can find references from all prefabs.
Example usage:
cckit findref -s ~/projects/mygame/assets ~/projects/mygame/assets/resources/img.png
Output:
example.prefab: img11
example.prefab: img12