summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs
index 304497d5..11b464f6 100644
--- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs
+++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/GetDuration.cs
@@ -31,7 +31,11 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityParticleSystem
return TaskStatus.Failure;
}
+#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4
+ storeResult.Value = particleSystem.duration;
+#else
storeResult.Value = particleSystem.main.duration;
+#endif
return TaskStatus.Success;
}