Search Results for

    Show / Hide Table of Contents

    Class SpriteAtlas

    Sprite atlas asset that contains collection of sprites combined into a single texture.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    TextureBase
    SpriteAtlas
    Inherited Members
    TextureBase.MaxTextureSize
    TextureBase.MaxMipLevels
    TextureBase.MaxArraySize
    TextureBase.GetMipData(Int32, Int32, Int32)
    TextureBase.GetPixels(Color32[], Int32, Int32)
    TextureBase.GetPixels(Color[], Int32, Int32)
    TextureBase.SetPixels(Color32[], Int32, Int32, Boolean)
    TextureBase.SetPixels(Color[], Int32, Int32, Boolean)
    TextureBase.Init(TextureBase.InitData)
    TextureBase.Texture
    TextureBase.Format
    TextureBase.Width
    TextureBase.Height
    TextureBase.Size
    TextureBase.ArraySize
    TextureBase.MipLevels
    TextureBase.ResidentMipLevels
    TextureBase.CurrentMemoryUsage
    TextureBase.TotalMemoryUsage
    TextureBase.TextureGroup
    TextureBase.HasStreamingError
    BinaryAsset.Reimport()
    BinaryAsset.ImportPath
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public class SpriteAtlas : TextureBase

    Constructors

    SpriteAtlas()

    Initializes a new instance of the SpriteAtlas.

    Declaration
    public SpriteAtlas()

    Properties

    Sprites

    List with all tiles in the sprite atlas.

    Declaration
    [Unmanaged]
    public Sprite[] Sprites { get; set; }
    Property Value
    Sprite[]

    SpritesCount

    Gets the sprites count.

    Declaration
    [Unmanaged]
    public int SpritesCount { get; }
    Property Value
    System.Int32

    Methods

    AddSprite(Sprite)

    Adds the sprite.

    Declaration
    [Unmanaged]
    public SpriteHandle AddSprite(Sprite sprite)
    Parameters
    Sprite sprite

    The sprite.

    Returns
    SpriteHandle

    The sprite handle.

    FindSprite(String)

    Finds the sprite by the name.

    Declaration
    [Unmanaged]
    public SpriteHandle FindSprite(string name)
    Parameters
    System.String name

    The name.

    Returns
    SpriteHandle

    The sprite handle.

    GetSprite(Int32)

    Gets the sprite data.

    Declaration
    [Unmanaged]
    public Sprite GetSprite(int index)
    Parameters
    System.Int32 index

    The index.

    Returns
    Sprite

    The sprite data.

    GetSpriteArea(Int32, out Rectangle)

    Gets the sprite area.

    Declaration
    [Unmanaged]
    public void GetSpriteArea(int index, out Rectangle result)
    Parameters
    System.Int32 index

    The index.

    Rectangle result

    The output sprite area.

    RemoveSprite(Int32)

    Removes the sprite.

    Declaration
    [Unmanaged]
    public void RemoveSprite(int index)
    Parameters
    System.Int32 index

    The sprite index.

    SaveSprites()

    Save the sprites (texture content won't be modified).

    Declaration
    [Unmanaged]
    public bool SaveSprites()
    Returns
    System.Boolean

    True if cannot save, otherwise false.

    SetSprite(Int32, ref Sprite)

    Sets the sprite data.

    Declaration
    [Unmanaged]
    public void SetSprite(int index, ref Sprite value)
    Parameters
    System.Int32 index

    The index.

    Sprite value

    The sprite data.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)

    See Also

    TextureBase
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat