Author Topic: Adding .sbsar files to a list increases RAM...how to unload memory?  (Read 1183 times)

Hi!  I'm working on a script that will batch-manage some .sbsar files.  However, once I get past just a few files in my list, RAM use goes up very quickly as I add more.  I'm unable to get RAM to go back down.

I have noticed that RAM use goes up when I select a new .sbsar file in the Inspector, and goes down after.  What is it that you guys are doing to get it to go down?

Thanks!

Hi!  I'm working on a script that will batch-manage some .sbsar files.  However, once I get past just a few files in my list, RAM use goes up very quickly as I add more.  I'm unable to get RAM to go back down.

I have noticed that RAM use goes up when I select a new .sbsar file in the Inspector, and goes down after.  What is it that you guys are doing to get it to go down?

Thanks!

Hi Andrew,

I am asking the devs about this. Are you clearing the cache using ProceduralMaterial.clearCache?

Cheers,
wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Hi!  I'm working on a script that will batch-manage some .sbsar files.  However, once I get past just a few files in my list, RAM use goes up very quickly as I add more.  I'm unable to get RAM to go back down.

I have noticed that RAM use goes up when I select a new .sbsar file in the Inspector, and goes down after.  What is it that you guys are doing to get it to go down?

Thanks!

Hi Andrew,

I am asking the devs about this. Are you clearing the cache using ProceduralMaterial.clearCache?

Cheers,
wes

Hey Wes, sorry for the super delayed reply.

Yes, I am -- I spoke w/ some Unity people and they suggested ProceduralCacheSize.None -- however, it looks like the editor switches the size back at some point.

Code: [Select]
material.cacheSize = ProceduralCacheSize.None;
material.ClearCache ();

I'm going to try to find time to re-do it and see if I can get the same functionality without loading the .sbsar files at all.  But any ideas would be greatly appreciated!