Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

EndLayoutGroup: BeginLayoutGroup must be called first.

Discussion in 'Scripting' started by Alex132116, Mar 14, 2021.

  1. Alex132116

    Alex132116

    Joined:
    Mar 14, 2021
    Posts:
    2
    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
     
  2. Alex132116

    Alex132116

    Joined:
    Mar 14, 2021
    Posts:
    2
    P.S: all of this code is from a tutorial i found:
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,780
    exiguous likes this.
  4. Phil_GMT

    Phil_GMT

    Joined:
    Sep 6, 2022
    Posts:
    1
    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.