Plastic Cloud: Track ScriptableObject (".asset") as Binary?

ScriptableObjects allow the Attribute [PreferBinarySerialization], which is very useful to keep some special, large, compact ScriptableObjects (e.g. some that contain large arrays of data points) that have no mergeable data small and fast to serialize and deserialize.

On Git LFS, I could circumvent the automatic file typing by using a longer extension, such as “.binary.asset”.

Unity requires the extension to be “.asset” as far as I know; otherwise ScriptableObjects won’t deserialize as such.

However, PlasticSCM doesn’t seem to allow a filetypes.conf per Workspace (why?!? this should be right next to ignore.conf etc.) and placing it in filetypes.conf in my user directory does diddlysquat (probably because Plastic matches by registration order, not by “best match” ?!)

Or am I doing something wrong? I can’t seem to manually set a revision type to binary (as that is apparently not supported in cloud), but it would REALLY help for plastic not to try to find diffs in a 10-50 MiB pure binary file.

1 Like

“filetypes.conf” should work if you set it in the root of your workspace. I just ran a test for .asset files and it’s properly working.

The content of “filetypes.conf” should be:

.asset:bin

We are open to arrange a meeting if you are not able to make it work.

This would make all .asset files binary, not just “.binary.asset”

Unity has several types of .asset files, most of them should be text so they can be diffed and merged. In particular, all Descendants of ScriptableObject can only be serialized as files with the (final) extension .asset, and most of them are best serialized as text.

Except where they aren’t, for which Unity has that [PreferBinarySerializationAttribute].

It would also work if I could apply this rule to only a folder. I tried to place a filetypes.conf in one of my workspace directories (kind of like how .gitattributes works), but it did not seem to work.

Would really love to have a small support session about this. :slight_smile: Where can I arrange one?

I’m afraid that you cannot apply this rule to a folder for at the workspace level.

Even when the file name is “test.binary.asset”, Plastic is considering the extension as .asset so at the moment is not possible to configure custom filetypes rules for .binary.asset files.

If you are a pàying customer, you can open a ticket at support@plasticscm.com and we can arrange a meeting with you.

Curiously, I was able to set the revision type through the UI, and it seems to stick. (maybe only in a local copy, downloading int a new workspace was extremely fast)

1 Like