Discard modify serialised values of an object?

I have a system for moving units along a path in exact formations using the timeline. It’s composed like so:

Timeline track references the path asset in the scene. Each timeline clip on the path track references a “unit group” and a start and end waypoint. The system animates the unit group in formation from waypoint start to end across the span of the timeline clip.

I have also written the behaviour code to move the units when scrubbing the timeline in the editor so the animators don’t have to jump into and out of playmode to see how things will move but it’s forever marking the scene as dirty and needing saving (cause stuff is moving around at edit time). Is there a way to move objects in the scene and not have those changes serialised/saved like the HideAndDontSave flag or something to that nature?

Unity’s built in animation system seems to be doing this somehow as you can see objects moving in the editor but it never dirty’s the scene. I’ve searched a lot but haven’t been able to turn up anything.

Any assistance would be appreciated.

Your PlayableAsset needs to implement IPropertyPreview, and register all the properties you plan to modify using the provided IPropertyCollector interface.

If you need to know the serialized property name of the properties you want to modify, you can go to the Debug view in the inspector

Then hold the alt key while hovering over the inspector to show the serialized property names:

You can also find them by opening the scene files with a text editor (wordpad or other), as long as you have text serialization enabled.

1 Like

Thanks David, very helpful!