PointCloudCoroutine.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. /****************************************************************************
  2. * Copyright 2019 Nreal Techonology Limited. All rights reserved.
  3. *
  4. * This file is part of NRSDK.
  5. *
  6. * https://www.nreal.ai/
  7. *
  8. *****************************************************************************/
  9. namespace NRKernal.Experimental.Persistence
  10. {
  11. using UnityEngine;
  12. internal class PointCloudCoroutine : MonoBehaviour
  13. {
  14. private static PointCloudCoroutine _instance;
  15. public static PointCloudCoroutine Instance
  16. {
  17. get
  18. {
  19. if (!_instance)
  20. {
  21. GameObject pointCloudObj = new GameObject("PointCloudCoroutine");
  22. _instance = pointCloudObj.AddComponent<PointCloudCoroutine>();
  23. DontDestroyOnLoad(pointCloudObj);
  24. }
  25. return _instance;
  26. }
  27. }
  28. }
  29. }