Hello Guest

Author Topic: UI, ProgressBar, Sliced sprite.  (Read 5879 times)

RhapsodyGames

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
UI, ProgressBar, Sliced sprite.
« on: August 22, 2013, 12:30:17 pm »
Hello, I'm using Your UI system, it works nice, but some of tk2dUIProgressBar components always set "Dimensions":(x, y) to (0,0). For example: I have 20 objects instanced from the same prefab, progressbars of 15 of them works cool, but 5 of them have (0,0) xy in Dimensions. How can I fix this?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: UI, ProgressBar, Sliced sprite.
« Reply #1 on: August 22, 2013, 02:10:07 pm »
There was a bug in tk2d 2.1 which has been fixed in tk2d 2.2 beta 1 with progress bars incorrectly resizing the sliced sprite. You could update to that version or merge the changes for that one file from it.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: UI, ProgressBar, Sliced sprite.
« Reply #2 on: August 22, 2013, 02:11:46 pm »
Oh wait. One more thing to watch out for.
Do you have a parent in your hierarchy that is a prefab?
Eg..

Prefab
   X
   Y
   Z
      Another prefab
      Yet another prefab

There is a known Unity bug in this scenario that can incorrectly inialize the child objects, but that usually manifests as missing render meshes.

RhapsodyGames

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: UI, ProgressBar, Sliced sprite.
« Reply #3 on: August 23, 2013, 08:24:05 am »
Thank You, my problem gone after update, now works nice :)