• 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 /
  • Help Room /
avatar image
1
Question by Shinkaze33 · Apr 26, 2019 at 06:42 AM · error messageasset storeoculusimporting assets

Why am I getting "AssetImporter is referencing an asset from the previous import..."?

Why am I getting this error?

ERROR [11:55:19] AssetImporter is referencing an asset from the previous import. This should not happen.

This occurs on a brand new 3D project in Unity 2018.3.10f1 when the only action I take after opening the project for the first time is to import the Oculus Unity Integration asset. (located here) via the asset store.

https://assetstore.unity.com/packages/tools/integration/oculus-integration-82022

Why am I getting this error and what are the steps to resolve?

Thank you, -Adam

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 Shinkaze33 · Apr 25, 2019 at 07:18 PM 0
Share

This occurs on Step 3 of the following instructions.

https://developer.oculus.com/documentation/unity/latest/concepts/unity-import/

1 Reply

· Add your reply
  • Sort: 
avatar image
7

Answer by Martinch01 · Jun 04, 2019 at 03:19 PM

Hi @Shinkaze33 ,

The error you are seeing is due to an asset having a broken reference to itself. The issue can be fixed by reserializing the problematic assets. In this case it's:

 \Assets\Oculus\SampleFramework\Core\CustomHands\Animations\r_hand_relax_3qtr_fist_anim.fbx


Unfortunately, reserializing can be done only through script, so I've attached a simple script that you can add in your Assets/Editor folder (you can create it if it doesn't exist) and it will add an option to "Force Reserialize" when you right click the assets in the editor.

 using UnityEditor;
 using UnityEngine;
 
 [CreateAssetMenu()]
 public class PrefabReferenceFixer : ScriptableObject
 {
     [MenuItem("Assets/Force Reserialize")]
     private static void ForceReserialize()
     {
         GameObject[] selection = Selection.gameObjects;
         string[] objectPaths = new string[selection.Length];
 
         for(int i = 0; i < selection.Length; ++i)
         {
             objectPaths[i] = AssetDatabase.GetAssetPath(selection[i]);
         }
 
         AssetDatabase.ForceReserializeAssets(objectPaths);
     }
 }


You can either reserialize the specific asset, or the whole Oculus folder. That should get rid of the error for you.

Thanks,
Martin

Comment
Add comment · Show 3 · 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 stuck_cow · Aug 01, 2019 at 02:40 PM 0
Share

Thank you for your answer, this fixed the problem for me!

avatar image HoloSon · Aug 02, 2019 at 10:01 PM 0
Share

This script doesn't seem to be doing anything for me. I'm having the exact same issue with the exact same Unity version. I created an Assets/Editor folder, created a PrefabReferenceFixer script, pasted your code, right clicked the Oculus folder, clicked "Force Reserialize". Nothing happened and the error is still there...

Did I do something wrong? Is there an Option I should enable?

@stuck_cow Did you do anything else different?

avatar image Earthshine · Nov 11, 2020 at 04:41 PM 0
Share

I had an error with one of my prefabs:

Asset import did not unload metadata path. This will leak memory. File a bug with repro steps please. [Prefab Name] UnityEditor.PrefabImporterEditor:OnDestroy()

and your script solved the problem. Thank you, $$anonymous$$artin.

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

178 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

,Cannot Enter Play Mode when I download assets from assets store 1 Answer

Share Asset with team 0 Answers

Why is importing from the Asset store so slow? 0 Answers

Why am I getting the error "user does not have app in library" when I do the Entitlement Check? 0 Answers

Accessing Unity Assets (SFX) as .WAV FILES? Having Trouble Downloading + Importing Assets 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges