Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
1
Question by tutiplain1 · Jul 24, 2012 at 03:29 PM · prefabnullreferenceexceptioncache

Can no longer create pre-fab

Hi all,

I don't know why, but I can no longer create prefabs on my project. Whenever I click on Assets > Create > Prefab, the console displays this message:

NullReferenceException: Object reference not set to an instance of an object UnityEditor.BaseProjectWindow.BeginPreimportedName Editing (Int32 instanceID, EndAction endAction, System.String pathName, UnityEngine.Texture2D icon, System.String resourceFile) UnityEditor.ProjectWindowUtil.StartNameEditingIfPr ojectWindowExists (Int32 instanceID, EndAction endAction, System.String pathName, UnityEngine.Texture2D icon, System.String resourceFile) UnityEditor.ProjectWindowUtil.CreatePrefab ()

Has this happened to anyone? How can I solve it? Note that at one point, I deleted my project's cache folder. This might have broken something. Is there any way to repair it?

Comment
Add comment · Show 4
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 AlucardJay · Jul 24, 2012 at 03:42 PM 0
Share

What about from the Project window? (Create > Prefab) Do you get the same error? Deleting project folders wouldn't be the cause I$$anonymous$$O, you may possibly need to re-install Unity.

avatar image tutiplain1 · Jul 24, 2012 at 03:46 PM 0
Share

Creating from Project window does the same thing. Also, I ported the project to another computer in which I also have Unity and it did the same, so I think it's something broken in the project itself, not the installation.

avatar image AlucardJay · Jul 24, 2012 at 03:56 PM 0
Share

What about try creating a new project, then in an empty scene try to create prefab. If it is a new project (i.e. no cache/library) with a new blank scene, then there is nothing in the project to affect Unity. This should be a good test.

Unless you have some custom Editor doing something then I would try submitting a Bug Report, and probably re-installing Unity. (I'll upvote your question to see if one of the pro's can help) =]

avatar image tutiplain1 · Jul 24, 2012 at 10:14 PM 0
Share

Hi again,

If using a new project, Prefabs work as expected.

1 Reply

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

Answer by tutiplain1 · Jul 24, 2012 at 10:34 PM

Solved. I exported all my assetts into a unity package, created a new project, and reimported the package. Prefabs now work correctly!

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 AlucardJay · Jul 24, 2012 at 11:04 PM 0
Share

so bizzare, really couldn't see how that was happening, even if you have successfully imported and are using the same scripts and assets! $$anonymous$$ust have been something in the cache/library files, but how, what??

A bit late but if it ever happens again, before exporting/importing, test by deleting the whole Library folder (not just cache).

Really happy you got it working, thumb up for not giving up =]

avatar image tutiplain1 · Jul 24, 2012 at 11:43 PM 0
Share

Thanks, and thanks for your suggestions. I think I have a backup of the "damaged" project folder. I will try deleting the Library folder on that and report back.

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Object reference to set to instance on an instantiated object 1 Answer

Instantiate: Create Connection 1 Answer

The public variables of a prefab dont reset when I open the game. 1 Answer

how to CORRECTLY load all assets (using Resources.LoadAll) 1 Answer

Problem when setting variable in an instantiated gameobject 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