TypeError: r is not a function
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/core/studio/csd-importer.js:1:20956
at CCLoader.<anonymous> (/Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/CCAssetLibrary.js:99:17)
at /Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/load-pipeline/CCLoader.js:200:42
at /Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/utils.js:38:21
at _combinedTickCallback (internal/process/next_tick.js:67:7)at process._tickCallback (internal/process/next_tick.js:98:9)
at EventEmitter.o (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/main.js:1:206)at EventEmitter.g (events.js:286:16)
at emitTwo (events.js:106:13)at EventEmitter.emit (events.js:191:7)
at EventEmitter.<anonymous> (/Applications/CocosCreator.app/Contents/Resources/electron.asar/browser/api/web-contents.js:128:18)
at emitTwo (events.js:106:13)at EventEmitter.emit (events.js:191:7) TypeError: r is not a functionat /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/core/studio/csd-importer.js:1:20956
at CCLoader.<anonymous> (/Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/CCAssetLibrary.js:99:17)
at /Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/load-pipeline/CCLoader.js:200:42
at /Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/utils.js:38:21at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at EventEmitter.o (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/main.js:1:206)at EventEmitter.g (events.js:286:16)
at emitTwo (events.js:106:13)at EventEmitter.emit (events.js:191:7)
at EventEmitter.<anonymous> (/Applications/CocosCreator.app/Contents/Resources/electron.asar/browser/api/web-contents.js:128:18)
at emitTwo (events.js:106:13)at EventEmitter.emit (events.js:191:7)
Please take a look at the issue, if you need the offending CSD I can send it to you privately.
@zhangbin Thank you, by removing FontResource in a Button do you mean pressing Reset at Properties | Features | Font File at the properties sidebar of the Cocos Studio? It removes the .ttf file and Font File becomes “Drag resource here”. If so, it seems it doesn’t work. Then I did the same to all Labels, not only buttons, but it reached the same error at csd-importer.js (but at the different line csd-importer.js:1:20937).
I’m sorry that it’s not enough to solve the problem by Reset the Font property of Button. You should remove the FontResource config in the csd file by a Text Editor. The changes should be like this:
Thanks, removing FontResource in the csd could make it pass the import process. However, the converted “VipDetailsViewLayer.prefab” has wrong positions/sizes of its elements compared to the original csd. Is there an issue with keeping object positions?
As for your fix for Cocos Creator v1.3, will it make it into the next beta? I’m looking into
I wish these beta were posted in the English forum too.
I’ve just test the problem. I’m sorry that I can’t solve the problem in the importer. It’s caused by the usage of relative position in Cocos Studio like this:
Because the mechanism of relative position are different between Cocos Studio & Cocos Creator. There isn’t a perfect importer for the relative position. Sorry for the problem.
OK thanks for investigation. As for the relative size, how about converting the relative size of Cocos Studio into the absolute size of Cocos Creator? Does it break anything further if it’s broken already?