Our project is almost entire data-driven, which means we store pretty much every aspect of all of the various objects in databases, then either redirect data requests in the scene to those database entries, or construct GameObjects programmatically using the databases as a guide to reach the proper result. Characters, vehicles, in-game objects, pretty much everything is all are stored and generated using this method, and MonoBehaviours / GameObjects are minimized as simply the visual aspects as seen / interacted-with in the game. GameObjects are never used to store unique information other than the general behaviour of the object type, so we require few prefabs.
This approach has worked great so far, but now that we’re getting into creating cutscenes, it’s turned into a bit of an issue. For instance, say I have to create a cutscene using specific characters standing around talking to eachother and interacting, normally you would just use prefabs that have all of the data needed for those specific characters in the scene, but in our case we have no prefabs for specific characters, just one prefab for ALL characters. While I could obviously make new prefabs, it would break the data-driven approach we’ve used for everything else up to this point, and make the project far more difficult to maintain.
My strong preference is the ability to break the entire timeline system down into smaller pieces (prefabs of actions/events) and then save those to a database to be reconstructed later programmatically. This is the way our level editor system works, by having only a few prefabs for specific types of objects with unique interactions, then constructing the level with those tiny prefabs and saving the specific models / collider dimensions / layer data we select for them to database entries so that they can be reconstructed when the level is actually needed. We can load the entire level with a button from the database entries for all of the components (little “c”) that make up the level, and if changes are made we can then save those changes out to the database again. I’d like to do the same with the timeline, if at all possible- construct it exactly how you’d expect to construct a cutscene, but then save it out with the press of a button and reconstruct it later from data (data that may have changed, in the meantime, like the specific character models and such).
The API for timeline seems extremely limited so far, so if this approach isn’t possible, I’d like to be able to construct cutscenes using temporary stand-ins for all GameObjects, so that things can be edited in the timeline using dummies, and the real deal is pulled from the databases at runtime and the GameObjects constructed programmatically.
If anyone has experienced similar difficulties and has some advice/tips on programmatic timeline editing using either of the methods listed above, or any other methods you can think of to simplify things and get them working, I’d be eternally grateful. I’m having some difficulty abstracting the process in any meaningful way, since so much of Timeline appears to require the need for specific GameObject references in order to change/interact with them.
Cheers!