Ghost prefabs cannot be resolved

When adding a ghost prefab to a SubScene, I’ve started to experience this error: [Worker0] Prefab instance problem. Missing Prefab Asset: 'ContentSceneLoader (Missing Prefab with guid: 29d03db09a2ff4f79ad06979532386eb)'.

It seems that the SubScene attempts to start importing, but the ghost prefab asset cannot be resolved somehow. I can open the subscene and inspect the prefab though.

This issue happens in the editor and at runtime. I am quite confused because this has worked for me before.

Using N4E: 1.2.4
With Unity: 2022.3.42f1

What could be happening here?

Stack trace in the editor:

[Worker0] Prefab instance problem. Missing Prefab Asset: 'ContentSceneLoader (Missing Prefab with guid: 29d03db09a2ff4f79ad06979532386eb)'
UnityEditor.Experimental.AssetDatabaseExperimental:LookupArtifact (UnityEditor.Experimental.ArtifactKey)
Unity.Scenes.AssetDatabaseCompatibility:GetArtifactHash (UnityEditor.GUID,System.Type,Unity.Scenes.ImportMode) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDatabaseCompatibility.cs:47)
Unity.Scenes.AssetDatabaseCompatibility:GetArtifactHash (string,System.Type,Unity.Scenes.ImportMode) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDatabaseCompatibility.cs:55)
Unity.Scenes.EntityScenesPaths:GetSubSceneArtifactHash (Unity.Entities.Hash128,Unity.Entities.Hash128,bool,Unity.Scenes.ImportMode) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/EntityScenesPaths.cs:75)
Unity.Scenes.Editor.SubSceneInspector:IsSubsceneImported (Unity.Scenes.SubScene,Unity.Scenes.ImportMode) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes.Editor/SubSceneInspector.cs:479)
Unity.Scenes.Editor.SubSceneInspector:DrawClosedSubScenes (Unity.Scenes.Editor.SubSceneInspectorUtility/LoadableScene[],Unity.Scenes.SubScene[]) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes.Editor/SubSceneInspector.cs:276)
Unity.Scenes.Editor.SubSceneInspector:OnInspectorGUI () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes.Editor/SubSceneInspector.cs:386)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Stack trace at runtime:

[Worker0] Prefab instance problem. Missing Prefab Asset: 'ContentSceneLoader (Missing Prefab with guid: 29d03db09a2ff4f79ad06979532386eb)'
UnityEditor.Experimental.AssetDatabaseExperimental:ProduceArtifact (UnityEditor.Experimental.ArtifactKey)
Unity.Scenes.AssetDatabaseCompatibility:ProduceArtifacts (Unity.Collections.NativeArray`1<UnityEditor.GUID>,System.Type,Unity.Collections.NativeArray`1<UnityEngine.Hash128>) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDatabaseCompatibility.cs:91)
Unity.Scenes.AssetDatabaseCompatibility:ProduceArtifactsRefreshIfNecessary (Unity.Collections.NativeArray`1<UnityEditor.GUID>,System.Type,Unity.Collections.NativeArray`1<UnityEngine.Hash128>) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDatabaseCompatibility.cs:133)
Unity.Scenes.AssetDatabaseCompatibility:ProduceArtifactsRefreshIfNecessary (Unity.Collections.NativeArray`1<UnityEditor.GUID>,System.Type,Unity.Collections.NativeList`1<UnityEngine.Hash128>) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDatabaseCompatibility.cs:163)
Unity.Scenes.AssetDependencyTracker`1<Unity.Entities.Entity>:AddCompleted (Unity.Collections.NativeList`1<Unity.Scenes.AssetDependencyTracker`1/Completed<Unity.Entities.Entity>>) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDependencyTracker.cs:215)
Unity.Scenes.AssetDependencyTracker`1<Unity.Entities.Entity>:GetCompleted (Unity.Collections.NativeList`1<Unity.Scenes.AssetDependencyTracker`1/Completed<Unity.Entities.Entity>>) (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/AssetDependencyTracker.cs:167)
Unity.Scenes.ResolveSceneReferenceSystem:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Scenes/ResolveSceneReferenceSystem.cs:169)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/ComponentSystemGroup.cs:723)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/ComponentSystemGroup.cs:681)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/ComponentSystemGroup.cs:723)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/ComponentSystemGroup.cs:681)
Unity.Entities.InitializationSystemGroup:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/DefaultWorld.cs:169)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate () (at ./Library/PackageCache/com.unity.entities@1.2.4/Unity.Entities/ScriptBehaviourUpdateOrder.cs:523)

On further investigation, it appears to be a regression introduced with Unity 2022.3.40. Reverting to a previous editor version resolved the issue.

Problem not related to N4E directly, although this regression makes it unusable.

Issue tracker link: Unity Issue Tracker - &quot;Missing Prefab Asset&quot; error in a SubScene after Domain Reload

2 Likes