According to the docs, sprite
is “The sprite to render.” and spriteAsset
is “The id of the sprite asset to render.”
What does this mean, and what are the best use cases for both properties?
According to the docs, sprite
is “The sprite to render.” and spriteAsset
is “The id of the sprite asset to render.”
What does this mean, and what are the best use cases for both properties?
Hi @Chanelle,
Although I am not 100% sure, given how the model component works spriteAsset
is just the id of the sprite asset referenced.
Whereas the sprite
property holds a reference to the actual pc.Asset resource property. Basically they both point to the same asset, the first is a number for the asset id, the second a reference to the pc.Asset resource property.