- Home /
How do I release editor memory?
I am building a lot of asset bundles. By themselves the asset bundles are not too big. When I start Unity3D and build the bundle, it will work flawlessly. However when I build a lot of these bundles in sequence (without restarting Unity3D) the editor runs out of memory and crashes. I have called the following code after each BuildPipeline.BuildAssetBundleExplicitAssetNames call:
GC.Collect();
Resources.UnloadUnusedAssets();
But this does not fix the problem...
Are you making sure to destroy object instances where applicable? I would imagine that you are running out of unmanaged memory as opposed to managed memory.
@whydoidoit: your suggestions fixed the problem for me. if you make an answer of out it, i'll mark you as correct.
Answer by whydoidoit · Mar 26, 2013 at 04:13 PM
You should probably try using EditorUtility.UnloadUnusedAssets in the editor. Resources.UnloadUnusedAssets is an operation to be yielded.
But be careful, I've just realized that EditorUtility.UnloadUnusedAssets can destroy temporary objects created by scripts.
Your answer
Follow this Question
Related Questions
Please explain BuildPipeline.PushAssetDependencies 2 Answers
How to load an AssetBundleManifest in the Editor? 0 Answers
How is asset bundle crc and hash created? 0 Answers
How to import the object from server to unity 2 Answers
How do i define BuildPlayerOptions.assetBundleManifestPath without a custom script? 0 Answers