2013-07-02 49 views
0

我剛剛開始運行Cocos3d,並開箱試圖運行演示文件我收到編譯錯誤。這裏的日誌中的錯誤:在'CCFileUtils'類型的對象上未找到屬性'sharedFileUtils'

/Users/user/Developer/Tutorials/Cocos3dInitialTest/Cocos3dInitialTest/cocos3d/cocos3d/Nodes/CC3BitmapLabelNode.m:140:36: error: property 'sharedFileUtils' not found on object of type 'CCFileUtils' 
    NSString *fullpath = [CCFileUtils.sharedFileUtils fullPathFromRelativePath: fontFile]; 

我敢肯定,這是一個簡單的修復,但啊,這麼大的初始代碼打通。如果可能的話,不要過熱我的大腦。

回答

0

sharedFileUtils是一種方法,而不是屬性。

試試這個方法:

[CCFileUtils sharedFileUtils] 

您的代碼應該是這樣的:

NSString *fullpath = [[CCFileUtils sharedFileUtils] fullPathFromRelativePath: fontFile]; 
相關問題