Search Unity

Retain ScriptableObject data when adding Github package?

Discussion in 'Package Manager' started by vestigial, Aug 31, 2019.

  1. vestigial

    vestigial

    Joined:
    May 9, 2015
    Posts:
    37
    Package A: Defines the scriptable object .cs
    Package B: Has an instance of the scriptable object
    Package C: Has both packages A and B added, and the scriptable object instance (from B) is there as whatever.asset but its shown as "script missing". Dragging the script over from /Packages/PackageA/ScriptableObjectDefinition.cs doesn't recapture the information that whatever.asset should contain.

    Is this even supposed to work, or am I trying to do something unsupported? Is it because of the .asmdef files?
     
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    575
    Hi @vestigial,

    It is hard to tell. What do you mean by
    . Package C has both package A and B as dependencies?

    Did you properly set your assembly definition references?

    Regards,

    Pascal
     
  3. vestigial

    vestigial

    Joined:
    May 9, 2015
    Posts:
    37
    The mistake was mine, I wasn't including the *.cs.meta files
     
  4. vestigial

    vestigial

    Joined:
    May 9, 2015
    Posts:
    37
    Actually it seems like its an issue with GitHub for Unity not seeing changes to an .asset after the initial creation, I'll stop posing here and file a bug over there

    Edit: Finally, I think the problem is that changes made to a scriptableobject .asset file aren't actually committed to disk until you exit the editor, or save a scene. So there were no "on disk" changes that git could see, even though the editor inspector displayed the updated values.
     
    Last edited: Sep 8, 2019