2D Toolkit Forum

2D Toolkit => Support => Topic started by: RhapsodyGames on August 22, 2013, 12:30:17 pm

Title: UI, ProgressBar, Sliced sprite.
Post by: RhapsodyGames 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?
Title: Re: UI, ProgressBar, Sliced sprite.
Post by: unikronsoftware 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.
Title: Re: UI, ProgressBar, Sliced sprite.
Post by: unikronsoftware 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.
Title: Re: UI, ProgressBar, Sliced sprite.
Post by: RhapsodyGames on August 23, 2013, 08:24:05 am
Thank You, my problem gone after update, now works nice :)