Ejemplo n.º 1
0
    /// <summary>
    /// Destroys the atlas and the resources that it uses.
    /// </summary>
    public void Destroy()
    {
        if (atlas != null)
        {
            numberOfUnused = 0;

            atlas.ClearAllSpriteData();

            if (AtlasTexture != null)
            {
                Object.Destroy(AtlasTexture);
                AtlasTexture = null;
            }
        }
    }