Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# SVGImage导致Mapbox的Unity SDK中出现编译器错误_C#_Unity3d_Svg_Compiler Errors_Mapbox - Fatal编程技术网

C# SVGImage导致Mapbox的Unity SDK中出现编译器错误

C# SVGImage导致Mapbox的Unity SDK中出现编译器错误,c#,unity3d,svg,compiler-errors,mapbox,C#,Unity3d,Svg,Compiler Errors,Mapbox,我对Unity SDK有一个问题,其中“SVGImage”导致以下编译器错误的4个实例: 错误CS0246:找不到类型或命名空间名称“SVGImage”(是否缺少using指令或程序集引用?) 我已尝试将用户指令更改为UnityEngine.UI;UnityEngine.Experiative,UnityEngine.Experiative.Rendering 我不确定这里出了什么问题。这会传播到引用SVGImage的每个C#文件中 公共图像列表 public Color modeColor;

我对Unity SDK有一个问题,其中“SVGImage”导致以下编译器错误的4个实例:

错误CS0246:找不到类型或命名空间名称“SVGImage”(是否缺少using指令或程序集引用?)

我已尝试将用户指令更改为UnityEngine.UI;UnityEngine.Experiative,UnityEngine.Experiative.Rendering

我不确定这里出了什么问题。这会传播到引用SVGImage的每个C#文件中

公共图像列表

public Color modeColor;

void Awake() {

    origImagecolors = new List<Color>();
    foreach (SVGImage image in hudImages) origImagecolors.Add(image.color);
}
公共颜色模式颜色;
无效唤醒(){
origImagecolors=新列表();
foreach(hudImages中的SVGImage图像)origImagecolors.Add(image.color);
}

是否从软件包管理器安装了矢量图形软件包?我不知道我头顶的名称,但一旦你安装了Vector Graphics软件包(可能在预览软件包下,因此请确保它已被单击),然后在Visual Studio中alt单击它,你就会看到导入引用的提示。

请避免使用链接,因为链接可能会消失,并且避免使用代码图片,因为人们无法获取代码并以这种方式进行测试。我尝试添加Vector Graphics软件包,由于它破坏了与我的其他资产的关联,它又创建了13个编译器错误。您需要该软件包来使用Vector,只需修复其他编译器错误,它们只是名称空间错误,对程序集进行显式处理,就可以了