article thumbnail

Help needed loading SpriteFrames dynamically from JSON configuration in Cocos Creator 3.8.6

Cocos

Here is the relevant code snippet from SetLevel.ts However, I get the following error at runtime: Error loading sprite at Levels/BgLevel4: Error: Bundle resources doesn’t contain Levels/BgLevel4 I have verified: The files are inside the resources folder. The path is correct and matches the file names exactly (case-sensitive).

Sprite 52
article thumbnail

How to create a sprite in code through a plist in v3.8.6?

Cocos

does anyone know how create a sprite in code with a plist in cocos creator v3.8.6? i tried google, and this forum, but nothing worked. or rly any 3.8

Sprite 40
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Strategies for Optimizing Multiplayer Games in Unity

Logic Simplified

Billboard Sprites reduces GPU processing through the use of simple models for distant objects. Using the Profiler allows developers to detect memory-intensive code sections which they should optimize. The LOD Group Component allows developers to specify different levels of detail which transition according to object distance.

Games 78
article thumbnail

Node setSiblingIndex()

Cocos

In cocos 2D i used to set the zindex with higher value to move that symbol/sprite/image in front/top of other images. Currently the code is maintaining the order based on index of child while i believe it should be a separate property on node based on which order is rearranged. Hi @s_agarwal I am working on slot game.

Sprite 52
article thumbnail

Maximum number of sprites?

Cocos

I’m not getting any errors, it simply doesn’t show a sprite. In fact, the sprite that I pull from the cache isn’t null, but nothing shows up. Later, when I want the sprites, I call jerseySprite = Sprite::createWithSpriteFrameName(jerseyName); Right now, I’m wondering if maybe I’m doing something wrong.

Sprite 40
article thumbnail

Gradient Shader Works in 2.4.7 But Not in 3.8.2

Cocos

Even after modifying the vertex buffer ( vb ), the changes are not reflecting on the sprite. Can you please provide a complete code example for setting a gradient color dynamically in Cocos Creator 3.8.2 ? Example for a vertical gradient (from startColor to endColor ) How to properly update the vertex buffer after modifying colors?

Shaders 40
article thumbnail

Tutorial: Cocos Shader Series - Use a Noise Map to Make a Dissolve Texture

Cocos

Blockquote const sprite = this.getComponent(Sprite); const mat = sprite.customMaterial; mat.setProperty(‘dissolveThreshold’, 0.5); Version 3.6.x, x, I using this code but it not bring Property affect to shader Ok, this work if turn of Packable in main Sprite inspector

Shaders 98