我可以给你编写一段代码,用来实现按下空格键物体缓慢自动拉伸3米的功能。public class AutoStretch : MonoBehaviour { public float stretchSpeed = 0.01f; public float stretchDistance = 3f; private float currentStretch = 0f; void Update () { if (Input.GetKeyDown(KeyCode.Space)) { currentStretch = 0f;