diff options
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartLifetime.cs')
-rw-r--r-- | Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartLifetime.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartLifetime.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartLifetime.cs index 0bfec7a7..0f982345 100644 --- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartLifetime.cs +++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartLifetime.cs @@ -29,8 +29,13 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityParticleSystem Debug.LogWarning("ParticleSystem is null");
return TaskStatus.Failure;
}
- ParticleSystem.MainModule main = particleSystem.main;
- main.startLifetimeMultiplier = startLifetime.Value;
+
+#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4
+ particleSystem.startLifetime = startLifetime.Value;
+#else
+ ParticleSystem.MainModule mainParticleSystem = particleSystem.main;
+ mainParticleSystem.startLifetime = startLifetime.Value;
+#endif
return TaskStatus.Success;
}
|