Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 错误资产/qwe.cs(22,35):错误CS1525:意外符号`<;内部>';Unity3D_C#_Unity3d - Fatal编程技术网

C# 错误资产/qwe.cs(22,35):错误CS1525:意外符号`<;内部>';Unity3D

C# 错误资产/qwe.cs(22,35):错误CS1525:意外符号`<;内部>';Unity3D,c#,unity3d,C#,Unity3d,代码中有什么问题?多谢各位 using UnityEngine; using System.Collections; public class qwe : MonoBehaviour { public GameObject cube; public float speed=500; GameObject zxc; // Update is called once per frame void Update () { if(Input.G

代码中有什么问题?多谢各位

using UnityEngine;
using System.Collections;

public class qwe : MonoBehaviour {
    public GameObject cube;
    public float speed=500;
    GameObject zxc;

    // Update is called once per frame
    void Update () {
        if(Input.GetButtonUp("Jump")){
            GameObject CUBE = (GameObject)Instantiate(cube, transform.position, transform.rotation);
            CUBE.rigidbody.AddForce(new Vector3(-speed,0,0));
        }
    }

    void OnCollisionEnter (Collision theCollision)
    {
        if(theCollision.gameObject.name == “cube”)
        {
            Destroy(theCollision.gameObject);
            Debug.Log(“We have hit the wall”);
        }
    }

}
使用以下“”引号:

Debug.Log("We have hit the wall");
Debug.Log(“We have hit the wall”);
用引号代替“”表示:

Debug.Log("We have hit the wall");
Debug.Log(“We have hit the wall”);

代码是否真的包含那些不正确的
“cutesy”
-引号?如果是这样,请修复它们,使其看起来像
“this”
。还有,哪一行是第22行?如果你从开始算起,那就是第22行。