2D Toolkit Forum
2D Toolkit => Support => Topic started by: cdes 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
-
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.
-
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
-
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.
-
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.
-
Apparently, all I had to do is click the "Fit Geometry" button.