`urp-postprocessing`: Global Volume template's `profile.Add<T>()` overrides are lost after Editor restart (never added as sub-assets)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- documentation, game-dev
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- C#
- Star
- 590
- Fork
- 67
- Merge trung bình
- 3 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Unity-Technologies/unity-agent-plugin
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Unity-Technologies/unity-agent-plugin#118 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Unity-Technologies/unity-agent-plugin#105 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Unity-Technologies/unity-agent-plugin#103 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`ui-uitk`: USS Restrictions table bans `filter` and `transition-property`, both supported in Unity 6Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Unity-Technologies/unity-agent-plugin#102 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Unity-Technologies/unity-agent-plugin
Issue tương tự
-
enhancement needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/microsoft-ui-reactor#1460 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dotnet/maui#39950 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CommunityToolkit/Datasync#600 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NimblePros/deviq-hugo#121 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
RANDOM_REPLACE does not keep the date format when the month abbreviation has a trailing periodĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
philterd/phileas-dotnet#188 ·