【发布时间】:2020-11-06 03:54:19
【问题描述】:
我是 Unity 新手,所以不要生气)
我尝试构建我的游戏,但出现了这些错误:
-Assets\Scripts\PlayerMovement.cs(5,19):错误 CS0234:命名空间“UnityEngine”中不存在类型或命名空间名称“WSA”(您是否缺少程序集引用?)
-Assets\Scripts\SpawnMovePoint.cs(4,19):错误 CS0234:命名空间“UnityEditor”中不存在类型或命名空间名称“Build”(您是否缺少程序集引用?)
-构建播放器时出错,因为脚本存在编译器错误
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.Build.Reporting; // Problem Line
using UnityEngine;
using UnityEngine.SceneManagement;
public class SpawnMovePoint : MonoBehaviour
{
public Transform left, right, _point;
float MinX, MaxX;
public void Start()
{
MinX = left.position.x;
MaxX = right.position.x;
}
public void CreatePoint()
{
_point.position = new Vector3(Random.Range(MinX,
MaxX),_point.position.y,_point.position.z);
}
}
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine.WSA;//Problem Line
public class PlayerMovement : MonoBehaviour
我应该怎么做才能修复它们? 我怎样才能做这些参考? 这是什么意思,'UnityEditor'中不存在什么'Build'?
【问题讨论】:
标签: c# visual-studio unity3d