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

ScriptableObjects get corrupted on Ctrl-D in Editor; how to detect and fix?

Discussion in 'Scripting' started by a436t4ataf, Sep 20, 2019.

  1. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,924
    Ctrl-D in Editor causes a "duplication".

    There are two types of Scriptable Object (asset and instance), and Unity is handling both the same way. Asset refs shouldn't be deep-copied (that would be creating new assets and undermining the point) but instance refs obviously should be deep-copied, since they are like MB's (not assets!).

    (and, for bonus points, you cannot actually replace them in the Editor manually (2019 Editor still has zero support for drag/drop changing of SO instance refs)?).

    So ... how do we detect a Ctrl-D event in UnityEditor, and fix/workaround this?
     
  2. TheLastHylian

    TheLastHylian

    Joined:
    Jan 10, 2013
    Posts:
    12
    this is still an issue
     
  3. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,924
    Yeah, I found more bugs with this. Unity QA are incapable of reading the instructions, I sent them 1-click fully automated reprodution cases and they simply ... can't understand it, so they close it without trying.