-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ImageAsset Guide
All assets are known engine types that allow instances to be created at runtime. The "ImageAsset", like all assets, is derived from a base type of "AssetBase". That means it includes all the fields from that type as well as adding its own fields specific to itself.
The ImageAsset type exposes the following fields in addition to those it inherits:
- ImageFile
- Force16bit
- FilterMode
- ExplicitMode
- CellRowOrder
- CellOffsetX
- CellOffsetY
- CellStrideX
- CellStrideY
- CellCountX
- CellCountY
- CellWidth
- CellHeight
In the list above, only "ImageFile" is mandatory, all others are completely optional.
Here's an example of the most basic form of an ImageAsset where only the mandatory "ImageFile" field is specified:
<ImageAsset
AssetName="NinjaImages"
ImageFile="Ninjas.png"
/>This would produce an asset known as "NinjaImages" and produce a single texture from the image "Ninjas.png" which it expects to be located alongside where the XML ImageAsset file is.
The following is a complete description of each of these fields.