1
NGUI 3 Support / Re: Unity 4.5.5p3 Weirdness
« on: November 07, 2014, 05:24:06 PM »That's not exactly a fix. Invoke() doesn't work at edit time. You are basically removing the OnValidate call altogether in edit time.
lol good to know, well here's another dirty workaround, I don't know exactly why it works, but still enables me to quickly edit and test the UI without affecting game code itself.
also in UIRect:
- protected virtual void OnValidate()
- {
- if (NGUITools.GetActive(this))
- {
- if (!Application.isPlaying) ResetAnchors();
- Invalidate(true);
- // the workaround
- if (mCam == null){
- mAnchorsCached = false;
- }
- }
- }
