/// <summary>
 /// Adds an instance to a container. Keeps a reference to the instance
 /// so it can be reclaimed to the pool when removed.
 /// </summary>
 /// <param name="instance">Instance to add.</param>
 /// <param name="container">Container to parent instance to.</param>
 public void Add(StandardUIContentTemplate instance, RectTransform container)
 {
     if (container == null)
     {
         if (DialogueDebug.logWarnings)
         {
             Debug.LogWarning("Dialogue System: Container isn't assigned to hold instance of UI template.", instance);
         }
         return;
     }
     instance.gameObject.SetActive(true);
     instances.Add(instance);
     instance.transform.SetParent(container, false);
 }
 /// <summary>
 /// Removes an instance and returns it to the pool.
 /// </summary>
 /// <param name="instance"></param>
 public void Remove(StandardUIContentTemplate instance)
 {
     instances.Remove(instance);
     instance.Despawn();
 }
 public void AddInstanceToContainer(StandardUIContentTemplate instance)
 {
     instance.gameObject.SetActive(true);
     instances.Add(instance);
     instance.transform.SetParent(this.transform, false);
 }