Search Issue Tracker

Active

Under Consideration for 6000.2.X, 6000.3.X, 6000.4.X

Votes

0

Found in

6000.1.0b9

6000.2.0a6

6000.3.0a1

6000.4.0a1

Issue ID

UUM-99059

Regression

No

Player build fails for an Entities scene

-

Alternative repro steps for 6000.2.8f1 and 6000.3.0b6,

  • Delete the Library folder as well as the package cache located in the Packages folder of the repro project.
  • Notice that the player does not build (Windows), the errors are,

InvalidOperationException: Failed to build EntityScene for 'Assets/Scenes/SampleScene/Subscene1.unity'
Unity.Scenes.Editor.EntitySceneBuildUtility.PrepareAdditionalFiles (Unity.Entities.Hash128 playerGuid, Unity.Entities.Hash128[] sceneGuids, UnityEditor.Experimental.ArtifactKey[] entitySceneArtifacts, UnityEditor.BuildTarget target, System.Action`2[T1,T2] RegisterFileCopy) (at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Scenes.Editor/EntitySceneBuildUtility.cs:175)
Unity.Scenes.Editor.EntitySceneBuildPlayerProcessor.PrepareForBuild (UnityEditor.Build.BuildPlayerContext buildPlayerContext) (at ./Library/PackageCache/com.unity.entities@f6e02210e263/Unity.Scenes.Editor/EntitySceneBuildPlayerProcessor.cs:261)
UnityEditor.Build.BuildPipelineInterfaces.PreparePlayerBuild (UnityEditor.Build.BuildPlayerContext context) (at <f255d7ad41bf4adf8576cc6ca3827ea0>:0)
UnityEditor.BuildPipeline.PreparePlayerBuild (UnityEditor.BuildPlayerOptions buildPlayerOptions) (at <f255d7ad41bf4adf8576cc6ca3827ea0>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

  • The editor log contains an exception in BakingCompanionComponentSystem: [Worker0] Exception thrown during SubScene import: System.InvalidCastException: Specified cast is not valid.

  at Unity.Entities.BakingCompanionComponentSystem.CreateCompanionGameObjects () [0x001f0] in D:\UnityProjects\Bugs\IN-96278_apv_urp_entities\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Entities.Hybrid\Baking\BakingCompanionComponentSystem.cs:135 
  at Unity.Entities.BakingCompanionComponentSystem.OnUpdate () [0x00001] in D:\UnityProjects\Bugs\IN-96278_apv_urp_entities\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Entities.Hybrid\Baking\BakingCompanionComponentSystem.cs:243 
  at Unity.Entities.SystemBase.Update () [0x00077] in .\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Entities\SystemBase.cs:418 
  at Unity.Entities.BakingUtility.PostprocessBake (Unity.Entities.World conversionWorld, Unity.Entities.BakingSettings settings, Unity.Entities.BakingSystem bakingSystem) [0x000d3] in D:\UnityProjects\Bugs\IN-96278_apv_urp_entities\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Entities.Hybrid\Baking\BakingUtility.cs:176 
  at Unity.Entities.BakingUtility.BakeScene (Unity.Entities.World conversionWorld, UnityEngine.SceneManagement.Scene scene, Unity.Entities.BakingSettings settings, System.Boolean incremental, Unity.Entities.IncrementalBakingChangeTracker changeTracker) [0x00059] in D:\UnityProjects\Bugs\IN-96278_apv_urp_entities\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Entities.Hybrid\Baking\BakingUtility.cs:86 
  at Unity.Scenes.Editor.EditorEntityScenes.BakeAndWriteEntityScene (UnityEngine.SceneManagement.Scene scene, Unity.Entities.BakingSettings settings, System.Collections.Generic.List`1[T] sectionRefObjs, Unity.Scenes.Editor.WriteEntitySceneSettings writeEntitySettings) [0x0003d] in .\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Scenes.Editor\EditorEntityScenes.cs:70 
  at Unity.Scenes.Editor.SubSceneImporter.ImportBaking (UnityEditor.AssetImporters.AssetImportContext ctx, UnityEngine.SceneManagement.Scene scene, Unity.Scenes.SceneWithBuildConfigurationGUIDs sceneWithBuildConfiguration, Unity.Entities.Build.IEntitiesPlayerSettings settingsAsset, UnityEngine.GameObject prefab) [0x0007c] in .\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Scenes.Editor\SubSceneImporter.cs:123 
  at Unity.Scenes.Editor.SubSceneImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) [0x000d8] in .\Library\PackageCache\com.unity.entities@e581b903be8e\Unity.Scenes.Editor\SubSceneImporter.cs:202 

 

Reproduction steps:
1. Open the attached project "ReproProj"
2. Build and Run the “/Assets/Scenes/MainNew.unity” Scene
3. Observe Player logs

Expected result: No Errors exist
Actual result: Error “Could not open file C:/Users/L/Downloads/IN-96278_apv_urp_entities/bjvhujvin/62apvurp_Data/StreamingAssets\APVStreamingAssets\20639c6888fda73458e62e25a6c911ea\4ec619a59c08fae4e800f71c96c2b125.bytes for read“ is present

Reproducible with: 6000.1.0b9, 6000.2.0a6
Could not test with: 2022.3.59f1, 6000.0.41f1 (Packages\com.unity.render-pipelines.core@c9ea85becab9\Runtime\RenderGraph\Compiler\PassesData.cs(90,16): error CS0246: The type or namespace name 'ShadingRateFragmentSize' could not be found (are you missing a using directive or an assembly reference?))

Reproducible on:
Windows Standalone Player

Not reproducible on:
Play Mode

Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.