Missing MonoBehaviours when upgrading to Netcode for Entities 1.2

I just upgraded from 1.0 to 1.2, together with an upgrade from 2022.3.9 to 2022.3.11 due to 2022.3.9 not being supported with 1.2.

Upgrading broke my project in 2 ways (that I found so far):

  • Prefabs that had GhostAuthoringInspectionComponent were not able to load due to a missing MonoBehaviour. Removing the GhostAuthoringInspectionComponent fixed the issue (although breaking my project since I had some relevant settings), when trying to add the component it didn’t show up in the “Add Component” dialog. The GhostAuthoringComponent still says I should be able to add the component in the hints. Checking in Rider I have a file for the component (Library/PackageCache/com.unity.netcode@1.2.0/Runtime/Authoring/Hybrid/GhostAuthoringInspectionComponent.cs), however the editor doesn’t seem to pick up on it.
  • SubScene references in my scene completely broke. While it didn’t show any error, clicking the relevant object in the hierarchy window showed a (Script) entry in the inspector but not the correct SubScene entry. Creating a new SubScene adds additional entries of
MonoScript:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_Name:
  serializedVersion: 7
  m_DefaultReferences: {}
  m_Icon: {fileID: 0}
  m_Type: 0
  m_ExecutionOrder: 0
  m_ClassName: SubScene
  m_Namespace: Unity.Scenes
  m_AssemblyName: Unity.Scenes

to the scene yaml which didn’t exist before so I assume there was some change in the serialization but the scene wasn’t properly upgraded accordingly.

I couldn’t find any upgrade guide or instructions for manual intervention for 1.2 so I expected it to just work out of the box.

Let me know if I can provide any additional information.

Okay, turns out the upgrade process somehow broke with what it had on disk.

Closing Unity, deleting the Library and obj folders and restarting Unity to have it create the Library from scratch seems to have fixed it now.

It appears that there have been a bunch of GUIDs that did correctly exist in a scene, as well as in the corresponding meta files, however somehow the editor wasn’t able to correctly match them up, probably due to some broken caching in the Library folder.

I had this issue too and also fixed this by deleting the Library directory. My own MonoBehaviours were fine but in particular the Subscene script was missing before the reimport.