2D Toolkit inside NGUI

After integrating the new enemy art assets, I resumed working to the Upgrades screen since I have time. I have finally completed the Unit Shop Panel using 2D Toolkit objects. I thought my work is done and everything would be fine and dandy…

The Unit Shop Panel

… then my custom 2D Toolkit button stopped working. I thought it would be a simple fix, but no, I had to dig deeper. I had to use the debugger and did some code stepping. When I’m using the debugger, that means the bug is really deep. The debugger is usually my last result to hunt bugs.

Apparently, my camera raycasting to the button collider no longer worked when used with NGUI’s camera settings. The fix was to set the camera at some negative Z position (I set it to -200). It’s not a good fix but I really don’t want to spend a lot of time for this. I want the Upgrades screen done soon.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s