Skip to content

Commit

Permalink
Merge pull request #1150 from anatawa12/cosntraints-with-target
Browse files Browse the repository at this point in the history
fix: VRCConstraints with Target will be removed unexepctedly
  • Loading branch information
anatawa12 authored Aug 21, 2024
2 parents 98728ed + 9229fa7 commit d515f7d
Show file tree
Hide file tree
Showing 3 changed files with 4 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 @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog].
### Removed

### Fixed
- VRCConstraints with Target might be removed unexpectedly `#1150`

### Security

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog].
### Removed

### Fixed
- VRCConstraints with Target might be removed unexpectedly `#1150`

### Security

Expand Down
3 changes: 2 additions & 1 deletion Editor/APIInternal/ComponentInfos.VRCSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,8 @@ internal class VRCConstraintInformation<T> : ComponentInformation<T> where T : V
{
protected override void CollectDependency(T component, ComponentDependencyCollector collector)
{
collector.AddDependency(component.transform, component)
var target = component.TargetTransform != null ? component.TargetTransform : component.transform;
collector.AddDependency(target, component)
.OnlyIfTargetCanBeEnable()
.EvenIfDependantDisabled();

Expand Down

0 comments on commit d515f7d

Please sign in to comment.