Cs1513 c#期望统一
本文关键字:期望 Cs1513 | 更新日期: 2023-09-27 18:01:32
大家好,我是Unity脚本的新手,我不能处理这个问题,请有人帮助我
下面是代码:using UnityEngine;
using System.Collections;
public class testScript : MonoBehaviour
{
int i = 1;
// Use this for initialization
void Start()
{
for (i = 1; i > 6; i++)
{
Debug.Log("value of i = " + i);
}
Debug.Log("i'm out of the loop");
} //the problem is cs1513 c# expected unity here(21.line)
// Update is called once per frame
void Update()
{
}
程序,我使用Microsoft Visual Studio
提前感谢!!
您只在脚本末尾缺少}
。最后一个}
应该关闭{
类。这可能是你不小心删除的。有时,Unity无法识别脚本更改。如果修改后这个问题仍然存在,只需关闭并重新打开Unity和Visual Studio/MonoDevelop。
using UnityEngine;
using System.Collections;
public class testScript : MonoBehaviour
{
int i = 1;
// Use this for initialization
void Start()
{
for (i = 1; i > 6; i++)
{
Debug.Log("value of i = " + i);
}
Debug.Log("i'm out of the loop");
} //the problem is cs1513 c# expected unity here(21.line)
// Update is called once per frame
void Update()
{
}
}//<====This you missed.