Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: breakmachine on September 01, 2014, 08:45:08 AM

Title: PropertyBinding updating in editor even though Update in Edit Mode is deselected
Post by: breakmachine on September 01, 2014, 08:45:08 AM
If I deselect "Update in Edit Mode" on a PropertyBinding and have the Update set to UpdateCondition.OnUpdate it will still update it in edit mode. Is that the intended behaviour?
Title: Re: PropertyBinding updating in editor even though Update in Edit Mode is deselected
Post by: ArenMook on September 01, 2014, 02:23:04 PM
No, it doesn't sound like it. Change the PropertyBinding's Update function to this:
  1.         void Update ()
  2.         {
  3. #if UNITY_EDITOR
  4.                 if (!editMode && !Application.isPlaying) return;
  5. #endif
  6.                 if (update == UpdateCondition.OnUpdate) UpdateTarget();
  7.         }