using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace UnityEditor.U2D.Animation
{
///
/// Structure that defines a Sprite Library Category Label
///
[Serializable]
public struct SpriteCategoryLabel
{
[SerializeField]
string m_Name;
[SerializeField]
string m_SpriteId;
///
/// Get and set the name for the Sprite label
///
public string name
{
get { return m_Name; }
set { m_Name = value; }
}
///
/// Get and set the Sprite Id.
///
public string spriteId
{
get { return m_SpriteId; }
set { m_SpriteId = value; }
}
}
///
/// Structure that defines a Sprite Library Category.
///
[Serializable]
public struct SpriteCategory
{
[SerializeField]
[FormerlySerializedAs("name")]
string m_Name;
[SerializeField]
List m_Labels;
///
/// Get and set the name for the Sprite Category
///
public string name
{
get { return m_Name; }
set { m_Name = value; }
}
///
/// Get and set the Sprites registered to this category.
///
public List labels
{
get { return m_Labels; }
set { m_Labels = value; }
}
}
///
/// A structure to hold a collection of SpriteCategory
///
[Serializable]
public struct SpriteCategoryList
{
[SerializeField]
[FormerlySerializedAs("categories")]
List m_Categories;
///
/// Get or set the a list of SpriteCategory
///
public List categories
{
get { return m_Categories; }
set { m_Categories = value; }
}
}
/// An interface that allows Sprite Editor Modules to edit Sprite Library data for user custom importer.
/// Implement this interface for [[ScriptedImporter]] to leverage on Sprite Editor Modules to edit Sprite Library data.
[Obsolete("The interface is no longer used")]
public interface ISpriteLibDataProvider
{
///
/// Returns the SpriteCategoryList structure that represents the Sprite Library data.
///
/// SpriteCategoryList data
SpriteCategoryList GetSpriteCategoryList();
///
/// Sets the SpriteCategoryList structure that represents the Sprite Library data to the data provider
///
/// Data to set
void SetSpriteCategoryList(SpriteCategoryList spriteCategoryList);
}
}