Skip to content

Commit aa1ef11

Browse files
pmavridisEvergreen
authored andcommitted
[APV] Fix warning when baking APV with zero occlusion data
1 parent f3d659a commit aa1ef11

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Serialization.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,11 @@ unsafe static void WriteBakingCells(BakingCell[] bakingCells)
10701070

10711071
AssetDatabase.ImportAsset(cellDataFilename);
10721072
AssetDatabase.ImportAsset(cellOptionalDataFilename);
1073-
AssetDatabase.ImportAsset(cellProbeOcclusionDataFilename);
1073+
// If we did not write a probe occlusion file (because it was zero bytes), don't try to load it (UUM-101480)
1074+
if (probeOcclusion.Length > 0)
1075+
{
1076+
AssetDatabase.ImportAsset(cellProbeOcclusionDataFilename);
1077+
}
10741078
AssetDatabase.ImportAsset(cellBricksDataFilename);
10751079
AssetDatabase.ImportAsset(cellSharedDataFilename);
10761080
AssetDatabase.ImportAsset(cellSupportDataFilename);

0 commit comments

Comments
 (0)