[Worker0] 1 entities in the scene ‘Main Entities’ had no SceneSection and as a result were not serialized at all.
I can reproduce it pretty easily in a fresh project (Unity 2022.2.1, Entities 1.0.0-pre.15) with a subscene with one empty game object. The Entity Baking Preview for that one empty game object also shows a scene section component.
Did anyone submitted a bug report for this?
I remember working around this issue earlier but since baking workflow was introduced this breaks dots projects entirely.
Getting this as well. The whole ECS is very fragile at the moment. Not surprising - it’s written up from scratch with little time for 1000s of people to destroy it. Still finding loads of editor/basic implementation bugs. But it’s getting better
On a related note, I was getting this error AND losing components on entities in subscenes when exiting playmode. They would be there before loading playmode, and be gone upon exiting playmode.
The solution for me was to remove an old version of the Substance 3D (Allegorithmic) plugin that was still remnant in my project. Removed that and my components stopped disappearing.
I’ve been getting this for quite a while now (Entities, Physics and Netcode). Doesn’t seem to be breaking anything, so I’ve just been ignoring it. ¯_(ツ)_/¯
i reported this as IN-33127, even though you can ignore it im unsure what is really happening behind the scenes. found that subscene baking is rather brittle currently, sometimes things work, sometimes the cache needs to be cleared
I think they forget to clean up something during baking, it appears to be related to some sort of static physics component; so actually runtime behaviour might be different from what you expext.
However, the baking bug that REALLY gets on my nerves, and that really stops work, is:
Loading Entity Scene failed because the entity header file couldn't be resolved. This might be caused by a failed import of a subscene. Please try to reimport the subscene Ship Spawning from its inspector, look at any errors/exceptions in the console or look at the asset import worker log in <your log directory>
Do you mean a …\Logs\AssetImportWorker0.log?
AssetImportWorker0.log message triggered by SubSceneComponent Reimport
Received Import Request.
Time since last request: 137.442620 seconds.
path: Assets/SceneDependencyCache/45fbc2b8fa1059836e4732e8f27a3e04.sceneWithBuildSettings
artifactKey: Guid(45fbc2b8fa1059836e4732e8f27a3e04) Importer(2089858483,52bed625d08a7023a15481c3fbd73797)
Start importing Assets/SceneDependencyCache/45fbc2b8fa1059836e4732e8f27a3e04.sceneWithBuildSettings using Guid(45fbc2b8fa1059836e4732e8f27a3e04) Importer(2089858483,52bed625d08a7023a15481c3fbd73797) Opening scene 'Assets/---Scenes/_editor/cartesian elements tests/New Sub Scene 1.unity additively'
Loaded scene 'Assets/---Scenes/_editor/cartesian elements tests/New Sub Scene 1.unity'
Deserialize: 0.731 ms
Integration: 0.622 ms
Integration of assets: 0.003 ms
Thread Wait Time: 0.015 ms
Total Operation Time: 1.371 ms
1 entities in the scene 'New Sub Scene 1' had no SceneSection and as a result were not serialized at all.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogWarning (object)
Unity.Debug:LogWarning (object) (at ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Entities/Stubs/Unity/Debug.cs:15)
Unity.Scenes.Editor.EditorEntityScenes:WriteEntitySceneInternal (Unity.Entities.EntityManager,Unity.Entities.Hash128,string,UnityEditor.AssetImporters.AssetImportContext,System.Collections.Generic.List`1<Unity.Scenes.ReferencedUnityObjects>,Unity.Scenes.Editor.WriteEntitySceneSettings) (at ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Scenes.Editor/EditorEntityScenes.cs:541)
Unity.Scenes.Editor.EditorEntityScenes:WriteEntitySceneInternalBaking (Unity.Entities.EntityManager,Unity.Entities.Hash128,string,UnityEditor.AssetImporters.AssetImportContext,System.Collections.Generic.List`1<Unity.Scenes.ReferencedUnityObjects>,Unity.Scenes.Editor.WriteEntitySceneSettings) (at ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Scenes.Editor/EditorEntityScenes.cs:156)
Unity.Scenes.Editor.EditorEntityScenes:BakeAndWriteEntityScene (UnityEngine.SceneManagement.Scene,Unity.Entities.BakingSettings,System.Collections.Generic.List`1<Unity.Scenes.ReferencedUnityObjects>,Unity.Scenes.Editor.WriteEntitySceneSettings) (at ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Scenes.Editor/EditorEntityScenes.cs:91)
Unity.Scenes.Editor.SubSceneImporter:ImportBaking (UnityEditor.AssetImporters.AssetImportContext,UnityEngine.SceneManagement.Scene,Unity.Scenes.SceneWithBuildConfigurationGUIDs,Unity.Entities.Build.IEntitiesPlayerSettings,Unity.Build.BuildConfiguration,UnityEngine.GameObject) (at ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Scenes.Editor/SubSceneImporter.cs:158)
Unity.Scenes.Editor.SubSceneImporter:OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) (at ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Scenes.Editor/SubSceneImporter.cs:253)
UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext)
(Filename: ./Packages/com.unity.entities@1.0.0-pre.47/Unity.Entities/Stubs/Unity/Debug.cs Line: 15)
-> (artifact id: '3c1076d3d359c72b3577219e00998de5') in 0.088407 seconds
Number of updated asset objects reloaded before import = 0
Number of asset objects unloaded after import = 1
Idk I see no useful info here
EDIT: No exceptions nor errors in my case either :V
Yes and it has all the info, but beware that tthis file can be updated a bit later than actual exception. And search by Exception and you’ll see actual error of why SubScene can’t be processed in case you don’t see proper error in console.
For example: