`urp-postprocessing`: Global Volume template's `profile.Add<T>()` overrides are lost after Editor restart (never added as sub-assets)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- documentation, game-dev
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- C#
- Estrellas
- 590
- Forks
- 67
- Merge medio
- 3 d 4 h
- PR fusionados (30 d)
- 13
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Unity-Technologies/unity-agent-plugin
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
Unity-Technologies/unity-agent-plugin#118 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Unity-Technologies/unity-agent-plugin#105 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Unity-Technologies/unity-agent-plugin#103 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
`ui-uitk`: USS Restrictions table bans `filter` and `transition-property`, both supported in Unity 6Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Unity-Technologies/unity-agent-plugin#102 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de Unity-Technologies/unity-agent-plugin
Issues similares
-
enhancement needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/microsoft-ui-reactor#1460 ·
Los mantenedores suelen responder en 1 día
-
t/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dotnet/maui#39950 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CommunityToolkit/Datasync#600 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NimblePros/deviq-hugo#121 ·
Los mantenedores suelen responder en 1 día
-
RANDOM_REPLACE does not keep the date format when the month abbreviation has a trailing periodAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
philterd/phileas-dotnet#188 ·