namespace UIWidgets
{
using System;
using UnityEngine;
///
/// Serialized TreeNode.
///
/// Type of node item.
[Serializable]
public class TreeNodeSerialized
{
///
/// The pause observation.
///
[SerializeField]
public bool PauseObservation;
///
/// Is node visible?
///
[SerializeField]
public bool IsVisible;
///
/// Is node expanded?
///
[SerializeField]
public bool IsExpanded;
///
/// The item.
///
[SerializeField]
public TItem Item;
///
/// The sub nodes count.
///
public int SubNodesCount;
///
/// The index of the first sub node.
///
public int FirstSubNodeIndex;
///
/// The depth.
///
public int Depth;
///
/// Initializes a new instance of the class.
///
/// Node.
/// Index of first subnode.
/// Node depth.
public TreeNodeSerialized(TreeNode node, int firstSubNodeIndex, int depth)
{
PauseObservation = node.PauseObservation;
IsVisible = node.IsVisible;
IsExpanded = node.IsExpanded;
Item = node.Item;
SubNodesCount = node.Nodes == null ? 0 : node.Nodes.Count;
FirstSubNodeIndex = firstSubNodeIndex;
Depth = depth;
}
}
}