自己可以根据需要修改发射方式

easy!  :)
    LineRenderer _lineRenderer;
    float _timer;
    void Awake()
    {
        _lineRenderer = this.transform.GetComponent<LineRenderer>();
        StartCoroutine(showLaser());
    }
    IEnumerator showLaser()
    {
        while (_timer < 2.5f)
        {
            _timer += 0.1f;
            _lineRenderer.SetPosition(0, new Vector3(_timer, _timer, 0));
            yield return new WaitForSeconds(0.1f);
        }
    }