fix: generated baking-camera object remains in the prefab or scene (again)
parent
2ac8a1175b
commit
d3532b9708
|
@ -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<Camera>();
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue