Greetings! So I have a game where there is a skill tree. If you zoom out the skill tree you get around 150 batches, which I was able to reduce it to 50 by using Sprite Atlases! YAY!
Now, the thing is that each node of the skill tree is a Scriptable Object inside the Resources folder where each skill has its own icon.
This icon is a Sprite reference.
The problem is that this sprite asset is getting bundled separately into the build, which is unnecessary as I already auto generate the Sprite Atlas with a custom Preprocess Build method. Very useful as I keep adding new Scriptable Objects every time, so the Atlas gets always updated. This generates duplicates, because of the direct reference to the asset.
So my question is: Is there any way to avoid this asset duplication and keep the asset reference as Sprite in the scriptable object? The atlas is working great so far, itโs just that Iโm getting duplicates files; I can see them in the Build Report.
I know I could change it to SpriteAtlas and then use the GetSprite() to get it, but I really like the flexibility of just creating a scriptable object and adding the Sprite reference and then generating the Sprite Atlas with the Preprocess Build method.
Note: The game is too big already to migrate to Addressables, and the goal of this is not only to improve performance, but also to reduce the game size in the short term. Not to mention is a one man project.
Thank you all and sorry for being so capricious!