Skip to content

Commit 819eda1

Browse files
Fix volument component creation via script #2369
1 parent 8a0ce08 commit 819eda1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public VolumeComponent Add(Type type, bool overrides = false)
7575
throw new InvalidOperationException("Component already exists in the volume");
7676

7777
var component = (VolumeComponent)CreateInstance(type);
78+
#if UNITY_EDITOR
79+
component.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
80+
component.name = type.Name;
81+
#endif
7882
component.SetAllOverridesTo(overrides);
7983
components.Add(component);
8084
isDirty = true;

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2020
- Fixed Custom Post Processes affecting preview cameras.
2121
- Fixed serialization issue with matcap scale intensity.
2222
- Fixed XR shadows culling
23+
- Fixed volument component creation via script.
2324

2425
### Changed
2526
- Removed XRSystemTests. The GC verification is now done during playmode tests (case 1285012).

0 commit comments

Comments
 (0)