summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.cs
index 6e9b155c..9b834618 100644
--- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.cs
+++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartSpeed.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.startSpeedMultiplier = startSpeed.Value;
+
+#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4
+ particleSystem.startSpeed = startSpeed.Value;
+#else
+ ParticleSystem.MainModule mainParticleSystem = particleSystem.main;
+ mainParticleSystem.startSpeed = startSpeed.Value;
+#endif
return TaskStatus.Success;
}