Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: elusiven on August 07, 2017, 11:10:17 AM

Title: WWWSprite causes a lag spike[SOLVED]
Post by: elusiven on August 07, 2017, 11:10:17 AM
Hi there,

I'm trying to download a texture using the WWWSprite action, however it causes the app to freeze for 2-3 seconds which isn't very nice. I though it may be that it wasn't in a coroutine but after making it inside of one it still didn't help.

In the profiler most of the memory takes up the SpriteMeshGenerator.TraceShape 19% and FSM Late Update 52%
Title: Re: WWWSprite causes a lag spike
Post by: djaydino on August 07, 2017, 09:35:47 PM
Hi,
Can you try using www.object and then use the custom action convert Texture to sprite.

this does exactly the same as www sprite

Then let me know which part is slow (i can't test myself atm)
Title: Re: WWWSprite causes a lag spike
Post by: elusiven on August 08, 2017, 05:41:51 AM
I have tried this, and I only get one spike again

63% from PlaymakerFSM.Update() and 34% from SpriteMeshGenerator.TraceShape
Title: Re: WWWSprite causes a lag spike
Post by: elusiven on August 08, 2017, 06:49:53 AM
Okay, seems like problem is solved. The resolution of the image was too big, i was 4000 by 3400 i think. I resized the image to 800 and it's loading smoothly. It's going to be a pain though to resize +400 images, does anyone know any program that can do this all at once?
Title: Re: WWWSprite causes a lag spike
Post by: terri on August 08, 2017, 08:23:07 AM
Okay, seems like problem is solved. The resolution of the image was too big, i was 4000 by 3400 i think. I resized the image to 800 and it's loading smoothly. It's going to be a pain though to resize +400 images, does anyone know any program that can do this all at once?

photoshop can. google "photoshop batch resize"