Author Topic: some bugs on textures and reimport  (Read 4360 times)

I want to list some problems/bugs using B2M inside Unity with the hope that they can be resolved soon.

1. every time that I stop the play session within the editor, all the substance materials get reimported. It takes some seconds, but is getting worst for any new material I create. (it reimports all the substances of the whole project, not only of the scene)
2. Sometime some textures inside substances get lost and replaced by some texture used by other substances, and I have to pick one of those materials and play with the output texture settings so the all the textures get regenerated/reassigned correctly.
3. If I use Photoshop to change a texture used as source of a substance, Unity reloads it correctly inside the project, but the generated textures don't update until I reassign the source texture.

Please, let me know if there is a workaround to these problems.
Last Edit: April 17, 2013, 10:20:01 am

I am seeing this same problem.  I don't usually have this problem when there is just a few B2M materials in a scene, but as I continue to work on a Scene I get this problem more and more.
The worst part for me is that when I load up the scene, things look fine, but after I hit play and it generates the maps for runntime, I end up only having like 5 materials, and these 5 materials are applied to everything in my scene.
When I hit stop, all the materials are messed up. 
Sometimes I have to manually go through and drag the original texture back up to the B2M material to get it to update to what it should be, but sometimes this doesn't do anything.  On those times where this doesn't do anything I will attempt to Reimport that B2M stack, which will either cause Unity to freeze, or to crash Unity.

When using multiple B2M materials, do you clone it inside of the same B2M asset ? Cloning too many in the same asset tends to make unity less stable. Try to not create more than 5 clones in the same B2M asset, and rather duplicate the B2M file. As it's only a few kilobytes each time, it won't add up too much.

I'll try to don't clone materials inside the same B2M asset to see if the problem will disappear.
But how to duplicate a B2M so that I will not have to set all the parameters again? When I duplicate a B2M asset it's empty.
I was able to do that by copying and renaming manually both the .sbar and .meta files. It's not the fastest way. Any other options?

And what about point 3 of my question? Is only me to have this problem?

I've reduced all B2M asset to single material and now it works very well, fast, without any texture mix.

Still persists the problem of auto regenerate textures after that Unity updates them.

I'm having exactly the same problems when using substances I purchased from Allegorithmic in Unity 4.1.5f1: creating more than a single instance of a given substance will cause problems. After reloading a scene (for example when starting up Unity), hitting "Play" will cause all my scene's objects to use only a single substance variation. This persists until I change the colour of one substance instance, after which the scene appears correctly again. Using a single instance per substance (and duplicating the entire substance in order to create variations thereof) seems to be a good workaround, though. I can provide a small demo project to reproduce this bug, in case anyone is interested.

I get the reload-all-substances-on-stopping-play bug too, but apparently only when my project contains certain substances, not others; also, I didn't manage to reproduce that one in a new, simple project.

We have lots of fixes ready to ship with 4.2, hopefully the release is coming very soon.