[PLUGIN] Savior

I have also modified some critical pieces in your load / save functions (particularly for saving materials) to be able to get it to work with Packaged / Shipping builds.

Long story short: if you try to save InstancedDynamicMaterials, they will be saved by name (InstancedDynamicMaterial_0, _1, _2, _3 and so on). If you we’re to resave lets say a newly applied material on slot 0 with a new InstancedDynamicMaterial, it would return _4 on slot 0. Upon reloading your level, applying new InstancedDynamicMaterials onto your actors, there is no instanced material with suffix _4, let alone be it on slot 0, and therefore no materials will be loaded properly (as they are referenced by name) instead of by index.

Edit: I am aware that from a proper coding standard, you’d try to first get the InstancedDynamicMaterial if it already exists on a particular slot, before applying a new one, but in our huge code base that workflow is unfortunately not always guaranteed. In our case, and in most cases in general, its safer to work index-based than name based.

Our solution is still working very well after a year in use now. Let me know if you’d be interested to look at it, I’d like to send you the code to your email for you to have a look at it, perhaps if it successfully passes your code review, you’d like to ship it natively with your plugin. This may help other people experiencing the same problems we were facing, and it would save me quite some time re-customizing your code base every update :wink: