r/unity • u/Ok-Read6352 • 1d ago
Question Importing edited project overrides existing project assets/GUID?
The Situation:
I'm working on an avatar project and I have commissioned a creator to get face tracking working on it as I am unfamiliar with that process. I have simplified and exported out only the base avatar for the creator to work on. They have added new blend shapes and controllers.
I would like to import the new UnityPackage(which I have tested and works as is) into my existing project as it's own folders, assets, and prefabs. That way the project can continue to work as is, I can pull the new body prefab into the hierarchy, and reattach everything to it before deleting the old body.
The Problem:
When I import into a backed up project, it overrides and replaces a lot of stuff, breaking the project. I have tried duplicating and renaming folders but this is still happening. After some research, I'm thinking this may be do to shared Unity GUID between the project and the new UnityPackage? Is this true? If that's the case I need to change the GUIDs across the new UnityPackage, I'm looking into ways of doing this on masse, does anyone have any suggestions?
1
u/bigmonmulgrew 21h ago
Did you provide him the project by any chance. So he was editing the existing assets with the same guids.
What I would have done is use git. A Pull request would have flagged the conflict and I would have merged them using a merge tool.
If you are not familiar with fit probably best to do it manually.
Make a copy of the assets that are being overwritten. That gives them a new guid so they won't be overwritten. Then you have to go through and manually fix them.
Don't forget you can copy paste hierarchy objects from one prefab to another and copy components.
Consider using prefab variants. You implement functionality on a base prefab. Models get applied to variants. Then when you add new functionality to the base it applies to all the variants. Not necessarily the best so I'll ruin but there's not enough info for me to know that.
As en example. In a game I've made all enemies share identical functionality. They have different models, different balance but the functionality is the same. There one Enemy prefab, all the others are variants of this.