From ef10fcbe15e97bf0742df2d9c22ba8fe839ddc55 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 21 Aug 2023 23:47:08 +0900 Subject: [PATCH 1/2] fix: incompatible with Reload Scene disabled --- Internal/ApplyOnPlay/Runtime/GlobalActivator.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Internal/ApplyOnPlay/Runtime/GlobalActivator.cs b/Internal/ApplyOnPlay/Runtime/GlobalActivator.cs index 9e3aeb7d5..750854399 100644 --- a/Internal/ApplyOnPlay/Runtime/GlobalActivator.cs +++ b/Internal/ApplyOnPlay/Runtime/GlobalActivator.cs @@ -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) From 569b75cb7de33a99853ab4a9557cf70b67cfc87e Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 21 Aug 2023 23:48:58 +0900 Subject: [PATCH 2/2] docs(changelog): add Incompatbile with Reload Scene disabaled --- CHANGELOG-PRERELEASE.md | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG-PRERELEASE.md b/CHANGELOG-PRERELEASE.md index ff0a5cd77..d00bcc301 100644 --- a/CHANGELOG-PRERELEASE.md +++ b/CHANGELOG-PRERELEASE.md @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c70dbb7..965a6728b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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