## Error building Player because scripts have compile errors in the editor

匿名 (未验证) 提交于 2019-12-02 23:03:14

1.在UnityEditor的时候要把Assets同级目录下的Editor文件夹里,如果没有就创建一个Editor文件夹里。
2.或者在unity中找到UnityEditor.dll,然后放到Assets里。

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor;   public class createAssetsBundle  {  	 	[MenuItem("MyTools/CreateBundleWindows")] 	public	static void CreateBundleWindows() 	{ 		 		string outPath = Application.streamingAssetsPath + "/Windows/"; 		Debug.Log(outPath); 		BuildPipeline.BuildAssetBundles(outPath,0,BuildTarget.StandaloneWindows64); 	}  	[MenuItem("MyTools/CreateBundleAndroid")] 	public	static void CreateBundleAndroid() 	{ 		string outPath = Application.streamingAssetsPath + "/Android/"; 		Debug.Log(outPath); 		BuildPipeline.BuildAssetBundles(outPath,0,BuildTarget.Android); 	} } 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!