Do not build Resources files depending of the plateform

It’s possible to exclude resource from certain platform?

Example:

I build an app on mobile with a lot of images in resources. But for WebGL I want them on a server and download them instead of resources on the client.

I can handle it in code with #define but I don’t know how to exclude them in the build for WebGL.

Or if I want to have non-square texture for Android and another set of square texture for iOS how I can do that?

If you like to have different import settings per plattform , unity already has support for that.
You can overwrite the import settings for each texture in the import dialog per platform.

For your webgl example… Maybe just reduce all the graphics to the smallest size via the import settings for the webgl platform

1 Like

I don’t want to overwrite the settings, I want to exclude them. And for the texture, I can specify a specific resize texture.

For example, if I have a 256x512 texture, I want it square on iOS, I can’t overwrite to resize it to 512x512 (PVRTC need to be square)

I also reduce my files to minimum on web builds, but it would be fantastic if Unity could reduce asset file sizes to use 0kb of space, and replace the reference with a web address url and a priority rating so we could have the asset downloaded automatically in WebGL builds.

I know we could roll that system ourselves or mishmash some plugins together to achieve this effect. But building it right into the Unity UI would be lovely.

It is not a function that is commonly used or unity or some plugin developer would have made that function.
Looks like you have to manage the downloading yourself.

@DarkPixel you are correct i forgot that the per platform part is only for the max size and the compression.

The new AssetBundles system have all I need. I’ll remove all my resources and use only AssetBundles

1 Like