Saturday, April 11, 2026

Most sprites are not displayed within the desktop model of browsers – Cocos Creator


Hello all!

A really attention-grabbing scenario. On the one hand, there have been no issues in previous variations of the browser, alternatively, I’ve information.

As I stated, most sprites are usually not displayed when operating the sport within the desktop model of the browser. I made a decision to deal with one particular sprite that wasn’t exhibiting up.

Created a brand new 2D venture model 3.8.6. Utilizing Drag and Drop, I moved the sprite I used to be all for from the principle venture folder to the Property of the brand new venture. Wanting forward, I’ll say that on this approach Cocos Creator additionally copied the .meta file itself (though I didn’t transfer it). I place the sprite in the midst of the Canvas and launch the venture within the browser. The sprite will not be seen.

I take away the sprite from the scene and from Property. I copy this sprite into the folder (not by way of Drag and Drop), so now a brand new meta file is created after I change to Cocos Creator. I place the sprite in the midst of the Canvas and launch the venture within the browser. The sprite is seen. In contrast .meta recordsdata when the sprite is seen and when it’s not seen. I didn’t discover any variations that would clarify this habits.

Right here is the .meta file from the seen sprite:

{
  "ver": "1.0.27",
  "importer": "picture",
  "imported": true,
  "uuid": "e16a8756-3609-426a-82cf-33d00a00b57a",
  "recordsdata": [
    ".json",
    ".png"
  ],
  "subMetas": {
    "6c48a": {
      "importer": "texture",
      "uuid": "e16a8756-3609-426a-82cf-33d00a00b57a@6c48a",
      "displayName": "events_icon",
      "id": "6c48a",
      "identify": "texture",
      "userData": {
        "wrapModeS": "clamp-to-edge",
        "wrapModeT": "clamp-to-edge",
        "imageUuidOrDatabaseUri": "e16a8756-3609-426a-82cf-33d00a00b57a",
        "isUuid": true,
        "seen": false,
        "minfilter": "linear",
        "magfilter": "linear",
        "mipfilter": "none",
        "anisotropy": 0
      },
      "ver": "1.0.22",
      "imported": true,
      "recordsdata": [
        ".json"
      ],
      "subMetas": {}
    },
    "f9941": {
      "importer": "sprite-frame",
      "uuid": "e16a8756-3609-426a-82cf-33d00a00b57a@f9941",
      "displayName": "events_icon",
      "id": "f9941",
      "identify": "spriteFrame",
      "userData": {
        "trimThreshold": 1,
        "rotated": false,
        "offsetX": 0,
        "offsetY": 0,
        "trimX": 5,
        "trimY": 5,
        "width": 162,
        "top": 131,
        "rawWidth": 172,
        "rawHeight": 141,
        "borderTop": 0,
        "borderBottom": 0,
        "borderLeft": 0,
        "borderRight": 0,
        "packable": true,
        "pixelsToUnit": 100,
        "pivotX": 0.5,
        "pivotY": 0.5,
        "meshType": 0,
        "vertices": {
          "rawPosition": [
            -81,
            -65.5,
            0,
            81,
            -65.5,
            0,
            -81,
            65.5,
            0,
            81,
            65.5,
            0
          ],
          "indexes": [
            0,
            1,
            2,
            2,
            1,
            3
          ],
          "uv": [
            5,
            136,
            167,
            136,
            5,
            5,
            167,
            5
          ],
          "nuv": [
            0.029069767441860465,
            0.03546099290780142,
            0.9709302325581395,
            0.03546099290780142,
            0.029069767441860465,
            0.9645390070921985,
            0.9709302325581395,
            0.9645390070921985
          ],
          "minPos": [
            -81,
            -65.5,
            0
          ],
          "maxPos": [
            81,
            65.5,
            0
          ]
        },
        "isUuid": true,
        "imageUuidOrDatabaseUri": "e16a8756-3609-426a-82cf-33d00a00b57a@6c48a",
        "atlasUuid": "",
        "trimType": "auto"
      },
      "ver": "1.0.12",
      "imported": true,
      "recordsdata": [
        ".json"
      ],
      "subMetas": {}
    }
  },
  "userData": {
    "sort": "sprite-frame",
    "hasAlpha": true,
    "fixAlphaTransparencyArtifacts": false,
    "redirect": "e16a8756-3609-426a-82cf-33d00a00b57a@6c48a"
  }
}

And right here is the .meta file from the invisible sprite:

{
  "ver": "1.0.27",
  "importer": "picture",
  "imported": true,
  "uuid": "690d61f5-ae26-4d9f-9b3e-caaf70929147",
  "recordsdata": [
    ".json",
    ".png"
  ],
  "subMetas": {
    "6c48a": {
      "importer": "texture",
      "uuid": "690d61f5-ae26-4d9f-9b3e-caaf70929147@6c48a",
      "displayName": "events_icon",
      "id": "6c48a",
      "identify": "texture",
      "userData": {
        "wrapModeS": "clamp-to-edge",
        "wrapModeT": "clamp-to-edge",
        "imageUuidOrDatabaseUri": "690d61f5-ae26-4d9f-9b3e-caaf70929147",
        "isUuid": true,
        "seen": false,
        "minfilter": "linear",
        "magfilter": "linear",
        "mipfilter": "none",
        "anisotropy": 0
      },
      "ver": "1.0.22",
      "imported": true,
      "recordsdata": [
        ".json"
      ],
      "subMetas": {}
    },
    "f9941": {
      "importer": "sprite-frame",
      "uuid": "690d61f5-ae26-4d9f-9b3e-caaf70929147@f9941",
      "displayName": "events_icon",
      "id": "f9941",
      "identify": "spriteFrame",
      "userData": {
        "trimThreshold": 1,
        "rotated": false,
        "offsetX": 0,
        "offsetY": 0,
        "trimX": 5,
        "trimY": 5,
        "width": 162,
        "top": 131,
        "rawWidth": 172,
        "rawHeight": 141,
        "borderTop": 0,
        "borderBottom": 0,
        "borderLeft": 0,
        "borderRight": 0,
        "packable": true,
        "pixelsToUnit": 100,
        "pivotX": 0.5,
        "pivotY": 0.5,
        "meshType": 0,
        "vertices": {
          "rawPosition": [
            -81,
            -65.5,
            0,
            81,
            -65.5,
            0,
            -81,
            65.5,
            0,
            81,
            65.5,
            0
          ],
          "indexes": [
            0,
            1,
            2,
            2,
            1,
            3
          ],
          "uv": [
            5,
            136,
            167,
            136,
            5,
            5,
            167,
            5
          ],
          "nuv": [
            0.029069767441860465,
            0.03546099290780142,
            0.9709302325581395,
            0.03546099290780142,
            0.029069767441860465,
            0.9645390070921985,
            0.9709302325581395,
            0.9645390070921985
          ],
          "minPos": [
            -81,
            -65.5,
            0
          ],
          "maxPos": [
            81,
            65.5,
            0
          ]
        },
        "isUuid": true,
        "imageUuidOrDatabaseUri": "690d61f5-ae26-4d9f-9b3e-caaf70929147@6c48a",
        "atlasUuid": "",
        "trimType": "auto"
      },
      "ver": "1.0.12",
      "imported": true,
      "recordsdata": [
        ".json"
      ],
      "subMetas": {}
    }
  },
  "userData": {
    "sort": "sprite-frame",
    "hasAlpha": true,
    "fixAlphaTransparencyArtifacts": false,
    "redirect": "690d61f5-ae26-4d9f-9b3e-caaf70929147@6c48a"
  }
}

What’s improper right here? And it’s very attention-grabbing the way it occurs that previous variations of the browser show all the pieces usually?

It might be terrible if I needed to delete all of the sprites and add them once more, after which set them up in every prefab. Furthermore, the place is the assure that it gained’t break once more. Why might this even occur?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles