Hello Guest

Author Topic: AnimSprite Issue  (Read 5089 times)

Eikyou

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
AnimSprite Issue
« on: September 10, 2012, 09:17:52 am »
Hi everyone,

I use an AnimatedSprite for play some anims (differents Anim Libs). I play a specific anim many times and just for this anim, first I have a CPU peak when I run on iOS, resulting a freeze. But after the first one it work fine.

Does anyone knows this issue ? It's maybe during the library change ? I'm lost.


Thank you for your time.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: AnimSprite Issue
« Reply #1 on: September 11, 2012, 11:27:31 am »
If you're changing library, the texture will be loaded on first use. You will get a CPU spike then. The best way is to do this once at initialization / level load to make sure the texture is resident. This is how Unity does things, and as far as I'm aware, you can't change it. You can always workaround like I described though.

Eikyou

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: AnimSprite Issue
« Reply #2 on: September 12, 2012, 08:35:52 am »
It's working when I play it once at initialization. Thank you Unikron !