Forum rules - please read before posting.

GUI Error everytime I close the Gather Text confirmation popup

edited October 2024 in Technical Q&A

Using Unity 6 + AC 1.81.7

Every time I close the confirmation popup after the speech text has been gathered, I get a (red) error message in the Editor console:

GUI Error: Invalid GUILayout state in view. Verify that all layout Begin/End calls match
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I don't know if this is a Unity 6 related issue and if you can do anything about this, but maybe it helps to know about this?

Comments

  • Maybe this helps? https://discussions.unity.com/t/avoiding-you-getting-insane-because-of-invalid-guilayout-state-errors/916205

    not sure which script would need to be touched in this case though.

  • Thanks, I'll look into it.

    Is the gather text process affected in any way? It may be that the issue doesn't go beyond the Console error.

  • edited October 2024

    No, it doesn't seem to be affected by that. It's just that I like to have my projects as error free as possible to not overlook "real"/problematic errors that would be visible in the build.

    And of course it is a better user experience for any user of the AC toolkit when there are no errors that create a feeling of instability. So I hope such reports help, even though this may not be a high priority problem. :)

  • edited November 1

    Hi! Just wanted to say I have the same error:

    GUI Error: Invalid GUILayout state in ActionListEditorWindow view. Verify that all layout Begin/End calls match
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    

    Unity 2021.3.45f2
    AC 1.84.3

    I don't know if this is related or not, but this morning several of my variables were missing. They had disappeared (of course I had saved them yesterday, so there is no reason for them to be missing), which caused quite a mess in my action scripts that use these variables.
    I don't have any other error in the console. It just happened suddenly and I don't know why. Never happened in the past when using AC.

    Except for that, the above error doesn't seem to cause any issue.

  • The error message doesn't sound related to Variables, but the latter is the more pressing.

    What kind of Variables disappeared? Were they Local or Global, and were they all created yesterday or were any removed that were created from an earlier time?

  • Hi Chris,

    The variables that disappeared were global variables.

    I didn't do anything special in my project compared to when I used AC in the past. I simply created new global variables and used them with actions such as Variable/Check or Variable/Set. Nothing fancy.

    I created the variables 2 days ago and they had disappeared yesterday in the morning when I resumed work after the night.
    I lost between 5 and 10 variables (? I don't remember exactly).
    Any older variable created the days before were still here in my project.

    I know that I saved my work in Unity for sure, because all of my other changes were still here in the scene (including new actions lists, new assets, etc)

    I only noticed the missing variables when I opened my action lists yesterday to modify dialogues/cutscenes, and some of the actions that use variables had changed to the very first variable in the list (created several days before). So I had to create new variables and assign them again.
    It wasn't very difficult to fix in the current case happily, so I didn't want to bother you with this, particularly because I don't know what went wrong. It was just a bit time consuming to go through all the actions again and make sure that a variable is assigned properly.

    Anyway, I don't have any error message other than the one stated above (Invalid GUILayout...).

    I would like to help more and provide more details on what I did, but I don't see what was different, except that in the past (before this current project) I was using Unity 2020 with older versions of AC, and this issue never happened to me.

    You should know that I have an old computer (10 years old), and it's quite slow now with the latest Unity versions, so that might be the reason... That being said, the pc is stable and up to date, clean, and Windows is working perfectly (new install during Summer). It's still Windows 10 by the way (with such an old pc I can't transition to 11 yet).

    Something that could help maybe: I have noticed that Unity Hub asks me everytime permission to make changes on the computer (when I launch it and when I quit). I always make sure to run Unity and Unity Hub as an admin (I checked the option in the properties).

    Also yesterday I recreated the missing variables (and new ones), reassigned them to the actions, continued to work on my project, saved and turned off the pc. And this morning all the variables are still here.

    If I notice an issue again I will let you know.

    Sorry to bother you with this. I hope you can see why it happened, that it's not related to AC and that it's all my fault. Let me know if I can help.

  • Yes, keep an eye on it and let me know if it occurs again. I'd strongly recommend using version control if you're not already, though, regardless of this issue.

  • Unfortunately it happened again: yesterday I had 29 variables and this morning only 27.

    I'm confused and don't know what I did, or what I could say to help.

    I have been working during the past few days without issue. Created plenty of new variables and they were saved. Why did 2 variables disappear yesterday? No idea.

    The last thing I did yesterday was save, play my project (preview), check the number of variables, save again and quit Unity.

    I'm not using version control, it's a game jam and I'm trying to do as simple as possible. However I've been doing a lot of game jams with AC and that never happened in the past. Maybe my pc is too old now for the current versions of Unity and AC. I really felt a difference when I updated, everything is slower and lags more easily in the editor (not when I play).

    Here's a screenshot, even if I don't see how it could help you:

    It shows my most recent action list with 2 actions where I had put the 2 missing variables. Because the variables are missing, it replaced them automatically with the very first variable in my list (0: SwitchPlayer)

    • First action (in the middle) : I had put here a boolean variable to check if we had already seen the previous discussion.
    • Second action (on the right) : I had put here a integer variable that counts a number of stars that can be collected in the environment.

    That is all I can think of so far.
    Oh, to make it more confusing, I had created other variables yesterday during the same session of work (without quitting Unity) and these 2 ones were saved and are still in the list (boolean).

    Long things short:

    • I created 4 new variables yesterday (3 bools and 1 integer) (variables 25 to 28) for a total of 29 variables currently in the game (probably more when it is finished)
    • 2 variables were saved (25, 26) and 2 have disappeared (27, 28)

    Additional notes:

    Since I just launched the project this morning, the red error Invalid GUILayout didn't display yet. I don't see any other error listed in Unity.

    I still have a message when I start Unity Hub and sometimes when I quit, asking me to accept that Unity Hub will make changes on my computer. I guess it's a Windows prompt related to admin/rights. I always accept. In the past I didn't have that kind of message, so I prefer to notice it. I don't know if that has anything to do with the current issue, but I'll try to take a screenshot next time I see it, just in case.

    • When did this issue begin? After updating AC, or updating Unity?
    • Are you always creating variables in the same way, i.e. the "Create new" button as opposed to "Insert after"?
    • Is any other Manager data affected, e.g. Inventory items, Menus?

    Try locating the Variables Manager asset file itself, which you can ping by clicking its field at the top of the Variables tab of the AC Game window. Right-click, choose Properties, and keep it docked somewhere on the screen while working - the Variables you create will be listed in its Inspector. This sounds like a system / Unity issue, but it may be that this helps it "remember" such changes.

    • The issue happened only in this new project. It was a clean new project started from scratch, with AC downloaded and imported as usual through the Package Manager. I started the project mid October and worked slowly on it (not everyday), in the usual way I work. I only realized the issue with missing variables when I first wrote about it in the post above. It was a time where I started to be much more involved in the project and started to work all day long, in order to finish in time before the deadline of the Jam (mid November). That being said, it is the first time that I work with Unity 2021.3.45f2 and AC 1.84.3. I used to work before with Unity 2020 or earlier, and older versions of AC. Overall might just be a bug with the current Unity version that I am using, I don't know. I prefer to not update to an even newer version because of my computer being too old.
    • I always click on the button Create new Global variable.
    • The other managers don't seem to be affected. I have created 10 inventory items and they are still here. I also have a crafting recipe, no issue with it. The Settings, Speech, Cursor and Menu options seem to all be saved normally and have not reverted to previous values or nothing is missing.

    I will do as you said. I have undocked the Variables window and it is visible in a corner of the screen. That may help me realize immediately if a variable is removed, and what I did before it happened.

    Honestly Chris, I don't want to bother you with this issue. I'm pretty sure that it is not AC-related, but more due to Unity, Windows permissions, my pc being too old, or me. I know that you put a lot efforts fixing all issues in AC since many years and are always here to help everyone, so I doubt that there is an issue with the Variables if I am the only one who sends feedback about it. I do appreciate your support however, so thanks a lot. I'll keep you updated if anything new happens.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.