EndLayoutGroup: BeginLayoutGroup must be called first.

I’m pretty new to coding in C# and developing games in Unity, and i don’t know what this thing is/means. I only tried making a game over screen and this popped up and idk what to do, I’ll send the code down below

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class GameOverScreen : MonoBehaviour
{

public void RestartButton()
{
SceneManager.LoadScene(“Game”);
}

}

Any help is appreciated

P.S: all of this code is from a tutorial i found:

We don’t either.

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand compiler and other errors and even fix them yourself:

https://discussions.unity.com/t/824586/8

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: https://discussions.unity.com/t/481379

1 Like

I had the same problem, Red Exclamation mark Stop Sign in front :
EndLayoutGroup: BeginLayoutGroup must be called first.

When I restatred my Windows PC, the problem was gone, when I next opened Unity.
So that is my Solution.