Hello Guest

Author Topic: Issues about Sprite Collections  (Read 6097 times)

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Issues about Sprite Collections
« on: March 22, 2015, 01:41:44 am »
Hello,

I have some issues about tk2d animations with PNG atlases. It is necessary to have some consultancy from your experiences:

1. When I tried to play 1 animation clip from an animation Library with 34 animationClip, at the profiler I saw 34 TextAssets(all are named atlas0.png) were loaded. When I changed the animation Clip count to 10 in animation, TextAsset count decreased to 10. Due to this correlation, I guess it is specific to PNG atlases. is this an issue and  how could I prevent those png's to be loaded without running related animation clip ?
 
2. Sadly but sprite collections are sometimes broken and in scene view sometime no animation sometimes magenta color animations appear. nothing could help me to solve this(clear references, build indexes ..). Then I recreated SC but this time I had lost my animations.
   a- How can I rescue my animations after re-crating broken sprite collection
   b- Perhaps you have come across but let me explain a situation as I remember: SC creation with dices PNG atlases, but I have changed diceX, diceY but I didnt push "apply" and directly committed SC. After that, the collection is broken. Maybe this is an issue to be solved.

3- It woud be great if PNG atlases could be loaded async'ly. I think PNG atlases really create value for TK2D.

4- How can I use diced sprites animation with projected camera ?


and many thanks for great product and support ....
« Last Edit: March 22, 2015, 02:35:27 am by kenshin »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues about Sprite Collections
« Reply #1 on: March 22, 2015, 02:23:29 pm »
1. This will not happen in runtime, it may in the editor due to how the sprite thumbnails are managed.

2. What version of tk2d are you using? We added a fix in 2.5.1 that you can also get here. http://2dtoolkit.com/forum/index.php/topic,4744.0.html

3. Not possible, Unity png texture loading is not async.

4. You shouldn't use diced sprite animation, it alocates memory. If you still wish to use it (eg. if there is only one of them), then you can.

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Issues about Sprite Collections
« Reply #2 on: March 22, 2015, 11:11:57 pm »
1. I have tested it in iPad, iPad simulator and editor. In all of them, the situation is same: I prepare a screenshot from iPad at the attachment.
2. 2D Toolkit Version 2.5 beta 2. Unity 5. I would try package and if there is an issue I will inform.
4. In projected camera there are sometime unwanted lines at the border of dices.

I appreciate your answers and thanks for support again  ...
« Last Edit: March 22, 2015, 11:14:50 pm by kenshin »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues about Sprite Collections
« Reply #3 on: March 23, 2015, 11:29:26 pm »
1. Those atlases are not the same texture? The sizes are all different...
3. When its not pixel perfect and you scale it, you will probably need to add padding. There will be issues if you scale it to small though, as you're dealing with more vertices and boundaries than you would normally. Its like you building it out of many small sprites.

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Issues about Sprite Collections
« Reply #4 on: March 25, 2015, 01:19:46 am »
1. Yes. 10 animation-clip in animation, I use one of them and all of them appears as textasset ! Why ?

thanks for interest.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues about Sprite Collections
« Reply #5 on: March 25, 2015, 09:11:19 am »
All of them are loaded when you load an animation collection. If you want them to be unique use different animation collections.

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Issues about Sprite Collections
« Reply #6 on: March 26, 2015, 04:31:40 pm »
thats what I have feared :) OK thanks for reply. I will investigate to extend that class so that loading will be done per animation.