- Home /
Loading a large texture at at run time kills fps
Im loading in a bunch of asset bundles dynamically. The downloading part works without any drop in framerate, but as soon as I start to load in my textures using either
renderer.material = www.texture;
or
www.LoadImageIntoTexture(renderer.material.mainTexture as Texture2D);
the fps plummets and it even temporarily freezes the scene.
Is there a way to load Textures async in the background or buffer them of some sort?
Answer by ScroodgeM · Aug 07, 2012 at 07:46 PM
just use real Asset Bundles
http://docs.unity3d.com/Documentation/ScriptReference/AssetBundle.html
instead the one that you use currently - it is not Asset Bundle, it's a simple web loading assets
I was using asset bundles originally, each with a material and a texture associated with it. After loading a bunch of textures Unity would crash. Unity also crashed after Ive loaded a bunch of textures using the renderer.material = www.texture method. But not with the www.LoadImageIntotexture method.
Is there a known advantage with asset bundles as oppose to directly accessing the textures from the WWW? It seemed to me it was more unneeded overhead when all im loading in at run time are textures.
debug crashes with asset bundles. i think there just something was wrong, it's not a normal for asset bundles...
Just got the bundles working a moment ago from the code you gave me on my other post. You were absolutly right. Loading in an assetbundle as oppose to the raw texture completly eli$$anonymous$$ated all frame rate drops.
Your answer
Follow this Question
Related Questions
Load external mp3 File without streaming 1 Answer
load csv www 0 Answers
How do you package/retrieve Asset Bundle Dependencies 0 Answers
Import Texture with good quality... 2 Answers
Double memory for textures downloaded with www..... 2 Answers