Skip to content

fix: minor adjustments to ShadowBoneManager - #840

Merged
bdunderscore merged 5 commits into
mainfrom
sbm
Oct 5, 2026
Merged

bdunderscore merged 5 commits into
mainfrom
sbm

Conversation

@bdunderscore

Copy link
Copy Markdown
Owner
  • fix: improve SBM error checking
  • fix: change SBM test fixture

@bdunderscore
bdunderscore marked this pull request as ready for review October 5, 2026 01:49
Copilot AI balanced review requested due to automatic review settings October 5, 2026 01:49
@bdunderscore
bdunderscore enabled auto-merge (squash) October 5, 2026 01:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Async operations can escape their stage scope, and the renderer null check does not prevent later dereferences.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Updates ShadowBoneManager validation and restructures its preview test fixture.

Changes:

  • Adds stage-scoped fixture execution.
  • Validates stage renderer registration.
  • Updates renderer handling and changelog.
File Description
ShadowBoneTextFixture.cs Revises fixture lifecycle and stage execution.
ShadowBoneManager.cs Adds validation and renderer checks.
CHANGELOG-PRERELEASE.md Records the API adjustment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +36 to +48
public T ExecuteInStage<T>(
IReadOnlyDictionary<Renderer, Renderer> rendererMap,
Func<T> operation
) where T : class
{
if (rendererMap == null) throw new ArgumentNullException(nameof(rendererMap));
if (operation == null) throw new ArgumentNullException(nameof(operation));

using var stageScope = _manager.EnterStage(0, rendererMap);
var result = operation();
if (result != null) stageScope.Commit();
return result;
}
private static void ApplyRendererState(Renderer renderer, RendererReplacementState state)
{
if (renderer is SkinnedMeshRenderer skinnedRenderer)
if (renderer is SkinnedMeshRenderer skinnedRenderer && renderer != null)
Comment thread CHANGELOG-PRERELEASE.md
### Fixed

### Changed
- [#840] Adjusted `ShadowBoneTestFixture` API
@bdunderscore
bdunderscore disabled auto-merge October 5, 2026 01:52
@bdunderscore
bdunderscore enabled auto-merge (squash) October 5, 2026 01:54
@bdunderscore
bdunderscore merged commit fbd88d4 into main Oct 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants