Temporary textures or Materials in Editor removed in build

Hey everyone,

I have a question about something 2D Toolkit could achieve. It’s about “dereferencing” textures or materials prior to building for a platform.

How would one have all visuals during editing levels, which are completely removed from them when built? I ask this, because we want to create our own way to distinguish between low and high res devices to preload all necessary assets prior to scene loading.

Does anyone have experience with this? What would be the better approach? To somehow create temporary textures during editing which will never be packed because they only exist on ram or something like that? Or to deference everything prior to building?

Would be nice if someone could share some knowledge on the topic

Well, I only made some researches about this because I’ll need it for a project (but didn’t try it yet). According to the documentation it’s possible: if I understand well: assetbundles are a kind of zip that needs to be downloaded + extracted before it can be instantiated from using LoadAsset. It’s apparently possible to use the “file:” prefix in an url passed to LoadFromCacheOrDownload to load from a filesystem (source) or to store the bundle as an uncompressed asset in the StreamingAssets folder.

The alternative would be to use the resources folder and load resource A or B depending on the situation (and I guess you would have to manually remove the unused A or B resources before building). There are new functionality to ease the asset bundle creation in Unity5 so I guess the Unity team wants us to go this path. There are some discussions on the forums about that too.

That’s all I know for now :slight_smile: