using System.Collections.Generic;
using UnityEditor.IMGUI.Controls;
namespace UnityEditor.AddressableAssets.GUI.Adapters
{
///
/// Adapter wrapper around Unity's (or in newer versions),
/// providing consistent constructors and utilities for Addressables GUI tree structures.
///
public class TreeViewItemAdapter :
#if UNITY_6000_2_OR_NEWER
TreeViewItem
#else
TreeViewItem
#endif
{
///
/// Initializes a new instance of with default values.
///
public TreeViewItemAdapter() : base()
{
}
///
/// Initializes a new instance of with the specified ID and depth.
///
/// The unique identifier of the item.
/// The depth of the item within the tree hierarchy.
public TreeViewItemAdapter(int id, int depth) : base(id, depth)
{
}
///
/// Initializes a new instance of with the specified ID, depth, and display name.
///
/// The unique identifier of the item.
/// The depth of the item within the tree hierarchy.
/// The text displayed for the item.
public TreeViewItemAdapter(int id, int depth, string displayName) : base(id, depth, displayName)
{
}
#if UNITY_6000_2_OR_NEWER
///
/// Creates and returns an empty list of generic items compatible with newer Unity versions.
///
/// An empty list of items.
internal static List> EmptyList()
{
return new List>();
}
#else
///
/// Creates and returns an empty list of non-generic items compatible with legacy Unity versions.
///
/// An empty list of items.
internal static List EmptyList()
{
return new List();
}
#endif
}
}