Vanishing DirectorActionClips

Slate Forums Support Vanishing DirectorActionClips

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1946
    lividthedream
    Participant

    Hi,

    I created a custom DirectorActionClip ( which is in its own category). When I place it in a sequence directly in the scene everything is fine. However, if I use it in a sequence which is on a prefab that is instanced in the scene then when I reload the scene it vanishes.

    To further explain, I have an instance of a prefab ( which has a sequence on a child object ) in the scene. If I add the action clip to this sequence it adds it and works while the scene is loaded. But if I reload the scene in the editor the clip vanishes ( but the track named with the category will still be there). When I do the same for a sequence that is not attached to a prefab and reload the scene the clip will be there as expected.

    This seems to be something that is happening on the load rather than the save. After adding the clip I have sometimes applied the changes to the prefab then saved and closed Unity. I can see the clip data referenced in the .asset file for that prefab ( at the very least I see data with the starttime and length that matches the clip I add). But when I load unity the clip data has vanished. If I save again then the clip data also vanishes from the .asset file. So in summary whenever a sequence is loaded in unity that is instanced from a prefab, whether the changes are on the prefab or on the instance the custom clip will always vanish.

    AsĀ  a further test I have tried adding other pre-existing director action clips and those do persist. I have also adding another track and adding my action clip to that and it didn’t persist, so it seems to be specific to my clip on prefabs or instances of prefabs.

    I am not seeing any errors or warning messages in the log.

    I tried debugging the code in the validate functions and it seems that when I reload unity and select the prefab it calls Validate all over, but when it looks at the track with the clip there are no children on that track.

    Update: Bug fixed – custom action clips must be placed in their own file like any monobehaviour class. For some reason they work fine if you don’t until you try to use them in a prefab. Lesson learned!

    #1951
    Gavalakis
    Keymaster

    Hello,

     

    Thanks for the update. Indeed, because Slate is using standard Unity objects (MonoBehaviours), you need to have each custom clip in it’s own filename. Also make sure that the name of the file and the class name are the same as usual.

     

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.