abgtan

Hello. We have a very specific folder structure and file naming convention to follow for our project, so we have to rename and re-organize all spine generated assets (material, atlas, skeleton data). We have multiple copies of skeleton data, material, and atlas, one for each screen resolution (ex. 2160p, 1080p, etc.), so we name each file accordingly, but all the skeleton data share the same .skel.bytes file rather than duplicating this file.

However, changing the names and locations of these files causes Spine's AssetPostProcessor to re-generate the assets on domain reload. We can modify the included AssetUtility.cs file to remove this behavior, but this can unintentionally get overwritten when another developer updates the Spine Unity runtime in our project.

Our current solution has just been to gitignore the auto-generated files, and ignore them altogether. However, this prevents us from doing things such as marking whole folders Addressable because these files will also get included in the catalog.

Is there a best way to disable this behavior without editing AssetUtility.cs?

Thank you.
abgtan
  • Postovi: 4

Harald

When you want to avoid modifying the spine-unity source files, you could perhaps resolve the problem by writing your own AssetPostprocessor implementing the OnPostprocessAllAssets method. Then you would need to ensure that it runs after the SpineEditorUtilities and perform your respective tasks of moving and deleting assets.
Avatar
Harald

Harri
  • Postovi: 3992

abgtan

Thank you, this works. I was too focused on preventing it from happening that I didn't realize that I could just reverse it instead, as you said. :)
abgtan
  • Postovi: 4

Harald

Glad to hear, thanks for getting back to us. :)
Avatar
Harald

Harri
  • Postovi: 3992


Natrag na Unity