Hello Guest

Author Topic: May be bugreport  (Read 4120 times)

Trogl

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
May be bugreport
« on: March 31, 2013, 04:39:39 pm »
Hi! It's not a big deal for now but I want to help make t2d better, so:

I created animation collection and then remove one animation from list, and commit changes. And looks like deleted animation not completely removed from animation collection:



and when I run this code
Code: [Select]
tk2dSpriteAnimationClip[] clips = mSprite.anim.clips;

        string res = "";
        foreach (var clip in clips)
        {
            res += "|" + clip.name;
        }
        Debug.Log(res);

i has this result:


Using 1.92 beta2.

p.s.Animations in attachement.
« Last Edit: March 31, 2013, 05:07:00 pm by Trogl »

apbilyk

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: May be bugreport
« Reply #1 on: April 04, 2013, 07:40:26 pm »
I just ran into this as well, on 1.92 final.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: May be bugreport
« Reply #2 on: April 04, 2013, 08:35:23 pm »
@Trogl - I wrote up a reply, but I think I have forgotten to click "Post".

Basically, my post said "I tested this, and I couldn't reproduce it."

But now looking at this again, it makes a bit more sense to me why you're experiencing it.
Looking through the code - delete definitely clears the name and stuff. The line in there is because the slot internally is still there.
The clip should be cleared & empty though, so it shouldn't cause any issues, apart from that ugly line in there, and when you iterate through clips, you will find empty clips in there.

The next time you create a clip, it will occupy this slot, though.
So, it isn't really a bug, but not ideal behaviour either. It will change in a future version.

Trogl

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: May be bugreport
« Reply #3 on: April 04, 2013, 09:24:42 pm »
оk, I was glad to help :)