Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

Txt file type in cocos creator?

$
0
0

@ozergul wrote:

hello I wanna load txt file.

properties: {
    txt: {
        default: null,
        type:  cc.RawText 
        /* I tried TextAsset, RawAsset but error */
    }
},

*error is: *The "type" attribute of "NewScript.txt" is undefined when loading script.**

What can I do for load txt?

Also I can load with code like this but I dont wanna use this way because txt file size is very big.

    cc.loader.loadRes("deneme", function(err, data){
        console.log(data)
    })

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>