Exemplo n.º 1
0
 public void Remove(TempListElementUI instance)
 {
     if (m_actualUsedComponents.Remove(instance))
     {
         instance.Hide();
     }
     else
     {
         Debug.LogError($"listview_{this.gameObject.name} does not contains {instance.ElementRectTransform.name}, remove failed");
     }
 }
Exemplo n.º 2
0
 protected virtual void InternalRemove(TempListElementUI element)
 {
     if (element == null)
     {
         return;
     }
     element.Hide();
     if (Application.isEditor && !Application.isPlaying)
     {
         GameObject.DestroyImmediate(element.ElementRectTransform.gameObject);
     }
     else
     {
         GameObject.Destroy(element.ElementRectTransform.gameObject);
     }
 }