using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BackForthMovement : MonoBehaviour
{
public float speed = 2.5f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.position = new Vector3(Mathf.Pingpong (Time.time * speed, 5), transform.position.y, transform.position.z);
}
}
我一直收到标题中所述的错误,我不知道为什么。在统一手册中,它说它是被统一认可的,但是由于某种原因我没有得到它。