Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed issue with velocity rejection when using physically-based DoF.
- Fixed HDRP's ShaderGraphVersion migration management which was broken.
- Fixed missing API documentation for LTC area light code.
- Ignore hybrid duplicated reflection probes during light baking.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ IScriptableBakedReflectionSystemStageNotifier handle
var probe = (HDProbe)EditorUtility.InstanceIDToObject(instanceId);
var cacheFile = GetGICacheFileForHDProbe(states[index].probeBakingHash);

if (probe.gameObject.scene == null)
continue;

Assert.IsTrue(File.Exists(cacheFile));

var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe);
Expand All @@ -296,6 +299,9 @@ IScriptableBakedReflectionSystemStageNotifier handle
var index = toBakeIndicesList.GetUnchecked(i);
var instanceId = states[index].instanceID;
var probe = (HDProbe)EditorUtility.InstanceIDToObject(instanceId);
if (probe.gameObject.scene == null)
continue;

var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe);
AssetDatabase.ImportAsset(bakedTexturePath);
ImportAssetAt(probe, bakedTexturePath);
Expand All @@ -309,6 +315,9 @@ IScriptableBakedReflectionSystemStageNotifier handle
var index = toBakeIndicesList.GetUnchecked(i);
var instanceId = states[index].instanceID;
var probe = (HDProbe)EditorUtility.InstanceIDToObject(instanceId);
if (probe.gameObject.scene == null)
continue;

var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe);
var bakedTexture = AssetDatabase.LoadAssetAtPath<Texture>(bakedTexturePath);
Assert.IsNotNull(bakedTexture, "The baked texture was imported before, " +
Expand Down Expand Up @@ -393,6 +402,9 @@ public static bool BakeProbes(IEnumerable<HDProbe> bakedProbes)
// Render and write the result to disk
foreach (var probe in bakedProbes)
{
if (probe.gameObject.scene == null)
continue;

var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe);
var planarRT = HDRenderUtilities.CreatePlanarProbeRenderTarget((int)probe.resolution, probeFormat);
RenderAndWriteToFile(probe, bakedTexturePath, cubeRT, planarRT);
Expand All @@ -408,6 +420,9 @@ public static bool BakeProbes(IEnumerable<HDProbe> bakedProbes)
AssetDatabase.StartAssetEditing();
foreach (var probe in bakedProbes)
{
if (probe.gameObject.scene == null)
continue;

var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe);
AssetDatabase.ImportAsset(bakedTexturePath);
ImportAssetAt(probe, bakedTexturePath);
Expand All @@ -418,6 +433,9 @@ public static bool BakeProbes(IEnumerable<HDProbe> bakedProbes)
AssetDatabase.StartAssetEditing();
foreach (var probe in bakedProbes)
{
if (probe.gameObject.scene == null)
continue;

var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe);

// Get or create the baked texture asset for the probe
Expand Down