fix: error on build in Unity 2019.3.11-15

Close #114
pull/120/head
mob-sakai 2020-11-10 01:42:28 +09:00
parent 1b1ca56461
commit 68669c7396
1 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,6 @@
#if UNITY_2019_3_11 || UNITY_2019_3_12 || UNITY_2019_3_13 || UNITY_2019_3_14 || UNITY_2019_3_15 || UNITY_2019_4_OR_NEWER
#define SERIALIZE_FIELD_MASKABLE
#endif
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Coffee.UIParticleExtensions;
@ -38,7 +41,7 @@ namespace Coffee.UIExtensions
[Tooltip("Particles")] [SerializeField]
private List<ParticleSystem> m_Particles = new List<ParticleSystem>();
#if !UNITY_2019_4_OR_NEWER
#if !SERIALIZE_FIELD_MASKABLE
[SerializeField]
private bool m_Maskable = true;
#endif
@ -355,7 +358,7 @@ namespace Coffee.UIExtensions
/// </summary>
protected override void OnEnable()
{
#if !UNITY_2019_4_OR_NEWER
#if !SERIALIZE_FIELD_MASKABLE
maskable = m_Maskable;
#endif
_cachedPosition = transform.localPosition;
@ -448,7 +451,7 @@ namespace Coffee.UIExtensions
SetVerticesDirty();
m_ShouldRecalculateStencil = true;
RecalculateClipping();
#if !UNITY_2019_4_OR_NEWER
#if !SERIALIZE_FIELD_MASKABLE
maskable = m_Maskable;
#endif
}