Common problems
Quick fixes for the problems people hit most often.
| What you see | Likely cause | Fix |
|---|---|---|
| Nothing appears and there is no error | placements.json wasn't found. A failed load can stay silent. | Check your browser's Network tab. Keep the trailing slash on the path. |
get() returns null | The name is different from the instance name in zStudio, or you called it before loadStage(). | Copy the instance name exactly, and call get() after loadStage(). |
| An element jumps back after a resize | The change was not stored. | See Move assets without breaking the layout. |
| Something I hid comes back after a resize | visible or alpha was set directly. | Use setVisible() and setAlpha(). |
| Animations do not play | ZUpdatables is not running. | Call ZUpdatables.init(), and on Pixi and Phaser call ZUpdatables.update() every frame. |
| A button has no hover or pressed look | The state children are missing or misnamed. | Name them upState, overState, downState, disabledState. |
| A new row in a list cannot be reached | The list has not measured the new content. | Call applyTransform() on the ZScroll after adding rows. |
setState() shows the wrong state | The name doesn't exist, so it fell back to idle. | Check the spelling with getAllStateNames(). |
Still stuck? Email jonzohar@zstudiosltd.com.