- Expression denotes a
type', where a
variable’,value' or
method group’ was expected
代码
if(GUI.Button(Rect(Screen.width-100,40,80,20), "stop")){
anim.SetBool ("Next", false);
}
错误信息
Expression denotes a
type', where a
variable’,value' or
method group’ was expected
修正
if(GUI.Button(new Rect(Screen.width-100,40,80,20), "stop")){
anim.SetBool ("Next", false);
}
- 按照AR的简单示例搭建,从Vuforia官网下载ImageTarget包后导入Unity中,然后拖拽ARCarmra和ImageTarget后进行参数设置,可是在加载MyARTest Database后,图片始终是一片空白,ImageTargetTextfile的图标也无法显示,但生成出的app是可以正常使用的,但没有图片就无法找到图片中准确的位置去加入模型。
解决:在Project-Editor-QCAR里一层层的找到图片的jpg图,然后选中它右边的第一项single channel改为default,下面的cube改为2D,然后点击apply,然后再看imageTarget就有图片了。 - UI中加入Image图片无法拖入
在将图片拖入到Assets后发现根本不能将图片拖入到UI中,新建Image后在Source Image中也不能找到图片。
解决:将图片设置为Sprite。