How to make references point to the imported asset with new GUID?

I have gotten this warning and I want references to the asset being imported in other imported assets to remain unreplaced, so that the other imported assets using MyPauseMenu4, will NOT be using MyPauseMen0, how can I achieve this?

There’s no easy way to do that. You’re prefabs and scenes in the project and in the imported package reference the same GUID, so all of them are either going to use MyPauseMen0 or MyPauseMenu4 (if you manually switch GUIDs after import).

To fix this, some of the references need to be updated. You could do this manually in Unity by deleting the meta file of MyPauseMenu0 to assign it a new GUID and then fixing all the missing script references. A bit easier might be to delete the meta file and then use search & replace to update the references directly in the YAML Unity files (which should be safe but better check all the changes so that you don’t inadvertently corrupt some files).

After MyPauseMenu0 has gotten a new GUID, you can import the package without conflict.

As always, backup your project and use version control in case something goes wrong.

1 Like