错误CS0117:“ Mathf”不包含“乒乓”的定义

时间:2019-12-29 15:55:30

标签: c# unity3d

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);
    }
}

我一直收到标题中所述的错误,我不知道为什么。在统一手册中,它说它是被统一认可的,但是由于某种原因我没有得到它。

0 个答案:

没有答案