Assets workflow

    • Create a new file through the Assets panel in Cocos Creator. Use the Create button to start the importing process.
    • By copying files, in the file manager of the operating system, to the project asset folder, and then open the editor or activate the editor window to automatically refresh the asset list of the Assets panel to finish importing assets.
    • Drag and drop asset files from the file manager of the operating system to a folder location on the Assets panel. This will trigger an import of the selected assets.

    Syncing Assets

    The assets in the Assets panel are synchronized with the project asset files seen in the file manager of the operating system. Assets are moved, renamed, and deleted in the Assets panel.

    • If deleted in the file manager of the operating system, it will be deleted in Cocos Creator.

    All asset files will generate a .meta configuration file with the same name when imported. This configuration file provides the unique identification (uuid) of the asset in the project, small image references, cropping data of texture assets, as well as other configuration information. This data is a necessary factor in identifying a legitimate asset that Cocos Creator is using.

    It is not recommended to operate the asset file directly in the file manager of the operating system. If there is such an operation, please manually operate the corresponding file along with the asset file. The following suggestions are recommended:

    • Close the editor you are using to avoid update failures due to file locks or identical asset names.
    • When deleting, renaming, or moving assets, please delete, rename, and move the .meta file as needed.
    • When copying assets together with .meta files, the copied .meta files will be used directly instead of generating new .meta files; if only the asset files are copied, a new file with the corresponding name will be generated when you re-open the editor. This asset will become a new asset to the editor.

    Assets in Library

    After the asset is imported, new data will be generated and stored in the project’s Library folder. The structure and assets of the files in Library are engine-oriented and the format required for the final game, that is, machine-friendly, but not human-friendly.

    A asset has a unique uuid, used to locate the asset, but this method is not intuitive enough. There is another intuitive way: Database URL format, such as an asset-db. The corresponding protocol header is db://assets, the protocol header for internal-db is db://internal.

    There are folder-level asset formats, such as

    SVN or GIT syncing of assets