Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

How to change a prefab property via script

Discussion in 'Scripting' started by Grorn, Jul 7, 2019.

  1. Grorn

    Grorn

    Joined:
    Apr 27, 2019
    Posts:
    1
    I have a prefab that i want to change a variable, and then override this change, so that the prefab remains the same in all the scenes

    I`ve searched and found PrefabUtility.RecordPrefabInstancePropertyModifications, but i did not understand how it works and if that would work for me.

    if somebody could explain it to me it would be great, thanks :)