Image of how SVGImage appears in IDE Unity SDK出现问题,其中“SVGImage”导致以下编译器错误的4个实例:
错误CS0246:找不到类型或 namespace 名称'SVGImage'(您是否缺少using指令或程序集引用?)
我尝试将用户指令更改为UnityEngine.UI; UnityEngine.Experimental,UnityEngine.Experimental.Rendering。
我不确定这里出了什么问题。这遍及引用SVGImage的每个C#文件。
公开列表hudImages;
public Color modeColor;
void Awake() {
origImagecolors = new List<Color>();
foreach (SVGImage image in hudImages) origImagecolors.Add(image.color);
}
最佳答案
您是否从软件包管理器安装了Vector Graphics软件包?我不知道我的头顶名称,但是一旦安装了Vector Graphics软件包(可能在预览软件包下,请确保单击了它),然后在Visual Studio中按住Alt单击它,您应该会看到导入提示引用资料。
关于c# - SVGImage在Mapbox的Unity SDK中导致编译器错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/61602199/