Skip to content

Commit

Permalink
chore: use subscenes instead of harmony hacks to hide preview objects (
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunderscore authored Aug 18, 2024
1 parent 702ace6 commit 999dc53
Show file tree
Hide file tree
Showing 13 changed files with 314 additions and 256 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [#330] `NDMFPreviewSceneManager` added, allowing other libraries to easily hide temporary objects.

### Fixed
- [#320] Render nodes are not correctly reused across frames
- [#321] Fix GetTargetGroup being called on every pipeline invalidation
Expand All @@ -18,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- [#330] Preview objects are now hidden by placing them in a hidden subscene, instead of harmony patching the hierarchy.
This should improve stability in general.

### Removed

### Security
Expand Down
19 changes: 19 additions & 0 deletions Editor/MiscDebugTools.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace nadena.dev.ndmf.ui
{
internal static class MiscDebugTools
{
[MenuItem("Tools/NDM Framework/Debug Tools/Dump Scenes")]
public static void DumpScenes()
{
for (var i = 0; i < SceneManager.sceneCount; i++)
{
var scene = SceneManager.GetSceneAt(i);
Debug.Log($"Scene {i}: {scene.name}");
}
}
}
}
3 changes: 3 additions & 0 deletions Editor/MiscDebugTools.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

229 changes: 0 additions & 229 deletions Editor/PreviewSystem/Harmony/HierarchyViewPatches.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Editor/PreviewSystem/Harmony/HierarchyViewPatches.cs.meta

This file was deleted.

2 changes: 1 addition & 1 deletion Editor/PreviewSystem/Harmony/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal sealed class PatchLoader
{
HandleUtilityPatches.Patch_FilterInstanceIDs,
PickingObjectPatch.Patch,
HierarchyViewPatches.Patch
//HierarchyViewPatches.Patch
};

[InitializeOnLoadMethod]
Expand Down
Loading

0 comments on commit 999dc53

Please sign in to comment.