Problem is solved without help from the community.
Cannot interact with new scene
Hello everyone,
I only recently started working with Unity. So I am a bit out of my league here (normally work with C# for Windows Forms, WPF, ect. Visual Studio only).
I have a script that loads a level/scene based on its index. Using SceneManager.LoadScene(index)
. Now for my problem, on the newly loaded scene I have placed some buttons. But I can't interact with them. The buttons aren't highlighted when I hover over them, and do not trigger an "OnClick" event when clicked.
I build the level using the build menu and the index checks out. So I may be missing something, but I can't find out what it is.
My code to load a level/scene.
public void LoadLevel(int levelIndex)
{
//Load the new scene
SceneManager.LoadScene(levelIndex);
}
If more information required, then please let me know.
Cheers!
Glucagon511
Do the buttons work independently, whether the scene was loaded or not? The error may be with the buttons, rather than the scene itself.
I don't quite understand that... I thought all elements have to be a scene and it has to be loaded and has to be the active scene?
Ok, so does the buttons themselves work? Is it a problem with the scene loading or the buttons themselves?
Hey, so how do you solved respond this button when another scene is loaded? Now i have exactly this problem in my project and think how to do, pls help :(