Forum rules - please read before posting.

Action List error

This isn't the first time this happened, first time was for unknown reasons but every time I try to make items combinable the action I create is empty and just doesn't work. I followed the tutorial exactly as described in these forums and still doesn't work, probably because of this error. Thanks!
image

Comments

  • edited March 2017
    Welcome to the community, @knownasA.

    I apologise for the error - it appears to be a duplicate of this bug and I would like to fix it ASAP.
    1. What version of Unity are you using?
    2. Did you begin fresh with the same version, or upgrade mid-project from a different version?
    3. When was the first time this occured?
    Fixing it for your own project should be a simple case should be a simple case of going into your Actions Manager and re-assigning a new default Action.  However, it's important to fix it in the code so that this doesn't occur again - for you, or anyone.

    If you can, please test the following script amendment.  In ActionsManager.cs, you should find the Upgrade() method beginning line 93:

    private void Upgrade ()
    {
        if (defaultClass > 0 && EnabledActions.Count > 0 && EnabledActions.Count > defaultClass)
        {
            defaultClassName = EnabledActions[defaultClass].fileName;
            defaultClass = -1;
        }
    }


    Please replace it with the following:

    private void Upgrade ()
    {
        if (defaultClass >= 0 && EnabledActions.Count > 0 && EnabledActions.Count > defaultClass)
        {
            defaultClassName = EnabledActions[defaultClass].fileName;
            defaultClass = -1;
        }

        if (string.IsNullOrEmpty (defaultClassName))
        {
            defaultClassName = EnabledActions[0].fileName;
            defaultClass = -1;
        }
    }


    Does that cause things to work?
  • Hey Chris,

    Replying to you on this thread you referred me to.

    Here are the answers to your questions:
    1. What version of Unity are you using? 5.5.0f3 Personal
    2. Did you begin fresh with the same version, or upgrade mid-project from a different version? Upgrade mid-project from AC1.55c
    3. When was the first time this occured? Right after upgrading from 1.55c is the first time I saw this error

    The code fix you posted does indeed fix the problem. No more errors and I can add actions through the Actionlist editor no problem. Thanks!

  • Hi @ChrisIceBox, thank you for your support. It worked like a charm. Glad to be part of this community and to be using such a great tool! You can expect me to be posting here a lot, since I am a big newbie in this development adventure.
  • Good to hear, I'll push an official fix out soon.

    @jasong: Was your default Action prior to upgrading ActionList: Check parameter?  That's the only condition that I can find that would cause the issue.
  • Yes, Chris. That was the default action.
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.