diff options
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartRotation.cs')
-rw-r--r-- | Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartRotation.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartRotation.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartRotation.cs index 404acbf3..668082fa 100644 --- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartRotation.cs +++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetStartRotation.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.startRotationMultiplier = startRotation.Value;
+
+#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4
+ particleSystem.startRotation = startRotation.Value;
+#else
+ ParticleSystem.MainModule mainParticleSystem = particleSystem.main;
+ mainParticleSystem.startRotation = startRotation.Value;
+#endif
return TaskStatus.Success;
}
|