I've been doing some research on unity AssetBundle
and Resources
class but so far I've not been able to find a way to unload resources at build time. This is not intended for Memory management but instead for Build/apk size.
For example, I have a LocalizedAudio
class: were I have a FR sound and a US sound set to an instance of this class. I need to find a way to tell Unity that I want only the FR sound to be exported.
The problem is that each resource pointed by a MonoBehaviour
(either a public
member or a private
member with the [SerializeField]
attribute) will be exported by default. Is possible to override this behavior?, the apk gets really big when you have 5 or more languages but you just want to make a build for a single language. and deactivating each one of the resources before build is rather tedious for a medium size game.
The goal is to load different language sets into the builds but I'm not sure I'm on the right track with AssetsBundle
and Resources
.