MainManager.cs 749 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.SceneManagement;
  5. public class MainManager : MonoBehaviour
  6. {
  7. public GameObject raw;
  8. public void LoadScene(string msg)
  9. {
  10. GetTexture2D.urlbase = msg;
  11. if (msg.Contains("169"))
  12. {
  13. if(!msg.Contains("green"))
  14. SceneManager.LoadSceneAsync(1);
  15. else
  16. {
  17. SceneManager.LoadSceneAsync(3);
  18. }
  19. }
  20. else
  21. {
  22. if (!msg.Contains("green"))
  23. SceneManager.LoadSceneAsync(2);
  24. else
  25. {
  26. SceneManager.LoadSceneAsync(4);
  27. }
  28. }
  29. raw.SetActive(true);
  30. }
  31. }