# make-unitypackage

> make unitypackage! (browser compatible)

Latest version **1.1.2** (published 2026-05-10) · Zlib license · 0 weekly downloads

## Install

```sh
npm install make-unitypackage
pnpm add make-unitypackage
yarn add make-unitypackage
bun add make-unitypackage
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2026-05-10 |
| First published | 2021-01-31 |
| Weekly downloads | 0 |
| License | Zlib |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | narazaka |
| Maintainers | narazaka |
| Keywords | unity, unitypackage |

## Links

- npm: https://www.npmjs.com/package/make-unitypackage
- Repository: https://github.com/Narazaka/make-unitypackage
- Homepage: https://github.com/Narazaka/make-unitypackage#readme
- Issues: https://github.com/Narazaka/make-unitypackage/issues
- npm.io page: https://npm.io/package/make-unitypackage

## Dependencies (2)

- [fflate](https://npm.io/package/fflate.md) ^0.8.2
- [tar-js](https://npm.io/package/tar-js.md) ^0.3.0

## Recent versions

- 1.1.2 (latest) — 2026-05-10
- 1.1.1 — 2026-05-10
- 1.0.0 — 2021-01-31

## README

# make-unitypackage

make unitypackage! (browser compatible)

## Install

https://www.npmjs.com/package/make-unitypackage

```bash
npm install make-unitypackage
```

## Usage

node:

```typescript
import { makeUnityPackage } from "make-unitypackage";
import { FSO } from "fso";

const assets = new FSO("./Assets");
const files = [];
for (const entry of assets.join("Foo").childrenAllSync().filter(entry => !entry.isDirectorySync())) {
    files.push({
        path: entry.path,
        data: new Uint8Array(entry.readFileSync()),
    });
}

const unitypackage = makeUnityPackage(files);
new FSO("a.unitypackage").writeFileSync(unitypackage);
```

browser:

```typescript
import { makeUnityPackage } from "make-unitypackage";

const files = [
    {
        path: "Assets/Foo/Bar.cs",
        data: new Uint8Array(new TextEncoder().encode("using UnityEngine; public class Bar : MonoBehaviour { public GameObject obj; }")),
    },
    {
        path: "Assets/Foo/Bar.cs.meta",
        data: new Uint8Array(new TextEncoder().encode("fileFormatVersion: 2\nguid: 02b4f861808199e4a904bba10680f423\n")),
    }
];

const unitypackage = makeUnityPackage(files);
```

## License

[Zlib](LICENSE)

---
_Source: https://npm.io/package/make-unitypackage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
