SpriteShape not getting rendered when enlarged

Hello,

I have an issue using the SpriteShapeController und SpriteShapeRenderer in Unity 2022.3.7 and com.unity.2d.spriteshape in Version 9.0.2. Without changing the spline of the SpriteShapeController it shows a white square. When the camera frustum does not show this white square initally when entering the playmode and a new created spline during runtime is set, which is much larger then the initial square, it is not shown then. It should at least be rendered a part of the sprite shape on the screen. But it seems that the initial kind of frustum culling is not invalidated when the shape changes. How to solve this issue?

This is the code updating the spline of the SpriteShapeController:
MonoBehavior for adjusting the spline of the SpriteShapeController

using System;

using UnityEngine;
using UnityEngine.U2D;

namespace Screens.Various.Graphics1.Scripts
{
  public class SomeTestForSpriteShape : MonoBehaviour
  {
    private SpriteShapeController _spriteShapeController;
    private SpriteShapeRenderer _spriteShapeRenderer;
    private bool _wasSplineCreated;

    private void Awake()
    {
      this._spriteShapeController = this.GetComponent<SpriteShapeController>();
      this._spriteShapeRenderer = this.GetComponent<SpriteShapeRenderer>();
    }

    private void Update()
    {
      if (!this._wasSplineCreated && Time.unscaledTime > 5f)
      {
        var spline = this._spriteShapeController.spline;
        var radius = 5;
        float bezierTangentCircleCurveLength = 0.55228f * radius;
    
        spline.Clear();
    
        spline.InsertPointAt(0, new Vector3(0, 1 * radius, 0));
        spline.InsertPointAt(1, new Vector3(-1 * radius, 0, 0));
        spline.InsertPointAt(2, new Vector3(0, -1 * radius, 0));
        spline.InsertPointAt(3, new Vector3(1 * radius, 0, 0));
    
        spline.SetTangentMode(0, ShapeTangentMode.Broken);
        spline.SetTangentMode(1, ShapeTangentMode.Broken);
        spline.SetTangentMode(2, ShapeTangentMode.Broken);
        spline.SetTangentMode(3, ShapeTangentMode.Broken);
    
        spline.SetLeftTangent(0, new Vector3(bezierTangentCircleCurveLength, 0, 0));
        spline.SetRightTangent(0, new Vector3(-bezierTangentCircleCurveLength, 0, 0));
        spline.SetLeftTangent(1, new Vector3(0, bezierTangentCircleCurveLength, 0));
        spline.SetRightTangent(1, new Vector3(0, -bezierTangentCircleCurveLength, 0));
        spline.SetLeftTangent(2, new Vector3(-bezierTangentCircleCurveLength, 0, 0));
        spline.SetRightTangent(2, new Vector3(bezierTangentCircleCurveLength, 0, 0));
        spline.SetLeftTangent(3, new Vector3(0, -bezierTangentCircleCurveLength, 0));
        spline.SetRightTangent(3, new Vector3(0, bezierTangentCircleCurveLength, 0));

        this._spriteShapeController.RefreshSpriteShape();
    
        this._wasSplineCreated = true;
      }
    }
  }
}

Edit: Clarified the issue a bit more.

Hello, this is likely due to the bounds of the spriteshape not being updated
You could try this sample script to update it during runtime:

This uses the SetLocalAABB API in SpriteShapeRenderer

Alternatively, you can use the Bounds Scale field added in Spriteshape 10.0.0 and above for Unity 2023 to extend the bounds
9285433--1301302--upload_2023-9-11_11-12-22.png

Thanks, I appreciate your answer and your help. Indeed using SetLocalAABB with the new bounds fully solved the issue.