Forum rules - please read before posting.

Updating an Action List Asset's properties doesn't update the file

HI there,

If you select an Action List Asset and modifies its properties in the Inspector (either under "Asset properties" or "Parameters"), the changes are not registered as an update to the asset file on disk. In order to have those changes propagated to disk, you need to actually open up the action list in the editor and do a modification.

This can lead to some really confusing results when working on the same project on several computers or in a team environment.

Thanks!

Comments

  • This may be a Unity issue, as I cannot recreate it. Which version of Unity are you referring to?

  • I'm using Unity 2019.1.9f1 and AC 1.68.3.

    The easiest way to reproduce this is to use git (or any other versioning system), modify the props of an asset, try to save, and note that nothing has been updated.

    Another way is just to open a project, modify the props of an asset, try to save, restart Unity and note that the changes hasn't been persisted.

  • As I was - I get no such behaviour.

    As a test, open up ActionListAssetEditor.cs, and replace lines 205-208:

    if (GUI.changed)
    {
        EditorUtility.SetDirty (_target);
    }
    

    with:

    UnityVersionHandler.CustomSetDirty (_target);
    

    If that has no effect, replace it instead with:

    UnityVersionHandler.CustomSetDirty (_target, true);
    

    What is the effect of both changes?

  • edited July 2019

    Ah, debugging the method you referred to I found the reason:

    On line 102 you check for actionsManager.displayActionsInInspector, if false, the method returns so lines 205-208 is never executed.

  • Good spot - will address.

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.