feat: project-wide default view size for baking

close #360
This commit is contained in:
mob-sakai
2026-06-25 12:58:14 +09:00
parent 733901436d
commit bc5a1f4435
4 changed files with 46 additions and 10 deletions

View File

@@ -263,6 +263,13 @@ namespace Coffee.UIExtensions
set => m_CustomViewSize = Mathf.Max(0.1f, value);
}
/// <summary>
/// View size for Baking.
/// </summary>
public float viewSizeForBaking => useCustomView
? m_CustomViewSize
: UIParticleProjectSettings.defaultViewSizeForBaking;
/// <summary>
/// Time scale multiplier.
/// </summary>
@@ -718,7 +725,7 @@ namespace Coffee.UIExtensions
if (_bakeCamera != null)
{
_bakeCamera.orthographicSize = useCustomView ? customViewSize : 10;
_bakeCamera.orthographicSize = viewSizeForBaking;
return _bakeCamera;
}
@@ -745,7 +752,7 @@ namespace Coffee.UIExtensions
// Setup baking camera.
_bakeCamera.enabled = false;
_bakeCamera.orthographicSize = useCustomView ? customViewSize : 10;
_bakeCamera.orthographicSize = viewSizeForBaking;
_bakeCamera.transform.SetPositionAndRotation(new Vector3(0, 0, -1000), Quaternion.identity);
_bakeCamera.orthographic = true;
_bakeCamera.farClipPlane = 2000f;