Unity Issue Tracker - Scene dependency changes do not trigger a scene re-hash during Content Archives build
Open
UUM-144634
Scene dependency changes do not trigger a scene re-hash during Content Archives build
Package: Scriptable Build Pipeline
In Progress
2.6.X
{*}+Description
+{*}The issue happens when using the Scriptable Build Pipeline to build Content Archives in an entities project - specifically, when those content archives include scenes with prefab dependencies. Updating the prefab itself outside of the scene does not seem to propagate the changes to the build.
Upon further investigation, we found that this is because the hash for the scene does not change to reflect that one of its dependencies has been changed, and the SBP cache for that scene is not correctly invalidated.
{*}+Initial setup
+{*}A minimal repro for this is attached. The repro involves the SBP and Entities packages and does not reproduce on SBP only.
Reproduction steps
1. Open attached project and ensure Scenes/OtherScene is open as the active scene
2. In the menu, run Repro/1. Build via Entities
3. Observe Debug.Log and take note of the two hashes for the output files
4. In the menu, run Repro/1. Build via Vanilla SBP
5. Observe Debug.Log and take not of the scene bundle hash
6. Select Scenes/PrefabToBake in the inspector and change the Test Value to something else
7. Save the Prefab
8. Repeat steps 2-5
{*}+Expected behaviour
+{*}Both the Entities ContentFile pipeline and the Vanilla SBP build produce different scene hash due to the prefab change
Actual behavior
Vanilla SBP correctly registers the dependency change and updates the hash, but the Entities pipeline does not
Additional notes:
If you would like to verify the output further you can use UnityTechnologies/UnityDataTools and run dump on the built files, then find and compare the value of the Test Value component in the scene binaries.
Prioritise and Follow this issue
Have a workaround or additional info about this issue?