summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Network/IsServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Network/IsServer.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Basic Tasks/Network/IsServer.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Network/IsServer.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Network/IsServer.cs
new file mode 100644
index 00000000..81a4027b
--- /dev/null
+++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Network/IsServer.cs
@@ -0,0 +1,15 @@
+#if !(UNITY_4_6 || UNITY_4_7 || UNITY_5_0)
+using UnityEngine;
+using UnityEngine.Networking;
+
+namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityNetwork
+{
+ public class IsServer : Conditional
+ {
+ public override TaskStatus OnUpdate()
+ {
+ return NetworkServer.active ? TaskStatus.Success : TaskStatus.Failure;
+ }
+ }
+}
+#endif \ No newline at end of file