Search Unity

Unknown Error

Discussion in 'Scripting' started by lucadrefke, Apr 20, 2018.

  1. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    Hello!
    I am getting the following Error while playing.
    Code (Text):
    1.  
    2. Assertion failed: Assertion failed on expression: '!dest.m_MultiFrameGUIState.m_NamedKeyControlList'
    3. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    4.  
    5.  
    I cannot make any sens of that.
    Thank you for help.[/Code]
     
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    660
    ......
     
  3. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    ???
     
  4. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    660
    Lol... you edited your post.

    Now it makes more sense. :)

    Usually a little sample of code throwing the error helps too.
     
  5. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    And?
     
  6. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    660

    So... thats a good thing... coherency. ...right?

    Your initial post was not at all what it is now. So you should have been able to establish reason to expression.

    If not, well thats all good too. GL
     
  7. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    Can you help me with my problem?
     
  8. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    660
    With just an error posted, and no sample code related to the error, and no information at all... im not to sure what you are encountering.

    Most people would need to see the piece of code that is throwing the error.

    But you might get lucky.
     
  9. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    The Thing is, that i do not know what causes the Error. So my first question is: What means this Error?
     
  10. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    660
    Generally, An assertion statement specifies a condition that you expect to be true at a point in your program. If that condition is not true, the assertion fails, execution of your program is interrupted, and the Assertion Failed dialog box appears.


    Thus why showing the code involved will help greatly
     
  11. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    This is all, what I added today:
    Code (C#):
    1.  
    2. [LEFT][FONT=Helvetica][COLOR=rgb(51, 51, 51)]using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6. public class Shop : MonoBehaviour {
    7.     public GameObject shopPanel;
    8.  
    9.  
    10.     /*
    11.     public void CloseShop() {
    12.         shopPanel.SetActive (false);
    13.     }
    14. */
    15.  
    16. }[/COLOR][/FONT][/LEFT]
    17.  
    Code (C#):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.SceneManagement;
    6. using UnityEngine.UI;
    7.  
    8. public class StartGame : MonoBehaviour
    9. {
    10.     public GameObject shopPanel;
    11.  
    12.     public void PlayGame ()
    13.     {
    14.         SceneManager.LoadScene (SceneManager.GetActiveScene ().buildIndex + 1);
    15.     }
    16.  
    17.     public void QuitGame ()
    18.     {
    19.         Application.Quit ();
    20.     }
    21.  
    22.     // Only this was added
    23.     public void OpenShop() {
    24.         shopPanel.SetActive (true);
    25.     }
    26.  
    27.  
    28. }
    29.  
     
  12. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    My understanding is that this is a harmless bug that shows up from time to time and has been corrected with the most recent beta releases of Unity.

    https://gamedev.stackexchange.com/q...keyboard-ctrlshiftp-assertion-f/156992#156992
    https://issuetracker.unity3d.com/is...-multiframeguistate-dot-m-namedkeycontrollist
    https://issuetracker.unity3d.com/is...ering-play-mode-paused-and-forwarding-a-frame
     
    Homicide likes this.
  13. lucadrefke

    lucadrefke

    Joined:
    Apr 15, 2018
    Posts:
    43
    Okay Thank you all for helping. It disappears after restarting Unity
     
    Syauqiaja likes this.
  14. Syauqiaja

    Syauqiaja

    Joined:
    May 10, 2020
    Posts:
    1
    Thanks bro, you're my hero