using UnityEngine;

public class UITimelineObjectEntry : MonoBehaviour
{
    public TMPro.TMP_Text NameLabel;
    public ObjectContainer Container;

    public static UITimelineObjectEntry Create(ObjectContainer container)
    {
        var entry = Instantiate(SharedResources.Instance.TimelineObjectEntry, TimelineController.Instance.ObjectsList.content);
        entry.NameLabel.text = container.name;
        entry.Container = container;
        return entry;
    }

    public void Select()
    {
        ModelViewerMain.GetInstance().SelectObject(Container);
    }
}