Skip to content

not all members in PixelWizards.PackageUtil.PackageUtilModel are marked [System.Serializable] #1

Description

@darbotron

First, thanks for making this in the first place - much appreciated :)

    /// <summary>
    /// Json serializable package manifest
    /// </summary>
    [System.Serializable]
    public class PackageUtilModel
    {
        public string name = "com.mycompany.mypackage";
        public string displayName;
        public string version = "0.1.0-preview.1";
        public string unity = "2018.4";
        public string description;
        public string category;
        public Author author = new Author();               // <- type not marked [System.Serializable]
        public List<string> keywords = new List<string>();                     
        public DependencyList dependencies = new DependencyList();  // <- type(s) not marked [System.Serializable]
    }

Since PackageUtilController essentially takes an instance of PackageUtilModel and uses it to create a package I thought - oh, I'll just store PackageUtilModel in a ScriptableObject and then I can add a button to the asset's inspector to use PackageUtilController to export the package.

However, because PackageDependency, DependencyList, and Author aren't marked [System.Serializable] they don't show up in the inspector for a PackageUtilModel property or get saved in the asset so this super easy extension was a non-starter.

I know this is all MIT licensed so I could just modify it locally and do what I want but I thought this tiny change might be generally helpful to other people using this package :)

I figured it was such a small change there wasn't any point making a pull request...

Again, thanks for sharing all of these packages - super super lovely of you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions