Author Topic: PropertyBinding updating in editor even though Update in Edit Mode is deselected  (Read 3440 times)

breakmachine

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 71
    • View Profile
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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
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.         }