From 8b8c69a024580255bde699d4141f4c748dd0f72c Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Mon, 26 Oct 2020 11:57:02 +0100 Subject: [PATCH] Fix volument component creation via script --- .../Runtime/Volume/VolumeProfile.cs | 4 ++++ com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 2 files changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs index a687a86fb4d..4e97e2f1f92 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs @@ -75,6 +75,10 @@ public VolumeComponent Add(Type type, bool overrides = false) throw new InvalidOperationException("Component already exists in the volume"); var component = (VolumeComponent)CreateInstance(type); +#if UNITY_EDITOR + component.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy; + component.name = type.Name; +#endif component.SetAllOverridesTo(overrides); components.Add(component); isDirty = true; diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 288b1580fbe..156a56b2ed5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -49,6 +49,7 @@ The version number for this package has increased due to a version update of a r - Fixed issues with physically-based DoF, improved speed and robustness - Fixed a warning happening when putting the range of lights to 0. - Fixed issue when null parameters in a volume component would spam null reference errors. Produce a warning instead. +- Fix volument component creation via script. ### Changed - Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass.