标题: C#写的脚本,作用是鼠标拖动物体,但是出现了错误 [打印本页] 作者: 雅雅 时间: 2013-6-29 15:57 标题: C#写的脚本,作用是鼠标拖动物体,但是出现了错误 代码如下:
using System.Collections; public class clickmove : MonoBehaviour { // Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Assets/script/clickmove.cs(20,65): error CS1502: The best overloaded method match for `UnityEngine.Camera.ScreenToWorldPoint(UnityEngine.Vector3)' has some invalid arguments
(Filename: Assets/script/clickmove.cs Line: 20) Assets/script/clickmove.cs(20,65): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Vector3'
(Filename: Assets/script/clickmove.cs Line: 20) Assets/script/clickmove.cs(28,50): error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
(Filename: Assets/script/clickmove.cs Line: 28) Refresh, detecting if any assets need to be imported or removed ... 0.001411 seconds (Nothing changed)