Skip to content

Stratkit Tools Module Scaffolding

Package Creation

The scaffolding editor tool will allow developers an easier means to create a new package folder with the necessary barebones files and folders with the help of a few steps.

Editor Example

Package Name

The package name will be how the entire package is identified physically. This would be in the format of .. (e.g. com.stratkit.module-scaffolding)

Display Name

This is how Unity and other IDEs will preview the name of the package. When a developer is reading the list of packages in their project, this would be the name they would see in that list.

Package Assembly Name

The name for each asmdef file generated for the package. (e.g. Stratkit.EntitiesReactive)

Package Namespace

This is the base namespace that the package will occupy. If a developer were to write create a .cs file within the Runtime folder, then the namespace in there would be Stratkit.Input.Handler but then for Tests/Runtime the namespace would be as Stratkit.Input.Handler.Tests.

Package Description

A short description that gives a few words explanation of what the package serves. It would be found inside the package.json file.

Nullable

If you want your package to contain assemblies that allow for Nullable references, enable this option. It will create the necessary csc.rsp files with nullable enabled in every assembly generated.

Use Entities

The package might create modules that make use of ECS. Enabling this will automatically add any necessary npm dependencies and assembly references to allow for immediate use of Unity's ECS.

Disable Auto Creation

The option shows up if Use Entities is enabled.

Directories

The following are the folders that will be accompanying the package folder where all .cs files will be written in. If the below are enabled then the folder would be generated.

Include Runtime

/Runtime folder for all play mode related scripts

Include Editor

/Editor folder for all edit mode related scripts

Include Play Mode Test

/Tests/Runtime folder for all play mode related unit tests

Include Edit Mode Test

/Tests/Editor folder for all edit mode related unit tests

Assembly References

This field can be used to add any references to other assemblies that might already exist in the project.

NPM Package Dependencies

If the package has dependencies, then the name and the version of the package can be written down here.

Package Tools

Reimport Stratkit Packages and Bootstrap

Utility designed to fix missing references in the Bootstrap Manager. It works by reimporting all the Stratkit packages along with the Bootstrap Manager. Please notice that it doesn't fix empty references, only Library inconsistencies. So if the problem persists after executing this tool, verify whether there are any actual empty references in the .prefab file and fix them manually.

Package Update

This tools automates package updates following the Semantic Version convention. It allows you to choose which packages should be updated and what type of version updated it should apply (major, minor, patch). Updates the package.json with the new version and adds the provided changelog to release-notes.md. Optionally, it can also update the package dependencies to their latest versions.

Sync Local Packages to Latest

This function is designed to manage and update local dependencies efficiently. Here's what it does:

  • Read Local Dependencies: It scans the manifest.json file for any local dependencies specified with the "file:" prefix.
  • Retrieve Versions: For each detected local dependency, the function reads the version from the corresponding package in the linked repository (stratkit).
  • Update Manifest: It then updates the manifest.json data with the latest version numbers for each package.

The updated data is saved into a new file named manifest-new.json. This approach prevents the need for redownloading, reloading, and recompiling all packages immediately. You can use this new manifest file as you see fit, such as replacing the original manifest.json or using it in another checkout.

This function streamlines the synchronization process, ensuring that your local packages are always up-to-date with the latest versions from the linked repository.

[Legacy] Module Dependency Autocompletion

It brings in the PackageToolsEditorWindow which contains the tool which scans whole project for packages and assemblies and allows to do following action in package.json files for embedded packages: * remove unused dependencies, * add missing dependencies, * update unity version and release numbers, * update existing dependencies versions, * reserialize package json file without making any pithy changes just for unifying things like indents or fields order along all package.json files.