Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Feedback Please save prefab modified property in edit mode only with inspector

Discussion in 'Prefabs' started by Thaina, Aug 1, 2019.

  1. Thaina


    Jul 13, 2012
    Since we have
    attribute. We could write same code to run in both runtime and editor that dynamically react to things. Such as a canvas UI that calculate and resize itself responsively to screen dimension or showing a real time clock while editing in edit mode

    But I don't want to have that dynamic value that set from the code being saved as asset and become default value. And on the contrary, most of the time, I don't want to set
    because I want to intentionally set that prefab asset's value with inspector or other kind of editor command

    So I think unity editor should not save the value that was edited from component to the prefab, it should be some flag to tell the prefab saver that, while the editor executing component update loop or when just the layout changed event, it must not save the value modified in these cases into prefab

    Or maybe we should have
    to let this behaviour possible
    Last edited: Aug 1, 2019
    pojoih and Jes28 like this.