diff --git a/Packages/src/Runtime/UIParticle.cs b/Packages/src/Runtime/UIParticle.cs index 77e802f..07eb4a1 100644 --- a/Packages/src/Runtime/UIParticle.cs +++ b/Packages/src/Runtime/UIParticle.cs @@ -602,10 +602,7 @@ namespace Coffee.UIExtensions // Create baking camera. if (!_bakeCamera) { - var go = new GameObject("[generated] UIParticle BakingCamera") - { - hideFlags = HideFlags.HideAndDontSave - }; + var go = new GameObject("[generated] UIParticle BakingCamera"); go.SetActive(false); go.transform.SetParent(transform, false); _bakeCamera = go.AddComponent(); @@ -624,6 +621,9 @@ namespace Coffee.UIExtensions _bakeCamera.renderingPath = RenderingPath.Forward; _bakeCamera.useOcclusionCulling = false; + _bakeCamera.gameObject.SetActive(false); + _bakeCamera.gameObject.hideFlags = HideFlags.HideAndDontSave; + return _bakeCamera; } }