Skip to content
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ Blender MCP が接続されている場合は、`addon_utils.disable` → `sys.m

- バージョンは `unitypackage_loader/blender_manifest.toml` の `version`。付け方は上記「バージョン番号のルール」を参照。
- main への push で `.github/workflows/pages.yml` が zip と `index.json` を生成し、`web/` の紹介ページと一緒に GitHub Pages に公開する。
- extensions.blender.org にも同じ `id`・同じ `version` で出す(2026-09-28 に掲載の方針を決めた。手順と審査の要件は `_local/publish_extensions_blender_org.md`)。
main にマージしたら、`extension build` で作った zip を掲載ページから新しいバージョンとしてアップロードする。
同じアドオンを 2 つの入手先から入れると両方が有効になってクラスを上書きし合うので、README と紹介ページには「どれか 1 つから入れる」と書いておく。
- 紹介ページのローカル確認: `blender ... extension build` と `server-generate` を `site/` に出したあと `python3 tools/build_site.py site <base_url>`。
Google Tag Manager は、環境変数 `GTM_ID`(無ければリポジトリ直下の `.env`。gitignore 対象)に `GTM-XXXX` 形式の ID があるときだけ埋め込む。
公開時はリポジトリの Settings > Secrets and variables > Actions > Variables の `GTM_ID` を `pages.yml` が渡す(未設定なら埋め込まない)。
Expand Down
53 changes: 39 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,55 @@ A Blender Extension that imports `.unitypackage` files directly from File > Impo

## Installation

**During development (use the repository directly)**

```sh
ln -s "$PWD/unitypackage_loader" ~/.config/blender/5.2/extensions/user_default/unitypackage_loader
```

In Blender, open Preferences > Get Extensions, run "Refresh Local" from the menu in the upper right,
and enable "Unitypackage Importer".
There are three sources and they all ship the same extension. **Install from only one of them** (see "Switching sources" below).

**Register as an Extension Repository (recommended)**

The extension is distributed via GitHub Pages. In Blender, open Preferences > Get Extensions > Repositories,
click "+", choose "Add Remote Repository", and register the following URL. You can then install and update
the extension from the list.
the extension from the list, and new versions show up as updates in Blender.

```
https://utagestudio.github.io/unitypackage_loader/index.json
```

The [same page](https://utagestudio.github.io/unitypackage_loader/) (the URL without `index.json`) shows the registration URL and a link to the zip.
The site is generated by `.github/workflows/pages.yml` on every push to main (it runs Blender's
`extension build` and `extension server-generate` in CI). Once, on first setup, set the repository's
Settings > Pages > Source to "GitHub Actions".

**Zip for distribution**
**extensions.blender.org (under review)**

The extension has been submitted to Blender's official extensions platform. Once it is listed, you will be able to
search for "Unitypackage" in Preferences > Get Extensions and install it from there.

**Install from a zip**

Drag the zip from the website onto the Blender window, or load it with "Install from Disk" in the menu at the
upper right of Preferences > Get Extensions. Installed this way, the extension is not updated automatically.

**Switching sources**

Blender treats each source (repository) as a separate extension. If the add-on is installed from two sources, both
are enabled and override each other's features, so it stops working correctly. To switch, uninstall the current copy
in Preferences > Get Extensions first, then install from the new source. Preferences are stored per source and are
not carried over.

**During development (use the repository directly)**

```sh
ln -s "$PWD/unitypackage_loader" ~/.config/blender/5.2/extensions/user_default/unitypackage_loader
```

In Blender, open Preferences > Get Extensions, run "Refresh Local" from the menu in the upper right,
and enable "Unitypackage Importer". Uninstall any copy from another source first.

Build the distribution zip with:

```sh
blender --command extension build --source-dir unitypackage_loader --output-dir dist
```

Load the generated zip via Preferences > Get Extensions > "Install from Disk".
The website and the Extension Repository are generated by `.github/workflows/pages.yml` on every push to main
(it runs Blender's `extension build` and `extension server-generate` in CI). Once, on first setup, set the
repository's Settings > Pages > Source to "GitHub Actions".

## Usage

Expand Down Expand Up @@ -233,5 +251,12 @@ files of the public repositories [lilxyzw/lilToon](https://github.com/lilxyzw/li
and from URP / HDRP (`com.unity.render-pipelines.universal` / `high-definition` 17.6) as bundled with Unity 6000.6. The
GUIDs of the light additional-data, Volume and Exposure scripts (`core/lights.py` / `core/exposure.py`) are identifiers
collected from the `.cs.meta` files of the same URP / HDRP / core packages. No shader or script code is included.

Reading binary `.mat` / `.prefab` files (`unitypackage_loader/core/unity_binary.py`) follows the descriptions in the public
projects [K0lb3/UnityPy](https://github.com/K0lb3/UnityPy) (Copyright (c) 2019-2026 K0lb3) and
[Perfare/AssetStudio](https://github.com/Perfare/AssetStudio) (Copyright (c) 2016 Radu, Copyright (c) 2016-2020 Perfare), both under the MIT License.
The common string table in that file (a list of Unity type and field names) is the same table both projects publish.
No code from them is included.

lilToon, MToon, Poiyomi, VRChat, Unity, and other names are trademarks or product names of their respective owners.
This add-on is not affiliated with Unity Technologies, VRChat Inc., or any of the shader authors.
51 changes: 38 additions & 13 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,54 @@ Unity 側のマテリアル設定とテクスチャを反映した状態で配

## インストール

**開発中(リポジトリを直接使う)**

```sh
ln -s "$PWD/unitypackage_loader" ~/.config/blender/5.2/extensions/user_default/unitypackage_loader
```

Blender の Preferences > Get Extensions で右上メニューから "Refresh Local" を実行し、
"Unitypackage Importer" を有効にします。
入手先は次の 3 つで、中身は同じです。**どれか 1 つから入れてください**(理由は下の「入手先を変えるとき」)。

**Extension Repository として登録(推奨)**

GitHub Pages で配布しています。Blender の Preferences > Get Extensions > Repositories の「+」から
"Add Remote Repository" を選び、次の URL を登録すると、一覧からインストール・更新できます。
新しい版が出ると、Blender の拡張機能の画面から更新できます。

```
https://utagestudio.github.io/unitypackage_loader/index.json
```

[同じページ](https://utagestudio.github.io/unitypackage_loader/ja/)(`index.json` を除いた URL。日本語版は `ja/`)に登録用 URL と zip のリンクを載せています。
サイトは `.github/workflows/pages.yml` が main への push ごとに生成します(Blender の
`extension build` と `extension server-generate` を CI 上で実行)。初回のみ、リポジトリの
Settings > Pages > Source を "GitHub Actions" にしてください。

**配布用 zip**
**extensions.blender.org(掲載の審査中)**

Blender 公式の拡張機能サイトへの掲載を申請しています。掲載されたら、Preferences > Get Extensions で
「Unitypackage」と検索してインストールできるようになります。

**zip から入れる**

紹介ページの zip を Blender の画面にドラッグ&ドロップするか、Preferences > Get Extensions の右上のメニューにある
"Install from Disk" で読み込みます。この方法で入れた場合は、新しい版が出ても自動では更新されません。

**入手先を変えるとき**

Blender は入手先(リポジトリ)ごとに別の拡張機能として扱うため、同じアドオンを 2 か所から入れると両方が有効になり、
互いの機能を上書きして正しく動かなくなります。入手先を変えるときは、今入っているものを Preferences > Get Extensions で
先にアンインストールしてから入れ直してください。Preferences の設定は入手先ごとに保存されるので、引き継がれません。

**開発中(リポジトリを直接使う)**

```sh
ln -s "$PWD/unitypackage_loader" ~/.config/blender/5.2/extensions/user_default/unitypackage_loader
```

Blender の Preferences > Get Extensions で右上メニューから "Refresh Local" を実行し、
"Unitypackage Importer" を有効にします。ほかの入手先から入れたものがあれば、先にアンインストールしてください。

配布用の zip は次のコマンドで作ります。

```sh
blender --command extension build --source-dir unitypackage_loader --output-dir dist
```

生成された zip を Preferences > Get Extensions > "Install from Disk" で読み込みます。
紹介ページと Extension Repository は、`.github/workflows/pages.yml` が main への push ごとに生成します(Blender の
`extension build` と `extension server-generate` を CI 上で実行)。初回のみ、リポジトリの
Settings > Pages > Source を "GitHub Actions" にしてください。

## 使い方

Expand Down Expand Up @@ -218,5 +236,12 @@ GPL-3.0-or-later([LICENSE](LICENSE))。Blender の Extension として配布
および Unity 6000.6 に同梱の URP / HDRP(`com.unity.render-pipelines.universal` / `high-definition` 17.6)の
`.shader.meta` から収集した識別子です。ライトの追加データや Volume・Exposure のスクリプトの GUID(`core/lights.py` / `core/exposure.py`)も、
同じ URP / HDRP / core のパッケージの `.cs.meta` から収集した識別子です。シェーダーやスクリプトのコードは含みません。

バイナリ形式の `.mat` / `.prefab` の読み方(`unitypackage_loader/core/unity_binary.py`)は、公開されている
[K0lb3/UnityPy](https://github.com/K0lb3/UnityPy)(Copyright (c) 2019-2026 K0lb3)と
[Perfare/AssetStudio](https://github.com/Perfare/AssetStudio)(Copyright (c) 2016 Radu, Copyright (c) 2016-2020 Perfare)の記述に基づいています。
いずれも MIT License で、同ファイルの共通文字列の表(Unity の型名・フィールド名の一覧)は両プロジェクトが公開している表と同じものです。
コードは取り込んでいません。

lilToon、MToon、Poiyomi、VRChat、Unity などの名称は各権利者の商標または製品名です。
このアドオンは Unity Technologies、VRChat Inc. および各シェーダー作者とは無関係です。
2 changes: 1 addition & 1 deletion unitypackage_loader/blender/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def _remove_created(before: dict[str, set[str]]) -> None:

def _is_removed(datablock) -> bool:
try:
datablock.name
_ = datablock.name
except ReferenceError:
return True
return False
Expand Down
1 change: 0 additions & 1 deletion unitypackage_loader/blender/toon_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def _build(tree: bpy.types.ShaderNodeTree) -> None:
tree.interface.new_socket(name="Shader", in_out="OUTPUT", socket_type="NodeSocketShader")

nodes, links = tree.nodes, tree.links
col = 0

def add(bl_idname, x, y, label=None):
node = nodes.new(bl_idname)
Expand Down
6 changes: 4 additions & 2 deletions unitypackage_loader/blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
schema_version = "1.0.0"

id = "unitypackage_loader"
version = "1.11.2"
version = "1.11.3"
name = "Unitypackage Importer"
tagline = "Import meshes, materials and textures from .unitypackage files"
maintainer = "utagestudio"
type = "add-on"
website = "https://utagestudio.github.io/unitypackage_loader/"

tags = ["Import-Export"]
tags = ["Import-Export", "Material"]
blender_version_min = "4.5.0"
license = ["SPDX:GPL-3.0-or-later"]
copyright = ["2026 utagestudio"]

# ファイルの読み書き(tar 展開・テクスチャ書き出し)に必要
[permissions]
Expand Down
2 changes: 1 addition & 1 deletion unitypackage_loader/core/profiles/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
from typing import Any

from ..material import BLACK, WHITE, AlphaMode, Lighting, NormalizedMaterial, TexRef, UnityMaterial
from ..material import AlphaMode, Lighting, NormalizedMaterial, TexRef, UnityMaterial
from ..shader_source import restrict_to_declared

__all__ = ["ShaderInfo", "ShaderTable", "ShaderProfile", "select_profile", "normalize_material"]
Expand Down
2 changes: 1 addition & 1 deletion unitypackage_loader/operators/import_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def make_opts() -> ImportOptions:
context,
path,
opts,
progress=lambda f, msg: wm.progress_update(int((base + span * f) * 100)),
progress=lambda f, msg, base=base, span=span: wm.progress_update(int((base + span * f) * 100)),
prepared=prepared,
)
reports.append(report)
Expand Down
Loading