Skip to content

Commit

Permalink
Merge pull request #358 from anatawa12/apply-on-play-enter-playmode
Browse files Browse the repository at this point in the history
fix: incompatible with Reload Scene disabled
  • Loading branch information
anatawa12 authored Aug 21, 2023
2 parents 30f6486 + 569b75c commit 25b147e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog].

### Fixed
- ClearEndpointPosition is not applied for non-first PhysBones on the GameObject `#357`
- Incompatbile with Reload Scene disabaled `#358`

### Security

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

### Fixed
- ClearEndpointPosition is not applied for non-first PhysBones on the GameObject `#357`
- Incompatbile with Reload Scene disabaled `#358`

### Security

Expand Down
8 changes: 8 additions & 0 deletions Internal/ApplyOnPlay/Runtime/GlobalActivator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ private void Awake()
{
if (!EditorApplication.isPlaying || this == null) return;
activate?.Invoke(this);
DestroyImmediate(this);
}

private void Start()
{
if (!EditorApplication.isPlaying || this == null) return;
activate?.Invoke(this);
DestroyImmediate(this);
}

internal static bool HasAvatarInScene(Scene scene)
Expand Down

0 comments on commit 25b147e

Please sign in to comment.