• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by kramcomposer · Dec 14, 2012 at 04:12 PM · build-error

Build failed : Asset is marked as don't save

I keep getting this error, and I have no idea why:

An asset is marked as dont save, but is included in the build: UnityEditor.HostView:OnGUI()

Building to PC tried both x32 and x64

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mr_blahblah · Jul 12, 2016 at 08:23 AM 0
Share

Having the same problem, but I'm not using NGUI. Very frustrating - tried all the solutions suggested in this thread with no luck. Unity v5x

8 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by kramcomposer · Dec 14, 2012 at 07:31 PM

Woot Figured it Out, So... heres the answer to anyone else who has this odd Error:

In a script I had:

 public class RoadManager : MonoBehaviour{
     
         public GUIStyle centerStyle;
         public GUIStyle RCP_LabelStyle;
         public GUIStyle RCP_PlusStyle;
 }

and in and Editor Script I did something like this

 roadmanger.centerstyle = EditorStyles.bold;
 //Modified some attributes, etc etc

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        
 }

Hopes this saves someone the headache i went through :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
17

Answer by Jimbow-Zheng · Dec 25, 2014 at 11:12 PM

I have the same problem and here is my solution :

Don't use the fonts under Library/unity editor resources in font picker of ngui , and the fucking error message disappeared .

alt text


螢幕截圖 2014-12-26 05.50.02.png (140.0 kB)
Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image skullthug · Feb 28, 2015 at 04:38 AM 0
Share

Oh man, thank you! You just saved me a lot of agony.

avatar image SuperYao_ · Mar 07, 2015 at 08:16 AM 0
Share

太感謝你啦!!! 就因為這個卡了很久

avatar image Pauleta · Mar 16, 2015 at 02:20 AM 0
Share

Thank you very much!

avatar image Subliminalman · May 13, 2015 at 11:37 PM 0
Share

Thank you for figuring this out! Saved our project!

avatar image doublecoconut · May 16, 2015 at 08:26 PM 0
Share

how'd you figure this out? man, what a bug.

Show more comments
avatar image
4

Answer by Loius · Dec 14, 2012 at 05:16 PM

The normal solution for this is to change the asset a bit and then save it. Is UnityEditor.HostView an asset of yours? If so, change it and then save and that should fix it.

If not, you'll probably need to clear out Unity's cache - make a backup of your project before you mess with anything. Close Unity and clear out the Library/Cache folder of your project.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kramcomposer · Dec 14, 2012 at 05:26 PM 0
Share

UnityEditor.HostView:OnGUI() is a unity script.

I just tried clearing out the All folders except: Assets & Project Settings

and it didnt' work :(

avatar image DDP · May 08, 2013 at 07:26 PM 0
Share

Like you suggested, I changed the prefab a bit, and it worked for me. Thanks! I would thumbs up, but I can't yet :/

avatar image
0

Answer by Bunny83 · Dec 14, 2012 at 07:35 PM

UnityEditor.HostView is nothing in your project. It an internal class which handles the built in editor windows. This is just the place where the issue was detected.

First make sure what scenes you included in the build. Are you generating any assets by code? Like a Mesh, Material, ...? Another reason could be that you set the hideflags for an asset in some of your (or third party) scripts.

What are you actually trying to build? Standalone, Web, Andriod, iOS, AssetBundle?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Kid Canuck · May 19, 2013 at 01:14 AM

Not sure what causes this, but re-saving the prefab fixes it for me. Probably you'll want to change something, 'Apply Changes to Prefab', change it back and 'Apply Changes to Prefab' again.

Hope this is helpful.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

How can I stop the variable values reverting to its default values after being built? 1 Answer

APK Builder Failed 2 Answers

Sometimes Unity iPhone build fails, then XCode launches the previously installed build. Can either be avoided? 2 Answers

iPhone build is a blank scene 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges