您的位置:首页 > 移动开发 > Unity3D

Unity3d Error---Build failed : Asset is marked as don't save

2013-10-28 22:39 453 查看
In a script I had:
public class RoadManager : MonoBehaviour{

public GUIStyle centerStyle;
public GUIStyle RCP_LabelStyle;
public GUIStyle RCP_PlusStyle;
}
[/code]

and in and Editor Script I did something like this
roadmanger.centerstyle = EditorStyles.bold;
//Modified some attributes, etc etc
[/code]

this saved editor information into a the object, and internal graphics, and referances to other editor info. I still want to keep these referances for my Custom inspector, so I did this to make it so the info
doesn't come into a build
public class RoadManager : MonoBehaviour{

#if UNITY_EDITOR
public GUIStyle centerStyle;
public GUIStyle RCP_LabelStyle;
public GUIStyle RCP_PlusStyle;
#endif
}
[/code]

Hopes this saves someone the headache i went through :)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐