Forum rules - please read before posting.

Losing actions options in ActionListEditor

Hi,
I have a big issue with some actions options  in the ActionsListEditor. I upgrade from 1.51b to 1.56e and I thought was all ok (on unity 5.3.1f). So implemented my game (2d graphic) but when I have to work with variables (local variables) I have many problems (I have no options for Variable/Check and set (on local variables)). So I thought it was a variables problem (I wrote on this post: http://www.adventurecreator.org/forum/discussion/6191/losing-missing-variables#latest).

But I made other tests and I think the problem is on ActionListEditor, where some Actions have all options visibly correct, but other are not correct.

Here a screenshot where I show what are the only options available: http://imgur.com/a/pEz3N

I don't know what are the missing options. Is there a way to restore all the options in the actionlistEditor?

It's very important for me, above all to use local variables.

Thank you very much

Comments

  • Ummm... Are you getting any errors in the console? Any red warnings? First we should make sure there isn't a compile error which may be preventing the editor from properly loading.
  • edited May 2017
    Hi Alverik,
    and thank you very much for the help.

    I have some console errors, but on custom scripts, so I don't think it's the reason of the problem.
    Here the console errors: http://imgur.com/a/Bi6td

    I made other tests, and I found a way to bypass the problem, though I don't know why there's this issue.

    I try to create a new Check local variable inside the ActionListEditor and this is the result (important: I have no inspector opened): http://imgur.com/auUkOr1

    But, when I open the inspector, magically the action becomes correct: http://imgur.com/a/TGjda

    And also for other actions where I had the same problems, when I open the inspector, the ActionListEditor updates correctly.

    I don't know if it's a my local problem or a little bug.

    Thank you again for the help.
  • Those errors could have something to do with it. You have scripts in your custom actions folder which are not AC actions and AC and Unity are complaining about it. All scripts inside your custom actions folder (assigned in the actions manager) must be derived from AC's Action class(should inherit that class), take out any scripts which are not custom actions. Once you've done that we can verify if those errors had anything to do with the problem. Those scripts might just be confusing the actionlist editor. But even if it's not related, you really shouldn't have those errors there. 
  • As with your other issue, AC is having trouble accessing your GameEngine which contains information those Actions need.

    If your GameEngine is present, it may well be to do with the Console errors at it could be that AC is not able to fully compile while they exist.
  • Thank you @Alverik and @ChrisIceBox.
    I corrected the red error console linked to my custom script, but I have still problems with the ActionListEditor. 
    I went on my scenes to change some character's actions or dialogue, but, on some interections, the console gives me this errors:

    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[AC.ActionType].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    AC.ActionListEditor.DrawSharedElements (AC.ActionList _target) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditor.cs:159)
    AC.InteractionEditor.OnInspectorGUI () (at Assets/AdventureCreator/Scripts/Logic/Editor/InteractionEditor.cs:17)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)
    UnityEditor.DockArea:OnGUI()

    Unexpected top level layout group! Missing GUILayout.EndScrollView/EndVertical/EndHorizontal?
    UnityEditor.DockArea:OnGUI()

    and this is the result on ActionListEditor: http://imgur.com/a/PQX95

    The other problem is I can't bypass it with the inspector: I can't modify the interactions in inspector because if I try and then save the scene, the changes are not saved.

    thank you 
  • I wanted to specify: these errors are not for all the interactions, but only for some.
  • edited May 2017
    Ummm... I recognize the last mentioned type of error (Unexpected top level layout group!), it usually means you are missing the ending method for some Layout styles which Unity's editor uses to organize stuff in a custom inspector. You should probably try reinstalling AC just in case, and also double check any custom actions you may have. The final part of the error suggest you are missing a GUILayout.EndScrollView() or EndVertical() or EndHorizontal() in some Action or custom editor script. 

    But, I'm not entirely sure that's the issue, because one of the first lines in the error indicates AC is having an issue when trying to get the list of actions in the actionlist to be called. It could also be that the actionlist itself has gotten corrupted somehow (or it could just be caused by the other mentioned error I guess). 

    Again, I'd try reinstalling AC and checking any custom actions first. You could also try letting Unity rebuild your library (by going into your project's folder and then deleting the Library folder, though, mind you, if you have a large project that may take a while). If all fails, you may want to simply rebuild any affected actionlists.
  • Seems like there's an issue with a particular type of Action.  Is your Actions Manager functioning correctly, and are you relying on any custom Actions (or were, but since removed)?  The most common cause of this issue would be that the ActionList refers to an Action that's no longer recognised.
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.