`urp-postprocessing`: Global Volume template's `profile.Add<T>()` overrides are lost after Editor restart (never added as sub-assets)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Read skills/urp-postprocessing/references/code-templates.md at “Creating a Global Volume with Effects” and the cited sections of skills/urp-postprocessing/SKILL.md. Check how the template adds components and how the skill describes persistence and diagnostics. Update the guidance and template to account for Editor asset persistence; done when newly added overrides survive an asset reload and the documented checks identify missing sub-assets.
索引モデルが issue の本文から書いたものです。
説明
Plugin: 0.1.8-beta (main @ 3831ddb) · Unity: 6000.6.7f1 · URP / SRP Core: 17.6.0
Problem
skills/urp-postprocessing/references/code-templates.md, "Creating a Global Volume with Effects" (L19–43):
AssetDatabase.CreateAsset(profile, …)profile.Add<Bloom>()/profile.Add<Tonemapping>()SetDirty(profile)+AssetDatabase.SaveAssets()
The added VolumeComponents are never stored as sub-assets of the profile. Everything looks right for the rest of the session, but after an Editor restart (or any reload of the asset) the profile has no overrides. We hit exactly this: a color-grading profile built this way came back empty after restarting the Editor.
SKILL.md L111, L141, L148, L156 present profile.Add<T>() as the way to add overrides, with no Editor-persistence caveat.
Why
VolumeProfile.Add(Type, bool)(com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.csL109–123) only doesCreateInstance(type)+components.Add(component)— noAssetDatabase.AddObjectToAsset, so the component lives in memory only and the reference does not survive serialization. On the next loadVolumeProfile.OnEnablerunscomponents.RemoveAll(x => x == null).- Unity's own Editor code always pairs
AddwithAddObjectToAsset:Editor/Volume/VolumeComponentListEditor.cs(inspector "Add Override", L518:AssetDatabase.AddObjectToAsset(component, asset)),Editor/Volume/VolumeProfileFactory.cs(VolumeProfileFactory.CreateVolumeComponent<T>, L109),Editor/Volume/VolumeProfileUtils.cs.
The skill's own checks don't catch it
SKILL.mdL87–91 only warns whenprofile.components.Count == 0; in the same session the list still holds the in-memory instances, so it reports the setup as correct.code-templates.mdL123–125 saysSaveAssets()persists the profile — true for editing existing overrides, not for newly added ones.
Suggested fix
- In the template, after each
Add<T>():UnityEditor.AssetDatabase.AddObjectToAsset(bloom, profile);— or useUnityEditor.Rendering.VolumeProfileFactory.CreateVolumeComponent<T>(profile, overrides: true, saveAsset: false), thenSaveAssets()once. - Key Facts: "On a profile asset in the Editor,
Add<T>()alone is in-memory only; also callAssetDatabase.AddObjectToAsset. A runtimevolume.profileinstance doesn't need it." - Diagnostic: also warn when
EditorUtility.IsPersistent(profile)and any component has!AssetDatabase.IsSubAsset(c).
- 主要言語
- C#
- スター
- 590
- フォーク
- 67
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Unity-Technologies/unity-agent-plugin のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
Unity-Technologies/unity-agent-plugin#118 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Unity-Technologies/unity-agent-plugin#105 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Unity-Technologies/unity-agent-plugin#103 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`ui-uitk`: USS Restrictions table bans `filter` and `transition-property`, both supported in Unity 6オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
Unity-Technologies/unity-agent-plugin#102 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
Unity-Technologies/unity-agent-plugin の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
Bug: Needs Replicating
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
space-wizards/RobustToolbox#7189 ·
メンテナーはふだん 1 日以内に返信
-
affected/v17 area/frontend type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
umbraco/Umbraco-CMS#24491 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/microsoft-ui-reactor#1460 ·
メンテナーはふだん 1 日以内に返信
-
coderabbit reviewオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CodeForFire/lagebuch#912 ·
メンテナーはふだん 1 日以内に返信