ZiYuanFileList.cs 648 B

1234567891011121314151617181920212223242526
  1. using ShadowStudio.Model;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. public class ZiYuanFileList : MonoBehaviour
  6. {
  7. public GameObject ZiYuanFileView;
  8. public void AddFileItem(ArtInfo artInfo)
  9. {
  10. GameObject obj = Instantiate(ZiYuanFileView, transform) as GameObject;
  11. obj.transform.GetComponent<ZiYuanFileView>().Init(artInfo);
  12. }
  13. public void DestoryAll()
  14. {
  15. if (transform.childCount > 0)
  16. {
  17. for (int i = 0; i < transform.childCount; i++)
  18. {
  19. Destroy(transform.GetChild(i).gameObject);
  20. }
  21. }
  22. }
  23. }