Author Topic: B2M stops saving when updating materials, which will cause unity to crash  (Read 2921 times)

Hello,
I have been using bitmap2material for several days, and it has been working fine up until today.

I am using it with Unity 4.0.1

I noticed that Unity was giving me errors, it was unable to re-serialize files, mentioning procedural material inspector.  What seems to happens is after I make a change on a material generated from bitmap2material, or create/delete/clone a new material the sidebar tries to save the meta file, but it seems to be unable to save, and throws the error. (I can tell it isn't saving it by looking at the properties of the file, and seeing when it was last modified).
The error says that something has went wrong, and it says that 'we probably ran out of memory'. 
Checking with taskmanager I do not seem to be maxed out memory wise, nor does unity seems to be hogging more memory than usual.
Once this happens, if I close unity and attempt to reopen it, Unity will crash during its loading screen.
If I remove the b2m folder from unity, I am able to load unity (but with all my objects showing up pink as their materials no longer exist).
As a test I SVN updated with my deleted b2m folder (which put me back to my last revision, where it was working properly).  After about 20 minutes of adding new materials, I ended up getting the same error, and closing unity and re-opening unity resulted in the same crash.

This may be a coincidnce, but it seems that one I get to about 85 materials is when I reach this error and subsequent crash?
Am I doing something wrong here?  Should I be doing something different?  Should I be using a seperate instance of b2m for each level/zone/area?

Its to the point now where I can keep reverting to my last good save, but I don't seem to be able to do any new work without getting this error, which is resullting in in todays worth of work being lost.

Any help would be greatly appreciated.

Updating to 4.1 should help as numerous memory and performance optimizations are part of the release.

In the meantime, we recommend not cloning too many materials per instance of B2M as it seems to cause some issues when reaching a high number of clones indeed.

I would recommend duplicating the B2M file which is very small and not have more than 10 clones per instance to minimize risks of memory issue.

Ok thank you!  I will try to use multiple B2M files, and don't put too many things into each file.