Cocos Creator API

1.3.0

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

url static

: cc

_rawAssets Object private readOnly

The base url of raw assets.

_builtinRawAssets Object private readOnly

The base url of builtin raw assets.

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

raw
(
  • url
)
String

Returns the url of raw assets, you will only need this if the raw asset is inside the "resources" folder.

url String

:

: String

:

---
var url = cc.url.raw("textures/myTexture.png");
console.log(url);   // "resources/raw/textures/myTexture.png"

builtinRaw
(
  • url
)
String

Returns the url of builtin raw assets. This method can only used in editor.

url String

:

: String

:

---
var url = cc.url.builtinRaw("textures/myTexture.png");
console.log(url);   // "resources/default-raw/textures/myTexture.png"

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index