Forum rules - please read before posting.

ActionList Editor performance drop

I'm on Unity 2020.2.6.f1 running the latest AC (1.73.2) and am experiencing unusually poor performance in the ActionList editor. I already had a pretty laggy experience there but when upgrading to 1.73.2 from 1.72.4 it got even laggier.

Is there anything I can do to increase performance there? It's becoming difficult to edit my action lists, which is seriously hampering my development.

Collapsing appears to help somewhat, but that's just a really weird solution since it makes working with the lists a lot more difficult, for obvious reasons...

Thoughts?

I could of course try and split up my ActionLists more, but I fear fragmenting them is also going to slow things down for me...

Comments

  • edited February 2021

    How many Actions are we talking about, or is it occuring for all lists regardless? Are you making use of any custom Actions?

    Best for me to see this for myself. Can you PM me an example asset or scene that exhibits this issue?

  • edited February 2021

    It's nothing special. I'm only using basic actions like moving characters, facing characters, setting variables, running dialogs... My actionlists can easily have 60 actions in them but the lag occurs much sooner than that. It's the amount of them on the screen at once that matters and not the total amount in the actionlist.

    Actually I just noticed something really weird.

    If I fill my actionlist editor screen with actions such as "wait", I've still got good fps. But if I fill the screen with "Object: Add or Remove" actions, and I choose an object to instantiate, then the framerate drops significantly. There's something about a "Object: Add or Remove" box that really really slows it down. (But only when an object to instantiate has been chosen).

    I have recently been adding a lot of these actions to my scripts so perhaps this is what has slowed it down and not the upgrade to the latest version.

  • edited March 2021

    How many on-screen are you dealing with, and is this a scene-based ActionList, or an asset file?

    Are you relying on the AddressableIsPresent define symbol to reference such objects by Addressable name, or are you assigning prefabs in the Action?

  • edited March 2021

    In ActionInstantiate.cs, look for the code block 414-420:

    else
    {
        gameObject = (GameObject) EditorGUILayout.ObjectField (_label, gameObject, typeof (GameObject), true);
    
        constantID = FieldToID (gameObject, constantID);
        gameObject = IDToField (gameObject, constantID, false);
    }
    

    As a test, paste the following immediately above it:

    else if (invAction == InvAction.Add)
    {
        gameObject = (GameObject) EditorGUILayout.ObjectField (_label, gameObject, typeof (GameObject), false);
        constantID = FieldToID (gameObject, constantID);
    }
    

    What affect does this have?

  • I'm assigning prefabs.

    I added the code but it didn't alter performance. The only visual difference was that I no longer saw the constant ID of the prefabs.

    It's pretty hard to pinpoint what is causing this lag. Every time I feel like I've figured out what it is, I prove myself wrong. Maybe it's not a specific action after all but just a general lagginess. I admit that my action lists are large and the larger the laggier, not just due to what's on the screen, like I wrongfully stated previously. It's clearly a mix.

    On the upside, this is forcing me to write smarter scripts with less redundancy. :smile:

  • @theo @ChrisIceBox did you folks ever figure out how to improve the performance of actionlists?

  • The issues aboves were related to a specific Action type. If you're experiencing an issue, please share details.

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.