Nanfeng

Notes on software development, code, and curious ideas

Creating a Gradient Progress Bar in Cocos Creator

Prepare a gradient image. Set the progress bar Sprite’s Type to FILLED, set the ProgressBar Mode to FILLED, and set Total Length to 1:

ProgressBar settings

Set the child Bar Sprite’s Type to FILLED as well:

Bar Sprite settings

If these settings disagree, Cocos reports:

1
ProgressBar non-FILLED mode only works when barSprite's Type is non-FILLED!
Configuration error
+