Unity3D的NGUI插件导入工程后提示错误:UnityEngine.QualitySettings、 GetQualityLevel
错误代码如下:Assets/NGUI/Examples/Scripts/Other/ShaderQuality.cs(18,48):errorCS0117:`UnityE...
错误代码如下:
Assets/NGUI/Examples/Scripts/Other/ShaderQuality.cs(18,48): error CS0117: `UnityEngine.QualitySettings' does not contain a definition for `GetQualityLevel'
范例的场景也打不开,求高手,怎么解决啊?
出错的脚本ShaderQuality,代码如下:
using UnityEngine;
/// <summary>
/// Change the shader level-of-detail to match the quality settings.
/// </summary>
[ExecuteInEditMode]
[AddComponentMenu("NGUI/Examples/Shader Quality")]
public class ShaderQuality : MonoBehaviour
{
int mCurrent = 600;
void Update ()
{
#if UNITY_3_4
int current = ((int)QualitySettings.currentLevel + 1) * 100;
#else
int current = (QualitySettings.GetQualityLevel() + 1) * 100;
#endif
if (mCurrent != current)
{
mCurrent = current;
Shader.globalMaximumLOD = mCurrent;
}
}
} 展开
Assets/NGUI/Examples/Scripts/Other/ShaderQuality.cs(18,48): error CS0117: `UnityEngine.QualitySettings' does not contain a definition for `GetQualityLevel'
范例的场景也打不开,求高手,怎么解决啊?
出错的脚本ShaderQuality,代码如下:
using UnityEngine;
/// <summary>
/// Change the shader level-of-detail to match the quality settings.
/// </summary>
[ExecuteInEditMode]
[AddComponentMenu("NGUI/Examples/Shader Quality")]
public class ShaderQuality : MonoBehaviour
{
int mCurrent = 600;
void Update ()
{
#if UNITY_3_4
int current = ((int)QualitySettings.currentLevel + 1) * 100;
#else
int current = (QualitySettings.GetQualityLevel() + 1) * 100;
#endif
if (mCurrent != current)
{
mCurrent = current;
Shader.globalMaximumLOD = mCurrent;
}
}
} 展开
3个回答
展开全部
同意!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
注释掉即可
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询