TestLoader.cs 673 B

123456789101112131415161718192021222324252627282930313233343536
  1. 
  2. using QFramework;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. public class TestLoader : MonoBehaviour
  7. {
  8. // Start is called before the first frame update
  9. void Start()
  10. {
  11. var loader = ResLoader.Allocate();
  12. for (int i = 0; i < 20; i++)
  13. {
  14. var model = loader.LoadSync<GameObject>("Resources/Model/SpaceStation " + i);
  15. GameObject objModel = model.Instantiate();
  16. }
  17. }
  18. // Update is called once per frame
  19. void Update()
  20. {
  21. }
  22. }
  23. public class LoaderData
  24. {
  25. public string path;
  26. public string dateTime;
  27. public Object obj;
  28. }