Hello Guest

Author Topic: The inner sizer of conainersizer and black edge around image  (Read 3300 times)

V1ncam

  • Newbie
  • *
  • Posts: 6
    • View Profile
The inner sizer of conainersizer and black edge around image
« on: February 21, 2014, 12:35:03 pm »
Hello I've got 2 questions/problems,

I can't determine whether my tk2dUILayoutContainerSizer is full. I just add a fixed tk2dUILayoutItem and then try to check if the container is full with
myTk2dUILayoutContainerSizer.GetInnerSize().y > 1.0f. However this doesn't work. Is there any other way I can make sure if the container is full or not? Or am I using this function wrong?

Secondly, every time I try to import a image file into my SpriteCollection it creates a little black line around the edge of the image. It even happened when I tried to import a demo image file. When I open the atlas it created it is already there. What am I doing wrong here?

[EDIT] Just to be clear, if I import a circle as image, it create a black edge around the circle.

Thank you.
« Last Edit: February 21, 2014, 12:37:35 pm by V1ncam »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: The inner sizer of conainersizer and black edge around image
« Reply #1 on: February 22, 2014, 12:57:00 pm »
GetInnerSize returns the size of "contents" area of the container in world units, i.e. taking into consideration the margins. You need to measure your fixed size item or items in the sizer, then use that to compare with the inner size to see if its full.

About the black edge - are you on tk2d 2.3 and Unity 4.3? If so, ensure Alpha is Transparency tick box is set on the sprite. Otherwise post a repro case and I'll investigate further.

V1ncam

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: The inner sizer of conainersizer and black edge around image
« Reply #2 on: February 26, 2014, 09:29:29 am »
It is a little bit late,

but thanks!