fix: generated baking-camera object remains in the prefab or scene (again)
parent
ae3f3a8e62
commit
de35cba34c
|
@ -602,10 +602,7 @@ namespace Coffee.UIExtensions
|
||||||
// Create baking camera.
|
// Create baking camera.
|
||||||
if (!_bakeCamera)
|
if (!_bakeCamera)
|
||||||
{
|
{
|
||||||
var go = new GameObject("[generated] UIParticle BakingCamera")
|
var go = new GameObject("[generated] UIParticle BakingCamera");
|
||||||
{
|
|
||||||
hideFlags = HideFlags.HideAndDontSave
|
|
||||||
};
|
|
||||||
go.SetActive(false);
|
go.SetActive(false);
|
||||||
go.transform.SetParent(transform, false);
|
go.transform.SetParent(transform, false);
|
||||||
_bakeCamera = go.AddComponent<Camera>();
|
_bakeCamera = go.AddComponent<Camera>();
|
||||||
|
@ -624,6 +621,9 @@ namespace Coffee.UIExtensions
|
||||||
_bakeCamera.renderingPath = RenderingPath.Forward;
|
_bakeCamera.renderingPath = RenderingPath.Forward;
|
||||||
_bakeCamera.useOcclusionCulling = false;
|
_bakeCamera.useOcclusionCulling = false;
|
||||||
|
|
||||||
|
_bakeCamera.gameObject.SetActive(false);
|
||||||
|
_bakeCamera.gameObject.hideFlags = HideFlags.HideAndDontSave;
|
||||||
|
|
||||||
return _bakeCamera;
|
return _bakeCamera;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue