Advertisement
kadyr

Untitled

Jul 31st, 2021
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.SceneManagement;
  3.  
  4. public class Menu : MonoBehaviour
  5. {
  6. private void Start()
  7. {
  8. PlayerPrefs.SetFloat("first",1f);
  9. Debug.Log(PlayerPrefs.GetFloat("first"));
  10. }
  11.  
  12. public void StartGame()
  13. {
  14. SceneManager.LoadScene(1); //указываем номер сцены для загрузки
  15. }
  16.  
  17. public void Back()
  18. {
  19. SceneManager.LoadScene(0);
  20. }
  21.  
  22. public void Credits()
  23. {
  24. SceneManager.LoadScene(2);
  25. }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement