Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Have a scriptable object save field edits from code?

Discussion in 'Scripting' started by techmage, Jul 30, 2018.

  1. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    If you put a ScriptableObject into a SerializedObject then get the SerializedProperty and edit it via that, then changes save.

    But is there a way I can make an edit to a ScriptableObject directly, not through a SerializedObject, and have it save as well?
     
  2. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    906