summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs
index 1082989d..835992d8 100644
--- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs
+++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/ParticleSystem/SetGravityModifier.cs
@@ -1,3 +1,4 @@
+#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4
using UnityEngine;
namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityParticleSystem
@@ -29,9 +30,9 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityParticleSystem
Debug.LogWarning("ParticleSystem is null");
return TaskStatus.Failure;
}
- ParticleSystem.MainModule main = particleSystem.main;
- main.gravityModifierMultiplier = gravityModifier.Value;
- //particleSystem.main = main;
+
+ particleSystem.gravityModifier = gravityModifier.Value;
+
return TaskStatus.Success;
}
@@ -41,4 +42,5 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityParticleSystem
gravityModifier = 0;
}
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file