Search Unity

Custom Package with Scriptable Object Missing Script Issue [Help]

Discussion in 'Editor & General Support' started by DouglasPotesta, Sep 27, 2019.

  1. DouglasPotesta

    DouglasPotesta

    Joined:
    Nov 6, 2014
    Posts:
    109
    So I made a custom package for Unity 2018.4.0f1 LTS, a local one.
    I followed the package layout convention and divided up my package accordingly.
    I put my editor related assets and code in the editor folder, and my runtime related things in the runtime folder.
    I then added the assembly definition files, and followed those conventions for the package as well.
    In my runtime folder I have a class that inherits from scriptable object, that allows me to create them using the create asset menu. I have a custom inspector for it that is in the editor folder of the custom package. In runtime folder I created one of this custom scriptable object. In the original project it displays correctly. The asset sits next to the assembly definition.
    When I add the custom package to a new project through the package manager, the scriptable object asset says it is missing its script. I can right click and create a new one, but my previous one included in the custom package always claims it is missing a script.

    I know that the conventions above were only added in the Unity 2019 documentation, so I am worried that it may be that custom packages are not fully supported in 2018.4 LTS.

    ;tldr
    -Made a custom package with a custom scriptable object and it doesn't work when added to new projects.
    -Worried custom packages are not fully supported in 2018.4 LTS
     
  2. DouglasPotesta

    DouglasPotesta

    Joined:
    Nov 6, 2014
    Posts:
    109
    I haven't found a solution yet, but I started installing the latest 2018.4 LTS update, and I also downloaded the latest 2019 release. I will try it in those and report my results here.
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    This should work fine. Can you share an example? Did you also include the .meta files with the scripts etc?
     
  4. DouglasPotesta

    DouglasPotesta

    Joined:
    Nov 6, 2014
    Posts:
    109
    Well this is embarrassing.
    ClassName: public class ReadMe : ScriptableObject
    FileName: Readme.cs
    I even checked if I spelled them differently earlier, but somehow I missed the case difference.
    It is working now that I matched them up.
     
    karl_jones likes this.
  5. DouglasPotesta

    DouglasPotesta

    Joined:
    Nov 6, 2014
    Posts:
    109
    Mods feel free to delete this thread. This was a dumb mistake on my part. :oops: