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行。