Hi everyone,
I've recently butted up against an issue with my sprites straying from their handles, while running in the editor at least. (NGUI 3.9.0)
An old topic (
http://www.tasharen.com/forum/index.php?topic=7057.0) suggests that this is due to the half pixel offset applied on the UIPanel. Low and behold, if I set mHalfPixelOffest to false, all of the sprites render in the right place.
I appreciate that this is a minor glitch, and may well never occur/be noticed in a published project, but it is making lining up and anchoring sprites a little difficult in our current project as they are all off by a pixel one way or another.
I was wondering if the code that detects whether to enable this offset (in UIPanel's Awake) could be improved to correctly detect this case where it clearly shouldn't be on but the current logic says it should. Unfortunately I don't know enough about this to correctly determine when it should be on. If anyone can help with a nice solution to this, rather than simply hacking it off, I would appreciate it!
Cheers!
Update:
Actually, upon further inspection, with the half pixel offset on or off, I'm still seeing some sprites straying from their handles in different directions. Wondering if there's another issue at play. (See attached image).