2D Toolkit Forum
2D Toolkit => Support => Topic started by: itjunkii on May 15, 2013, 05:42:10 am
-
Hello,
First off thanks for making a great product. I am very happy with it so far!
I am having a bit of a problem.
I am NGUI to create a 2D Ortho camera to control my gui w/ anchor points and such. Also, I am using 2dtk in Javascript mode.
In certain ngui anchor points I have tk2dsprites + tk2dbuttons
The issue is when I instantiate NGUI prefab dynamically in my level scenes it's hit or miss with the tk2d buttons - sometimes they work sometimes they don't.
When I just don't dynamically instantiate and just drop the prefab in a scene and press play all tk2d buttons work perfectly.
I am puzzled, any idea why this would happen? It's hit or miss as I said, sometimes certain buttons work sometimes they don't.
Any idea on how I can troubleshoot? I get nothing from the console indicating an error.
Thanks!
-
If they don't work it could be because the collider is intersecting with the camera... Select both the camera & the button to see whats happening there.
-
Highly EPIC suggestion just like the plugin 8)
Switched to manually setting the transform.position and transorm.rotation and we are good to go.
Thank you!!!