So,basically I started to create my first game in unity 2022.3.36f1 and I started a new project. The only thing I wanted to start with was just using a “New game” button to switch from scene Menu to the scene MainGame. I created a simple menu, and when I press “New game”, the scene changes, ok. Then I do the same in MainGame by pressing “Back”, everything is ok again. But when I change to MainGame the second time, the button “Back” just can’t be clicked, it can be moved etc, but not clicked (So it is active, and the tick interactable is turned on). I have only one little script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class BackToMenu : MonoBehaviour
{
public void LoadScene(string name)
{
SceneManager.LoadScene(name);
}
}
This script is used on two empty objects in different scenes: “SceneManager1” and “SceneManager2” to use the function. Moreover, I saw that when the scene “MainGame” is loaded, this button become again unclickable.
I’ve tried reloading all the scenes, reloading the project, but nothing helps