Forum rules - please read before posting.

Action Lists in one scene have gone completely blank

edited November 2022 in Technical Q&A

Unity 2020.3.11f1
AC v1.76.0

I've had this issue a couple of times before - AC reacts weirdly if opening a project with an error in an unrelated script (the moment where Unity gives you the safe mode warning) Usually, fixing these console errors/restarting Unity/ reimporting AC fixes these, but no luck this time.

For the sake of completeness, these are the console errors currently. Note that these errors have existed from many months and are not related to the issue at all. The ones that were have been fixed.

image

Here's how action lists (including Triggers/Interactions) look. There are no default actions either.

image

Adding a new action takes its number straight to 61 in this case. The original AL probably contained 60 actions, and this adds a new one as 61.

image

Adding that new action threw up these errors

image

Trying to restore action data through the option in the inspector shows these errors

image

The issue is only in one scene, the others seem to be unaffected.

Comments

  • edited November 2022

    Firstly: my apologies for the trouble. Are you relying on version control, so that the scene file can be reverted?

    To understand the steps: did you resolve the compilation errors while in Safe Mode? It should be that if you stick to Safe Mode, and don't save the scene, reloading the scene should bring things back.

    The error itself is related to the way Unity serializes Actions. In an attempt to overcome this, AC backs up ActionLists every 10 minutes. You're right to restore these in the way you're trying, but we'll need to do some digging to see if we can fix the warning that appears.

    Open up AC's JsonAction script and look for the CreateAction function. Just below:

    JsonUtility.FromJsonOverwrite (jsonData, newAction);
    

    Insert:

    if (newAction == null) Debug.Log ("Failed to generate " + className + " Action, data: " + jsonData);
    

    What new logs then appear when attempting to restore Actions?

    Be sure to not save the scene for the moment - it may overwrite the backup data.

  • edited November 2022

    No version control unfortunately. I have a month old backup though so with some re-work I can make that work if a fix doesnt work out.

    No - I didnt resolve the errors in Safe Mode (I resolved them in normal mode) I also did save the scene.

    Oddly, no new logs appear after adding the line to the script. Its the same errors as before (error when pasting Action)

    Heres a video for more context

    Notice that opening an Action List in the AL Editor makes it show up as blank (the AL named "all puzzles solved") but as soon as I click on the AL to make it show up in the Inspector, the AL is immediately filled up with the default Engine:Wait action. Also shows how the errors show up while trying to restore backups.

  • It may be lost given the circumstances, but if you can PM me the scene file, I will see if I can recover the data.

  • Alright, just the scene file then?

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.