Sprite.FromTex

static Sprite FromTex(Tex image, SpriteType type, string atlasId)

   
Tex image The texture to build a sprite from. Must be a valid, 2D image!
SpriteType type Should this sprite be atlased, or an individual image? Adding this as an atlased image is better for performance, but will cause the atlas to be rebuilt! Images that take up too much space on the atlas, or might be loaded or unloaded during runtime may be better as Single rather than Atlased!
string atlasId The name of which atlas the sprite should belong to, this is only relevant if the SpriteType is Atlased.
RETURNS: Sprite A Sprite asset, or null if the image failed when adding to the sprite system!

Create a sprite from a Texture object!