Forum rules - please read before posting.

InvalidOperationException immediately after running New Game Wizard

OS: Windows 10 Enterprise with Anniversary update.
Unity 5.40f3
AC 1.53b

Trying to follow the 2D Tutorial. This is my first time with AC....


Imported AC asset, it automatically created the Menu, NavMesh, and BackgroundImage. Also converted camera.

Then this error message appears:

InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Peek () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Stack.cs:321)
UnityEngine.GUILayoutUtility.EndLayoutGroup () (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:289)
UnityEngine.GUILayout.EndHorizontal () (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:291)
AC.NewGameWizardWindow.OnGUI () (at Assets/AdventureCreator/Scripts/Managers/Editor/NewGameWizardWindow.cs:124)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Screenshot:

The Unity Scene has not really changed; is this normal behavior?


Comments

  • edited August 2016
    Weird... is AC the only asset you have in your project? Although, it does sound like it may involve GUI, so maybe you should try going to the window menu and setting your layout to default (or better yet set it to revert to factory defaults). Problems with custom windows and tabs are really common in Unity. Specially if you have some tabs/windows open in one project and then switch to another project where the aforementioned don't exist... (that's because Unity tries to remember the tabs/windows you have open to then get them up always, no matter the project you are using...)
  • Thanks for posting.  Odd issue - it does sound like a Unity one, though.  This is happening when you try to open up the New Game Wizard window?  Were you able to open it and use it to create your game's Managers, or did this error appear in place of it?
  • This happens after I go through the New Game Wizard and it is attempting to create the game framework. Basically, it is on the last window of the New Game Wizard when the message comes up. Also, the "Finish" button on the last screen is greyed out. I have to click on the X in the uppper right corner to close the New Game Wizard.

  • After I did a revert to factory defaults under layout, the errors are gone. In one of the updates, could the "Finish" button on page 7 of 7 of the New Game Wizard be enabled to actually close out the New Game Wizard instead of being greyed out?
  • Yes, that's a fair suggestion.  Glad it's working for you now.
  • One final thing - the 2D tutorial shows the main camera automatically placed perpendicular to the background, however, in this current version of AC when the New Game Wizard is completed, the camera is not moved. Is this by design? Will there be an update to the 2D Tutuorial to reflect this, or is this something that needs to be fixed?
  • By design.  If there is already a MainCamera in your scene when AC "converts" the scene into one AC can run in, it will amend the MainCamera with the components it needs - as opposed to replacing it completely.

    This is to prevent the loss of any work to it you may have made to it - though by default it should already be facing the correct plane (i.e. looking down the +Z direction).

    Once the game is running, the default rotation of the MainCamera is actually unimportant since it'll be set to whichever GameCamera is currently active.  I can add an annotation if it will help, but I'd like to know what happened exactly in your case - did you rotate it before the conversion, or was the orientation incorrect to begin with?
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.