Skip to content

Using the Cocos extension

The AdsCraft panel lives inside Cocos Creator 3.x: it runs the Cocos build, extracts the field schema, compresses assets, merges everything into one HTML file and uploads it to the cloud — without leaving the Editor. Install it first (Integrating the SDK → 1. Install), then open the panel from Extension → AdsCraft, or with Cmd+E / Ctrl+E.

The panel has four tabs — Build & upload, Assets, Size and Settings — plus the account chip that opens Accounts.

Your first Google sign-in on the dashboard creates your own workspace, with you as its owner. That is all a solo developer needs.

The panel never asks for a password. It opens your browser on the dashboard approval page together with a short code: sign in with Google, check the code matches the one in the Editor, then click Approve. The token is stored outside your project. Sign out and Sign in to another account are in the Accounts tab, together with which Apps and permissions the account has.

If the session expires the panel says so and keeps your App, scene and orientation selections, so you can sign in again and build without re-picking anything.

The Accounts tab waiting for approval: the code your browser page has to match.

  1. Pick the App and the Concept — or « New Concept » and type a name for a new one.
  2. Pick the startup scene. It is also the schema source: the panel reads the @paField properties of that scene’s scripts. It uses the saved file on disk, so save the scene first — the checklist tells you when the scene still has unsaved changes.
  3. Pick the orientation (Portrait, Landscape or Auto).
  4. Check Before you build — signed in, App selected, Concept named, startup scene saved.
  5. Build & upload runs the whole pipeline: Cocos build, extract schema, compress assets, merge into one file, size check, upload. Every step shows its real size against the payload cap, and Cancel stops the run (the temp folder is kept for inspection).

The same tab lists Fields exposed to the web with type and target, and flags the problems that would bite later: duplicate labels, fields inside the auto-atlas (the web can only add, not replace in place), and one value shared by several copies of an object.

When the run finishes you get a link that opens the new Creative on the dashboard, and the temporary files on your machine are removed. Uploading a project the cloud already has — same source hash — tells you so and uploads nothing.

The Build & upload tab: App, Concept, startup scene, orientation and the checklist.

If the payload is over the cap the build fails locally and nothing is uploaded: the panel says how much to cut and points at the three fixes — texture compression in the Cocos build settings, a lower audio bitrate or mono, and the Size tab.

The workspace also has a 50 MB storage budget, shared by every Build (its HTML, schema and metadata), every image or audio replaced on the web, and the config each Creative stores. The Accounts tab shows how much is used and turns the number amber near the limit; deleting a Concept frees its Build, deleting a Creative frees the assets and config it holds. An upload over the budget stops with error 4291.

Per-asset compression that applies to the build output only — your project files stay untouched. Set the build defaults (images: Keep as is / WebP / JPEG / PNG plus a max size; audio: keep as is or MP3 at a bitrate) and override any single file. The table shows original against compressed size, and the Web fields filter narrows it to the image and audio fields the campaign team can replace from the dashboard.

The Assets tab: build defaults, and a row per asset with its original and compressed size.

Size analysis runs the same pipeline locally — Cocos build, schema, compress, merge — and stops before upload, so you can iterate on size without creating builds in the cloud. It shows the estimated payload against the cap, the difference from the last uploaded build, a breakdown by group (texture, engine, audio, game script, JSON/scene, PA runtime) and every file in the payload, with Edit compression to jump straight to the Assets tab.

The Size tab: estimated payload against the cap, the breakdown by group and the file list.

Read-only project facts: SDK version, Cocos Creator version and the project path. Two settings:

  • Use the AdsCraft splash screen — on by default. Every package opens with the AdsCraft splash instead of the Cocos Creator one. Turn it off to keep the splash your project already builds.
  • Run a runtime check after merge — loads the payload in a hidden window before uploading and stops on runtime errors (missing node or component, bad field id, missing slot). It is off by default.

An extension too old to build shows Update required instead of the form, with a button to download the new pack — import it again (Extension Manager → Import) and reload the panel.