I have been juggling with an issue recently. I want to make changes to some code belonging to an asset I bought off an asset store. The problem is that I want to make my changes update-proof. Meaning that when I update the asset in the future to a new version, my changes will not be overwritten.
The only thing I can think of is to make a separate class of any class I want to make a change to. Then I would override any methods which I want to change. The only problem is that this can be kind of messy and might require a lot of refactoring of components to use the new classes that I create.
Please let me know if you have any solutions to this predicament.
Version control. Put the original asset in a repo. Make all of your changes in a branch. Then when the asset is updated, you can make a branch for that update and then merge it back in.
Thanks @Kiwasi that sounds like exactly what I am looking for. I do have one question because my Version Control skills are not quite up to snuff. What if you had multiple assets to make changes to. Would you create a different branch for each asset and merge the branches in separately when updates occur?
This is more of a longer-term suggestion, but petition those Asset Store developers to make their code extensible with events, delegates, interfaces, virtual members, and the like, so you don’t have to touch their code directly. Or find replacement products that are already built with this kind of extensibility in mind. In the long run, it’ll make life easier for you and them.
Agreed. Does the asset store have a document for new unity asset store creators to help them to think in this fashion? Something like “Design for sales and success: making integration easy with extensible unity assets”