Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[Help]What makes Revert Failed?

Discussion in 'Prefabs' started by zIyaGtVm, Jan 5, 2019.

  1. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    58
    I'm using 2018.3 nested prefab workflow. After I click Revert All Button, always find that Nothing has been changed.
    Even after I revert changes one by one and see "No Overrides" the next time I reopen the Overrides drop-down menu , only to find overrides still there.
    GIF.gif
     
  2. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,432
    The script that keeps appearing as having overrides, does it make some edit-time modifications to the object?
     
  3. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    58
    Thanks for your reply.
    The script contains an OnValidate function to change childobjects' localscale.
    Some gameobjects with the same script can override properly.
    Also when I only change Sorting Group component , the override menu will be reset again and again no matter how many times I apply them:confused:
    sorting.png
     
  4. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,432
    If you comment out the OnValidate method, do you still have this issue?

    I tried having just SortingGroup here and changing that and that on its own can be applied fine. I'm fairly sure something in the scripts is modifying your Prefabs after you apply so that they are overridden again.
     
  5. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    58
    Sorry I made a mistake ,the script which I was applying didn't contain a OnValidate method.And I have tried commont OnValidate method on another script.Still failed to override .
     
  6. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,432
    Then I have no idea and we'd need a bug report to be able to look further into this.