Skip to content

Commit

Permalink
feat: IRenderFilterNode.OnFrameGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunderscore committed Sep 1, 2024
1 parent 23fa9c4 commit f19f3ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- [#361] Added `IRenderFilterNode.OnFrameGroup`

### Fixed

Expand Down
7 changes: 7 additions & 0 deletions Editor/PreviewSystem/IRenderFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,12 @@ void IDisposable.Dispose()
void __please_enable_dotnet_80_or_higher_for_default_methods()
{
}

/// <summary>
/// Invoked on each frame, once per render group.
/// </summary>
void OnFrameGroup()
{
}
}
}
4 changes: 4 additions & 0 deletions Editor/PreviewSystem/Rendering/NodeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ ObjectRegistry registry

internal void OnFrame()
{
_profileSampler_onFrame.Begin();
_node.OnFrameGroup();
_profileSampler_onFrame.End();

foreach (var (original, proxy) in _proxies)
{
if (original != null && proxy.Renderer != null)
Expand Down

0 comments on commit f19f3ab

Please sign in to comment.