C# 在Unity 5.5编辑器中获取警告
在Unity5.5编辑器中,我收到了几个警告,其中两个警告包括: 我将如何着手解决这些错误,因为通过阅读这些错误,我已经注意到我可能必须更改图形设备类型,但首先我不确定这是否是解决方案,其次,即使是,我也不完全确定我将如何这样做 编辑: 我不确定这是否相关,是否能够帮助你们,但我也收到了如下错误: Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs(54,41):警告CS0618:C# 在Unity 5.5编辑器中获取警告,c#,unity3d,C#,Unity3d,在Unity5.5编辑器中,我收到了几个警告,其中两个警告包括: 我将如何着手解决这些错误,因为通过阅读这些错误,我已经注意到我可能必须更改图形设备类型,但首先我不确定这是否是解决方案,其次,即使是,我也不完全确定我将如何这样做 编辑: 我不确定这是否相关,是否能够帮助你们,但我也收到了如下错误: Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs(54,41):警告CS0618:UnityEdit.TextureImporter
UnityEdit.TextureImporter.textureFormat'已过时:
textureFormat不再可在TextureImporter级别访问。对于旧的“简单”格式,将textureCompression属性用于等效的自动选择(对于TrueColor为Uncompressed,对于16位为Compressed和HQCommpressed)。对于特定于平台的格式,请使用[[PlatformTextureSettings]]API。使用此设置器将设置各种参数,以尽可能匹配新的自动系统。Getter将返回最后一个值集。'
Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs(54,41):
警告CS0618:UnityEditor.TextureImporter.textureFormat'
过时:textureFormat在TextureImporter上不再可访问
水平。对于旧的“简单”格式,请使用textureCompression属性
对于等效的自动选择(对于TrueColor未压缩,
压缩和HQCommpressed(16位)。针对特定平台
格式使用[[PlatformTextureSettings]]API。使用这个setter
将根据需要设置各种参数以匹配新的自动系统
很有可能。Getter将返回最后一个值集。'
这只是说类中的属性现在已过时/不推荐使用
在新的Unity 5.5版本中,ImageEffect
脚本尚未更新以删除警告。尽管如此,这不应该阻止他们工作
您通常应该忽略这些警告,因为您没有编写它们,Unity可能会在将来修复它们
如果您还想在Unity之前修复它们:
1。从Assets/Editor/ImageEffects打开ColorCorrectionLookupEditor.cs
脚本
在第54行,更换
if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor)
textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
与
2。在第62行,更换
if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor)
textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
与
3。打开MotionBlur.cs
Assets/Standard Assets/Effects/ImageEffects/Scripts中的脚本
SystemInfo.supportsRenderTextures
不推荐使用
删除第24行至第28行,代码如下:
if (!SystemInfo.supportsRenderTextures)
{
enabled = false;
return;
}
4。打开postfectsbase.cs
Assets/Standard Assets/Effects/ImageEffects/Scripts中的脚本
在第115行,替换
if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor)
textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
与
这将解决所有图像效果警告。
至于:
平台LinuxStandaloneSupport只有一个受支持的图形设备
类型(OpenGL核心)
及
平台MacStandaloneSupport不支持图形设备类型
OpenGL
那是一只虫子。只是暂时忽略它们。你可以更新Unity,看看它是否被修复,因为我看不到我这边的错误,我也不知道你的Unity版本
Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs(54,41):
警告CS0618:UnityEditor.TextureImporter.textureFormat'
过时:textureFormat在TextureImporter上不再可访问
水平。对于旧的“简单”格式,请使用textureCompression属性
对于等效的自动选择(对于TrueColor未压缩,
压缩和HQCommpressed(16位)。针对特定平台
格式使用[[PlatformTextureSettings]]API。使用这个setter
将根据需要设置各种参数以匹配新的自动系统
很有可能。Getter将返回最后一个值集。'
这只是说类中的属性现在已过时/不推荐使用
在新的Unity 5.5版本中,ImageEffect
脚本尚未更新以删除警告。尽管如此,这不应该阻止他们工作
您通常应该忽略这些警告,因为您没有编写它们,Unity可能会在将来修复它们
如果您还想在Unity之前修复它们:
1。从Assets/Editor/ImageEffects打开ColorCorrectionLookupEditor.cs
脚本
在第54行,更换
if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor)
textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
与
2。在第62行,更换
if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor)
textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
与
3。打开MotionBlur.cs
Assets/Standard Assets/Effects/ImageEffects/Scripts中的脚本
SystemInfo.supportsRenderTextures
不推荐使用
删除第24行至第28行,代码如下:
if (!SystemInfo.supportsRenderTextures)
{
enabled = false;
return;
}
4。打开postfectsbase.cs
Assets/Standard Assets/Effects/ImageEffects/Scripts中的脚本
在第115行,替换
if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor)
textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
与
这将解决所有图像效果警告。
至于:
平台LinuxStandaloneSupport只有一个受支持的图形设备
类型(OpenGL核心)
及
平台MacStandaloneSupport不支持图形设备类型
OpenGL
那是一只虫子。只是暂时忽略它们。您可以更新Unity以查看是否已修复,因为我看不到我这边的错误,也不知道您的Unity版本。在问题文本中包含警告。关于SO的问题和答案可能有外部链接,但不应依赖于重要内容。ok sry@Cubic..这与c#有什么关系?因为据我所知,如果我错了,可以使用代码@CamiloTerevinto sry解决这个问题…这与c#无关。很可能是某些图形设备类型不支持您指定的着色器。请在问题文本中包含警告。问题和答案,所以可能有