Search Unity

Error EndLayoutGroup

Discussion in 'Immediate Mode GUI (IMGUI)' started by megsmich, Oct 2, 2020.

  1. megsmich

    megsmich

    Joined:
    Oct 2, 2020
    Posts:
    2
    Hello Im new

    I have an error


    EndLayoutGroup: BeginLayoutGroup must be called first.
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)


    I have no idea how to fix it

    This is my code

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class LogicaPlayer1 : MonoBehaviour
    6. {
    7.     public float velocidadMovimiento = 5.0f;
    8.     public float velocidadRotacion = 250.0f;
    9.     private Animator anim;
    10.     public float x, y;
    11.  
    12.     // Start is called before the first frame update
    13.     void Start()
    14.     {
    15.         anim = GetComponent<Animator>();
    16.     }
    17.  
    18.     // Update is called once per frame
    19.     void Update()
    20.     {
    21.         x = Input.GetAxis("Horizontal");
    22.         y = Input.GetAxis("Vertical");
    23.  
    24.         transform.Rotate(0, x * Time.deltaTime * velocidadRotacion, 0);
    25.         transform.Translate(0, 0, y * Time.deltaTime * velocidadMovimiento);
    26.      
    27.     }
    28. }
     
  2. megsmich

    megsmich

    Joined:
    Oct 2, 2020
    Posts:
    2
    I hope someone helps
     
  3. enistoja

    enistoja

    Joined:
    Jan 26, 2013
    Posts:
    3
    I am having the same issue, and it has nothing to do with your code, your code does not touch the place where the error is happening, as far as I can tell.