Build Size of a single scene in a bigger project


#1

I know there are already threads about the build size, but I havn’t read something about the build size of seperate scence compared to full project size.I have the following setup:
In my project, there are a lot a scenes with a lot of different assets.
My problem or question is:
When I export a single scene or a new, empty scene of this project it is insane big. By publishing a scene I would expect, that it only includes assets with a reference to in my package, but it seems like it packs everything inside.
Is this so?

I would call this at least a big ToDo cause it makes it almost impossible to reuse assets in bigger projects.
For the moment I always have to clone my main project, delete all unnecessary assets to get a smaller size and then build it. This is very nasty and not really useable, cause if you change an asset, you have to change it everywhere.
Is there a way to fix this or are there any workarounds to decide what should be in my build? This would help me a lot.


#2

Does the build size matter in this case? Do you have a limit on the total package size that you upload?

Things to bear in mind that build size is not the same as how much data a user downloads.

A build of a project regardless of the scenes used will include ALL assets.

Unticking preloading on assets means that you have finer control on what assets are loaded (e.g you can tag assets to say what scene they are used in and load dynamically at runtime (eg https://developer.playcanvas.com/en/tutorials/load-assets-with-a-progress-bar/))

It would be great if we could use a prefab/package system to make it easier to copy assets across.

Another alternative is to have all the assets on an external server and they are loaded dynamically at runtime. This keeps the build size small and the resources are accessible by all scenes.


#3

When it comes to mobile, I have troubles when my packages have 70 or 100MB, which is the case pretty soon when I upload about 20 models of different products.

This example for this external asset loader might help to solve my issues at the moment.
For the further development of PlayCanvas I believe, some kind of asset tree in the build process, where a expert user can select the assets for his build, would be an awesome step forward (where PlayCanvas don’t have to autodetect all references). I dont know, but I think this issn’t so difficult to add this to your ui and build process. But it would be very, very helpful for me and probably other professional users cause I think we all got similar issues with it.

Nice that you mentioned prefabs. I’m still waiting for some kind of prefab system in PlayCanvas for sharing assets beween projects :wink:


#4

This comes down to build size being different to how much the user downloads. You can control what the user preloads/downloads with some asset management and it doesn’t have to be the whole package.

An example is https://developer.playcanvas.com/en/tutorials/load-assets-with-a-progress-bar/ where the preload is very small and then the assets are loaded at runtime.

Yes, I was thinking you would have one project for all the models/textures etc (with a build script that auto uploads the assets to an external server) and another project for the app that loads the assets dynamically when ran. The issue is that you lose being able to scene editing ability.

A third option (and could be simpler) is to have post build script that removes the assets that are not needed from the package.

That’s a pretty good idea. @will opinions on this?


#5

I’ve got one more suggestion to this build size and preload issue:
It would be much easier to handle this when folders could have this “preload” checkbox.
So you could easily check in or check out whole folders from your build without going through each asset part by part.
At least, this would fit my needs very well.


#6

You can multi select and untick them in one go. Normally I suggest clicking on the first one and shift click on the last to select all. Unfortunately, if you have some files in the folder that are not assets (e.g a FBX file), it doesn’t show the tick box :frowning:


#7

Oh nice, I didn’t know that! Thanks for the support!
Still it would be an advantage to make this availabe for folders. And go through all subfolders and files automatically. (If the UI would be opensource I’m sure I could implement it :wink: )
Is there a “wishlist” somewhere or should I just post it under suggestions?


#8

Suggestions and Feedback would be the section to go for. I’m afraid there’s no real voting mechanism in place.