I have an Actor BP (“MyActorBP”) that oversees game play and rule enforcement that I would like to refactor, making an improved version of parts of it while leaving other parts intact. Meanwhile I would like a copy of the Actor in its current state, since it works ok, so I can unwind back to it and also use it for reference. What is the best approach for doing this?
I figured there were two ways I could go about it:
Duplicate it (“MyActorBP_v2”) and work on the new version. This breaks all the internal references to the original “MyActorBP” so I would need to go and reattach new references that use the new Actor class which could get messy.
Duplicate it, use the duplicate as a backup (“MyActorBP_bak001”) and proceed to edit the original. This keeps the references intact, but what should I do with the backup actor BP, like where does it go in the file hierarchy, how do I keep it out of source control?
How do you typically deal with this kind of actor versioning? Is it better to just leave it up to source control and not make a backup, or can I back it up out of the Content directory but still look at it when I need to?
Hey there @rebusb! Welcome back to the community! In my experience, in a well managed team projects I tend to leave it up to source control for the most part. Though with my own personal projects I almost always go with your “snapshot backup” and keep working from the original. Unreal has utilities built in to replace references in case you need to use the backup later.
Version control is mandatory. For big actors I tend to implement everything in independend components (seperate classes), in this way you can replace implementations when needed, without touch the actual actor.
To have duplicate in your case seems reasonable. The question is why not have the backup actor also versioned? You can keep it until your refactoring is done and then get rid of it.
Old habits, this instinct to always save space. Never occurred to me to just delete the clones when everything is working again (or copy them outside the Content at that point if I feel sentimental about them).
Was pondering inheritance so I could make different rule sets, but maybe a “ruleset” custom component? Had been thinking of components as kind of solid parts like FX or a camera, but maybe they can be more abstract adding functions only? Interesting… but for now a duplicate will probably do. Thanks!