Phaser API Documentation

addUnityAtlas(key, source, data, [dataSource])


Adds a Unity Texture Atlas to this Texture Manager. The data must be in the form of a Unity YAML file.


name type arguments description
key string

The unique string-based key of the Texture.

source HTMLImageElement

The source Image element.

data object

The Texture Atlas data.

dataSource HTMLImageElement | HTMLCanvasElement | Array.<HTMLImageElement> | Array.<HTMLCanvasElement> <optional>

An optional data Image element.


The Texture that was created, or null if the key is already in use.

Since: 3.0.0