Jump to content

Plastic SCM breaks prefabs, un-assigns all references.


kieryst
 Share

Recommended Posts

Every so often Plastic will just blow up my entire project. Ever since I switched over from collaborate, plastic will un-assign all references that I have in my prefabs present in the project hierarchy.

image.png.e2c3dfd11a7345cd9a0b5d85cd4255bc.png

Opening the prefab to edit it will show the references assigned correctly. Making a small change will 'save' that particular object so it works correctly, but it is not feasible to 'fix' my project in that fashion.

Link to comment
Share on other sites

Hi @kieryst, I'm sorry to hear that this is happening to your project. Could you tell me the following so that we can try to reproduce it on our end?

  • Unity Version
  • Version Control package version
  • When you notice that references are missing in a prefab, does it happen in all of your prefabs or just some of them? Also, were there any recent checkins that included changes for those prefabs before you noticed the missing references?
Link to comment
Share on other sites

  • 3 months later...

Hi @ziggy87, I'm sorry that you're experiencing the same issue. In the Unity Package Manager, could you also let me know which version of the Version Control package you're currently using?

Just to recap the issue, in the Inspector, some of your prefabs are losing their references after a checkin, correct? And if you open the prefab to edit it, the correct references appear and can be saved if a minor change is made, then undone later?

Link to comment
Share on other sites

  • 2 months later...

I just got switched from collaborate to plastic, and am experiencing the exact same issue.

Unity 2021.2.7f1 and Version Control 1.15.12 (but I just upgraded us to 1.15.16 in hopes to fix).

My partner pulled my files, and her project is now a mess of Null References. When you select any of the prefabs that I pushed the inspector fields are just...empty.  This happens in both the Project Window when the prefab is selected and when the asset is dragged into a scene. What is even weirder is that if you double click her prefab files to go into prefab edit mode, all of the inspector fields are successfully linked/filled in.

I didn't see any posted solutions, was there a resolution for this error?

Link to comment
Share on other sites

I have an additional weird find to add to this: If I open her broken prefabs, add an empty gameobject to them, then save the prefab, it reconnects all of the broken attributes. If I then go back in and delete that empty and save the prefab it will revert it back into the broken state. Hopefully this helps figure out what is going on.

Link to comment
Share on other sites

  • 2 weeks later...

Hi @afarrell, I'm sorry to hear that you're experiencing this issue too. Do the missing references happen in just custom components or in Unity-specific ones too (ie. Rigidbody Colliders, Materials, etc.)? Does reimporting the project fix the missing references?

Link to comment
Share on other sites

  • 2 weeks later...

Hi Ryan, Sorry for the delay.

We actually found a work around to the issue, and these were my steps in case it helps anyone else:

  1. On partners computer add empty Game Objects to the prefabs and save them.
  2. On my computer, make some changes to the prefabs that were causing her problems.
  3. Check in my changes through the check in window
  4. On partners computer pull the changes, and it will ask to resolve conflicts due to those empty game objects
  5. Resolve the conflicts by choosing the incoming changes

Unfortunately since the problem is now fixed, I can't confirm whether it was on Custom Components or not. I have since pushed additional changes to those prefabs that were initially not working properly and they somehow now work. If we notice this behavior again I will grab any related logs and take some videos of the issue occurring.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...