Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question problem with switch scense

Discussion in 'Getting Started' started by alex56frag, Apr 18, 2024.

  1. alex56frag

    alex56frag

    Joined:
    Nov 26, 2023
    Posts:
    9
    Tell me what to do if I use a script to switch between scenes, then when I switch from 1 to 2, then 2 nothing works, no buttons and functions

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine. SceneManagement;
    5.  
    6. public class Switch: MonoBehaviour
    7. {
    8.  
    9.     public void scenLoad(int numbScen)
    10.     {
    11.         SceneManager.LoadScene(numbScen);
    12.     }
    13. }
    this is script
     
  2. CassClay

    CassClay

    Joined:
    Mar 21, 2020
    Posts:
    72