Forum rules - please read before posting.

All action scripts in scene corrupted after importing third party package with compiling error.

After importing a custom package completely unrelated to AC, with a missing script (which caused a compiling error),
all action scripts from my scene got suddenly corrupted and lost all nodes.

All other as in separate scenes are fine.

Funnily enough, i haven't versioned my changes.

There must be a way to recover all the lost work.

Currently on version 1.67.5

Thanks

Comments

  • Update.
    I have actually forgot to mention that i have also added an Action List manually to an object in the scene, which was probably what wiped all the Action Lists in my scene, and not the compiling error.

    Apparently this happened to another user in 1.32, which was supposed to be fixed with the following release.

    https://adventurecreator.org/forum/discussion/234/bug-copying-action-list-to-another-cutscene-causes-problem

    Chris, have i lost all my work due to a known unresolved bug?

  • edited April 2020

    I'm afraid the result of the issue may be similar, but you're experiencing a separate problem to the one you linked to.

    It's not an issue I can recreate my end, but I believe that your issue is instead more to do with Unity itself. Scene-based ActionLists store Action data within the scene file, and I'm thinking that this is more of a case of them being an unfortunate victim of a wider issue in Unity.

    I suspect that this data loss should be limited to the scene that was open, only. Are you able to recover the scene as it was before importing the separate package?

  • It is limited to the scene that was open, but unfortunately i can't recover the lost work, as i was testing a feature in solo and did not versioned the changes.

    I have also noticed that all my AC menus disappeared, along with all game object references in the AS that survived.

    I feel kind of disappointed with AC to be honest, i have never lost so much work out of a single bug with any other software/plugin before.

    Unity is surely flawed, but i think is unfair to just pass the buck.

    What would be the best approach to adopt in the future, so to mitigate the issue?

    Thanks for your help.

  • edited April 2020

    Apologies - I'm not trying to pass the buck, just understand the root cause. And I do regret your loss of work, whatever the reason.

    Naturally if there's an issue with AC itself, I'd like to address it. However, it's not something I've been able to reproduce.

    Did you save the scene while the compile errors were showing?

    I have also noticed that all my AC menus disappeared, along with all game object references in the AS that survived.

    Can you elaborate on this? I don't know what you mean by "AS that survived", and in what way did your AC menus disappear? As in, literally removed from the Menu Manager? And what of "Unity UI" menus listed there? If you can provide screenshots to illustrate, that would help to understand things.

    If it was only your ActionLists being affected, I'd say it'd be safer to rely entirely on ActionList assets - but if other things are affected then that's a different story.

    Are you able to provide any more details on how exactly to reproduce such an issue?

  • Hello Chris,
    I was able to replicate the issue following these steps:

    • Create a blank project and import AC 1.69.5 (i was on 1.67.5 when it first happened);

    • Create a new AC Hierarchy "with folders", dock AC Game Editor panel around;

    • Create a new CutScene and add a bunch of dummies nodes;

    • Import a faulty package (in my case a script was missing a class reference);

    • Restart Unity, the "compiling assembly definition" popup appears briefly;

    • Once Unity opens, AC fails to boot up (does not appear anywhere, did not notice this when i had the issue the first time), also observe the compiling error in the console;

    • Don't close Unity nor delete the newly imported corrupted package, Import instead a fix for the previously broken package (imported the missing references);

    • Restart Unity.

    • Once Unity opens (without compiling errors), finally realise all your scene AL are empty;

    I guess there is no way i can have my AL back right?

  • edited April 2020

    Thanks for the details - I will see about reproducing this. But - and I should have asked this first - in what Unity version?

    Import a faulty package (in my case a script was missing a class reference);

    As in, one that results in the "Are you missing an assembly reference?" message?

    Once Unity opens, AC fails to boot up (does not appear anywhere, did not notice this when i had the issue the first time)

    This would be the expected behaviour - the project must be able to compile before Unity can display any custom Editors. The same would be true of any other asset that makes use of custom windows.

    I guess there is no way i can have my AL back right?

    Are you saving anything during these steps (whether it be the scene or the project)? If you saved the scene after the data loss, I'd expect the data is gone - but again, I'll recreate this and let you know my findings.

    If you had speech Actions in the scene that were gathered by the Speech Manager, it may be possible to extract them.

    What of the other issues you mentioned? Or is the data loss only limited to the scene ActionLists?

  • what Unity version?

    Unity 2018.4.0f1 (64-bit)

    As in, one that results in the "Are you missing an assembly reference?" message?

    Correct

    Are you saving anything during these steps

    I have only saved after i have solved the compiling errors, as everything seemed fine.

    What of the other issues you mentioned? Or is the data loss only limited to the scene ActionLists?

    Yes, only related to Action Lists in the scene.

    However i have also noticed a few Action Lists asset files have lost references with a bunch of objects in the scene. On those nodes, a button labelled "search in scenes" appeared.

  • I've recreated it - partially. Once the fault is repaired, ActionLists do appear to be reset. However, if I close without saving and re-open, all's restored.

    They also restore if I instead do save the scene, then close and re-open.

    Perhaps our "test errors" weren't alike. For reference, I made two Mono scripts (Break1 and Break2) and simply had Break1 make a variable reference to Break2 - then deleted Break2. How does that differ from yours?

    Regarding your own scene, if your Asset Serialization is set to Force Text, try opening it in a raw text editor. Do you see references to Actions (e.g. instances "description:" followed by Action descriptions for those other than the default ones that remain?

    However i have also noticed a few Action Lists asset files have lost references with a bunch of objects in the scene. On those nodes, a button labelled "search in scenes" appeared.

    I did notice that some object Constant IDs in the scene had their IDs reset, which would cause missing references in this manner. Such changes were reported in the Console, however.

  • Regarding your own scene, if your Asset Serialization is set to Force Text, try opening it in a raw text editor. Do you see references to Actions (e.g. instances "description:" followed by Action descriptions for those other than the default ones that remain?

    Yes it is set to Force Text, but most if not all descriptions are blank.

    I have attached the txt file below:

    https://drive.google.com/open?id=1xsY9Nn33v0Xxuf6bdcrqjTutymArpZ-c

  • edited April 2020

    There looks to be only 4 Actions here. I'm assuming there were a lot more before. I'd like to get to the bottom of it - but so far it isn't something I've been able to recreate.

    How does your "test error" compare with mine?

  • There looks to be only 4 Actions here.

    There were around 25.
    Most of them are versioned, but it's little tweaks i have made here and there that aren't.

    Perhaps our "test errors" weren't alike. For reference, I made two Mono scripts (Break1 and Break2) and simply had Break1 make a variable reference to Break2 - then deleted Break2. How does that differ from yours?

    That is exactly what i meant, i had one script referencing to another, which was missing at the moment i imported the custom package.

    I was able to replicate the issue 3/3 using the same broken package so no need to try creating the break scripts, as the result seems exactly the same.

    At this point i'll give up trying to see what went wrong, as there is no way to recover the lost work.

    Would be helpful if something could be done to prevent this from happening in the future.

    Sure, versioning is good practice, but i don't think an entire scene should break so easily just because of a compiling error.

    Thanks anyway for looking into this.

  • edited May 2020

    i don't think an entire scene should break so easily just because of a compiling error.

    Agreed, and I apologise for the trouble this has caused. This may be one for Unity's engineers, as AC is still reliant on Unity's serialization features for storing its data.

    I would still need to be able to recreate it on my end first, though I'm not sure what I've done differently following your steps to not have any luck so far.

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.