Skip to content

Commit

Permalink
Merge pull request #496 from anatawa12/fix-merge-bone-removed-by-gc-o…
Browse files Browse the repository at this point in the history
…bjects

fix: manually configured MergeBone is removed by GC Objects
  • Loading branch information
anatawa12 authored Sep 21, 2023
2 parents c764df5 + dea585e commit 4baccda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog].
### Fixed
- Left eye disappears `#493`
- MergeBone will loose transform information with extreamly small parent scale `#495`
- Manually configured MergeBone is removed / disabled by GC Objects `#496`

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,10 @@ void CollectTransforms(Transform bone)
// TODOL External Library: FinalIK

// Components Proceed after T&O later
AddNopParser<MergeBone>();
AddParser<MergeBone>((collector, deps, component) =>
{
deps.EntrypointComponent = true;
});
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ bool ConfigureRecursive(Transform transform, ImmutableModificationsContainer mod
| ComponentDependencyCollector.DependencyType.Parent
| ComponentDependencyCollector.DependencyType.ComponentToTransform;

// Already Merged
if (transform.GetComponent<MergeBone>()) return true;
// Components must be Transform Only
if (transform.GetComponents<Component>().Length != 1) return false;
// The bone cannot be used generally
Expand Down

0 comments on commit 4baccda

Please sign in to comment.