summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs b/Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs
index ed625e1f..e2cb5b10 100644
--- a/Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs
+++ b/Client/Assets/Behavior Designer/Runtime/Composites/RandomSelector.cs
@@ -28,7 +28,11 @@ namespace BehaviorDesigner.Runtime.Tasks
{
// If specified, use the seed provided.
if (useSeed) {
+#if !(UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3)
Random.InitState(seed);
+#else
+ Random.seed = seed;
+#endif
}
// Add the index of each child to a list to make the Fischer-Yates shuffle possible.