0.3.1 • Published 3 years ago

moe.mochizuki.variation-packager v0.3.1

Weekly downloads
3
License
MIT
Repository
-
Last release
3 years ago

Unity-VariationPackager

A Unity editor extension for creating multiple packages from Scene or JSON.

Requirements

  • Unity 2018.3 or higher

Features

  • Create a single or multiple packages (e.g. different editions) in a single operation
    • Only the difference between including and excluding assets is supported
  • Support package.json like NPM (UPM)
  • Support C# Script in current scene
  • Glob pattern supported in listing files

Package Configuration

You can choose from two configuration types.

Scene

Attach Mochizuki/VariationPackager/Package to GameObject in your scene and configure it.

KeyRequiredDescription
NameYesPackage Name
VersionYesPackage Version
Describe.OutputYesDestination directory path for the generated packages
Describe.Variations.NameNoA unique name to distinguish between editions
Describe.Variations.Archive.NameNoThe name of the zip archive
Describe.Variations.Archive.BaseDirNoThe base directory to which the output will be placed, relative to this path
Describe.Variations.Archive.IncludesNoArray of file paths (support glob) that including to package
Describe.Variations.Archive.ExcludesNoArray of file paths (support glob) that excluding from package
Describe.Variations.UnityPackage.NameNoThe name of the UnityPackage
Describe.Variations.UnityPackage.BaseDirNoUnused in Unity Package. Ignored.
Describe.Variations.UnityPackage.IncludesYesArray of file paths (support glob) that including to package
Describe.Variations.UnityPackage.ExcludesNoArray of file paths (support glob) that excluding from package
PreProcessorsNoArray of pre-process C# scripts for building packages
PostProcessorsNoArray of post-process C# scripts for builded packages

JSON Schema

Create the following JSON file in your Assets directory that named as package.json.
If this file exists, you can add it to the moe.mochizuki.unity.packaging entry.
JSON type build manifest does not support pre/post processors.

{
  "name": "Package Name",
  "version": "Version",
  "moe.mochizuki.unity.packaging": {
    // Destination directory path for the generated packages.
    "output": "Assets/Path/To/Packages/Destination",
    // Describe the configuration for each package.
    "variations": [
      {
        // A unique name to distinguish between types, spaces are allowed if it is unique.
        "name": "",
        // (Optional)
        // List the files you want to include or exclude to/from Zip Archive.
        // Files generated in the UnityPackage section are automatically included.
        // If omitted this section, the zip archive is not generated.
        "archive": {
          // (Optional)
          // The name of the zip archive. If omitted, `.name` will be used.
          // The name is automatically given `-VERSION` suffix.
          "name": "ZipArchiveName",
          // (Optional)
          // The base directory to which the output will be placed, relative to this path.
          "basedir": "Assets",
          "includes": [
            // (Optional)
            // Array of file paths (support glob) that including to package.
          ],
          "excludes": [
            // (Optional)
            // Array of file paths (support glob) that excluding from package.
          ]
        },
        // List the files you want to include or exclude to/from UnityPackage.
        "unitypackage": {
          // (Optional)
          // The name of the UnityPackage. If omitted, `.name` will be used.
          "name": "UnityPackageName",
          "includes": [
            // Array of file paths (support glob) that including to package.
          ],
          "excludes": [
            // (Optional)
            // Array of file paths (support glob) that excluding from package.
          ]
        }
      }
    ]
  }
}