我有一个问题(统一编辑)可以帮助我吗? [英] I have a problem (unity editor) can some one help me?

查看:67
本文介绍了我有一个问题(统一编辑)可以帮助我吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用此命令时,它说错误CS1525意外的符号'Application':



Application.Quit();





这是我在Microsoft visual studio中写的:



使用UnityEngine;



公共课学分:MonoBehaviour {



public void Quit()

{

Debug.Log(退出)

Application.Quit();

}

}



我尝试了什么:



我试图使用程序给我的解决方案并且它没有工作

it says error CS1525 Unexpected symbol 'Application' when I try to use this command:

Application.Quit();


here is what I wrote in Microsoft visual studio:

using UnityEngine;

public class Credits : MonoBehaviour {

public void Quit()
{
Debug.Log("QUIT")
Application.Quit();
}
}

What I have tried:

I tried to use the solutions that the program gave me and it didn't worked

推荐答案

正如Richard指出的那样,你在Debug.Log()语句的末尾没有分号(;)。因此,编译器告诉您它不希望看到Application。
As Richard pointed out you do not have a semi-colon (;) at the end of the Debug.Log() statement. So, the compiler is telling you that it did not expect to see Application.


这篇关于我有一个问题(统一编辑)可以帮助我吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆