3.0.0-preview.35

# [3.0.0-preview.35](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.34...v3.0.0-preview.35) (2020-09-27)

### Bug Fixes

* an error happens during loading scene in editor ([ab9d9aa](ab9d9aa7b3)), closes [#101](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/101)
This commit is contained in:
semantic-release-bot
2020-09-27 06:58:09 +00:00
parent bda77ab039
commit 94ae9d2016
3 changed files with 11 additions and 2 deletions

View File

@@ -411,6 +411,7 @@ namespace Coffee.UIExtensions
#if UNITY_EDITOR
void ISerializationCallbackReceiver.OnBeforeSerialize()
{
if (Application.isPlaying) return;
InitializeIfNeeded();
}
@@ -418,7 +419,8 @@ namespace Coffee.UIExtensions
{
UnityEditor.EditorApplication.delayCall += () =>
{
if (this) InitializeIfNeeded();
if (Application.isPlaying || !this) return;
InitializeIfNeeded();
};
}
#endif