I'd been working on a scene, making custom prefabs out of NGUI Widgets like UISprite and UILabel. I use the pull down menu to attach a collider to every Widget. This works fine.
The problem is when I switch over to a different scene and try to pull the prefabs into that scene, either in the editor or at runtime in code, all collision on the Widgets is broken. I've turned the debug mode on the Camera and it's definitely not hitting the colliders.
I've found 3 ways to get around this, but none of them are what I'm looking for
1) On Widget objects pulled into the scene via code, remove and reattach the Collider via pulldown. This is a major headache for dev and impossible for users.
2) On Widget objects added to the scene via editor, remove and reattach Collider via pulldown. This works on editor prefabs, but not code created ones and a lot of the time colliders need special setup.
3) Remove all Colliders from prefabs in the project and add them all at runtime via NGUITools.AddWidgetCollider. This seems clunky, and again sometimes we need to customize the collider in the editor. Also seems to defeat the idea of a prefab.
The only thing I can think of is that it has something to do with connections between the Colliders, the camera, the UIPanel, the UIRoot, etc and possibly something to do with creating prefabs in 1 scene and using them in another etc etc etc but digging into the NGUI code I couldn't find anything that makes a connection between then collider and any of the NGUI stuff other than resizing.
Is there a way I can keep the colliders working between scenes?
Thanks!