Repository navigation
fix: minor adjustments to ShadowBoneManager - #840
Merged
Merged
Conversation
bdunderscore
commented
Oct 5, 2026
Owner
- fix: improve SBM error checking
- fix: change SBM test fixture
bdunderscore
marked this pull request as ready for review
October 5, 2026 01:49
bdunderscore
enabled auto-merge (squash)
October 5, 2026 01:49
Contributor
There was a problem hiding this comment.
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
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) |
| ### Fixed | ||
|
|
||
| ### Changed | ||
| - [#840] Adjusted `ShadowBoneTestFixture` API |
bdunderscore
disabled auto-merge
October 5, 2026 01:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


