Hello Guest

Author Topic: tk2dUILayoutItem handles do not appear  (Read 4391 times)

cdes

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
tk2dUILayoutItem handles do not appear
« on: March 03, 2015, 10:29:14 am »
Hello,

I'm trying to create a standard "Popup" layout for my game.
However...  the resizing handles do not appear.

My camera is set to: Pixel-per-meter = 1

One thing to note is that when I "scale" the GameObject transform, it appears.  However, I don't want to scale my GameObjects, I want it pixel-perfect.

Here's a video demonstrating the problem:
http://youtu.be/XpzOxdCx-aU

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUILayoutItem handles do not appear
« Reply #1 on: March 07, 2015, 01:56:21 pm »
Hi sorry I missed this - it looks like a missed a whole bunch of posts from last week...
Can you create a repro for this please? This should work fine - I can't seem to repro this.

cdes

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: tk2dUILayoutItem handles do not appear
« Reply #2 on: March 10, 2015, 11:54:58 am »
Here is a repo:
https://bitbucket.org/cdes/tk2dhandle

I don't know if it's allowed to upload 2dToolkit in a repo, so I didn't do it.
You have to import 2dToolkit 2.5.0


Here's a video of this project:
http://youtu.be/n3qXJv2nwFM

cdes

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: tk2dUILayoutItem handles do not appear
« Reply #3 on: March 12, 2015, 09:13:41 am »
Sorry, I've read it as "repo"

Here's how to reproduce the bug:

1. create a new project
2. import 2d toolkit 2.5.0
3. delete main camera
4. add 2dtoolkit camera
5. Set the camera to:
    Native Resolution: 640 x 1136
    Preview Resolution: 640 x 1136
    Pixel Per Meter: 1
6. Open the sprite collection: UIDemoSpriteCollection
7. Go to settings, change size to Pixel Per Meter: 1
8. Click Commit.
9. Now drag the Window.prefab from (tk2dUI_demo/ControlPrefabs/Layout) to the scene.
10. Highlight the "Background" gameobject that is inside the "Window" gameobject.
11. Click (1:1).
12. Now highlight "Window", and you won't see the handles because they are very tiny.
13. You have to zooooooooooom, then you'll see a small rectangle, with handles.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUILayoutItem handles do not appear
« Reply #4 on: March 12, 2015, 11:10:34 am »
Hi,

Thanks for the repro steps.
I can see the issue now - so when you change the pixels per meter on the sprite collection to 1, you're changing the dimensions of the sprite but not the handles. The rect of the control is still what it was before which is really really tiny compared to the 1 PPM thing.

If you reconstruct your own control using the 1 pixel per meter sprites you won't have this issue.

cdes

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: tk2dUILayoutItem handles do not appear
« Reply #5 on: March 16, 2015, 06:59:15 am »
Apparently, all I had to do is click the "Fit Geometry" button.