diff options
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Actions')
24 files changed, 137 insertions, 141 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs b/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs index 5bf87b40..b0611bce 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs @@ -1,4 +1,4 @@ -using UnityEngine;
+
namespace BehaviorDesigner.Runtime.Tasks
{
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta index f81a791a..3f47c293 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: af7b6fcbc7258f34aad1bb82b5b3fdc8
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: af7b6fcbc7258f34aad1bb82b5b3fdc8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs index 04574a79..2cd9f2f4 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs @@ -1,4 +1,4 @@ -using UnityEngine;
+
namespace BehaviorDesigner.Runtime.Tasks
{
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs.meta index 6b5a4977..575161d3 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Idle.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: 759252a4ffada80419ef06ce1c625246
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 759252a4ffada80419ef06ce1c625246 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs index b3ce1f2a..a2363d43 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs @@ -15,11 +15,11 @@ namespace BehaviorDesigner.Runtime.Tasks public override TaskStatus OnUpdate()
{
// Log the text and return success
- //if (logError.Value) {
- // Debug.LogError(text);
- //} else {
- // Debug.Log(text);
- //}
+ if (logError.Value) {
+ Debug.LogError(text);
+ } else {
+ Debug.Log(text);
+ }
return TaskStatus.Success;
}
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs.meta index 31b9601b..fadabb17 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Log.cs.meta @@ -1,8 +1,7 @@ -fileFormatVersion: 2
-guid: d53794347878c7c479da37533dce2024
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: d53794347878c7c479da37533dce2024 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta index 028b3699..eeed0139 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta @@ -1,8 +1,7 @@ -fileFormatVersion: 2
-guid: 72d2d6051b23e86468e2f715f044dad8
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 72d2d6051b23e86468e2f715f044dad8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection.meta index ee7a8834..d568a15b 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection.meta @@ -1,5 +1,4 @@ -fileFormatVersion: 2
-guid: 70f925868ab5ebe4cbc702810c2c5857
-folderAsset: yes
-DefaultImporter:
- userData:
+fileFormatVersion: 2 +guid: 70f925868ab5ebe4cbc702810c2c5857 +DefaultImporter: + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs index 1a4631a1..a5b31bc4 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs @@ -23,19 +23,19 @@ namespace BehaviorDesigner.Runtime.Tasks public override TaskStatus OnUpdate()
{
if (fieldValue == null) {
- //Debug.LogWarning("Unable to get field - field value is null");
+ Debug.LogWarning("Unable to get field - field value is null");
return TaskStatus.Failure;
}
var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
if (type == null) {
- //Debug.LogWarning("Unable to get field - type is null");
+ Debug.LogWarning("Unable to get field - type is null");
return TaskStatus.Failure;
}
var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
if (component == null) {
- //Debug.LogWarning("Unable to get the field with component " + componentName.Value);
+ Debug.LogWarning("Unable to get the field with component " + componentName.Value);
return TaskStatus.Failure;
}
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta index 34bf75c3..72012c5d 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: bc317dd7feb2085499edb0d0c4604640
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: bc317dd7feb2085499edb0d0c4604640 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs index 63e50c26..be81eee4 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs @@ -23,19 +23,19 @@ namespace BehaviorDesigner.Runtime.Tasks public override TaskStatus OnUpdate()
{
if (propertyValue == null) {
- //Debug.LogWarning("Unable to get property - property value is null");
+ Debug.LogWarning("Unable to get property - property value is null");
return TaskStatus.Failure;
}
var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
if (type == null) {
- //Debug.LogWarning("Unable to get property - type is null");
+ Debug.LogWarning("Unable to get property - type is null");
return TaskStatus.Failure;
}
var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
if (component == null) {
- //Debug.LogWarning("Unable to get the property with component " + componentName.Value);
+ Debug.LogWarning("Unable to get the property with component " + componentName.Value);
return TaskStatus.Failure;
}
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta index 587385b3..ae51d39e 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: dda9c9b7c6ff2ee4f95a2e208cddae64
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: dda9c9b7c6ff2ee4f95a2e208cddae64 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs index 5780c350..7c239dbd 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs @@ -32,13 +32,13 @@ namespace BehaviorDesigner.Runtime.Tasks {
var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
if (type == null) {
- //Debug.LogWarning("Unable to invoke - type is null");
+ Debug.LogWarning("Unable to invoke - type is null");
return TaskStatus.Failure;
}
var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
if (component == null) {
- //Debug.LogWarning("Unable to invoke method with component " + componentName.Value);
+ Debug.LogWarning("Unable to invoke method with component " + componentName.Value);
return TaskStatus.Failure;
}
@@ -59,7 +59,7 @@ namespace BehaviorDesigner.Runtime.Tasks var methodInfo = component.GetType().GetMethod(methodName.Value, parameterTypeList.ToArray());
if (methodInfo == null) {
- //Debug.LogWarning("Unable to invoke method " + methodName.Value + " on component " + componentName.Value);
+ Debug.LogWarning("Unable to invoke method " + methodName.Value + " on component " + componentName.Value);
return TaskStatus.Failure;
}
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta index eed4a86a..76132da7 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: 359bd67578f53034ab2eb00e7696d317
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 359bd67578f53034ab2eb00e7696d317 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs index c0c9e2f0..79675c97 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs @@ -22,19 +22,19 @@ namespace BehaviorDesigner.Runtime.Tasks public override TaskStatus OnUpdate()
{
if (fieldValue == null) {
- //Debug.LogWarning("Unable to get field - field value is null");
+ Debug.LogWarning("Unable to get field - field value is null");
return TaskStatus.Failure;
}
var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
if (type == null) {
- //Debug.LogWarning("Unable to set field - type is null");
+ Debug.LogWarning("Unable to set field - type is null");
return TaskStatus.Failure;
}
var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
if (component == null) {
- //Debug.LogWarning("Unable to set the field with component " + componentName.Value);
+ Debug.LogWarning("Unable to set the field with component " + componentName.Value);
return TaskStatus.Failure;
}
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta index 433a991c..75186eca 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: 21e389787213ba24ab1a6817def634ae
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 21e389787213ba24ab1a6817def634ae +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs index 570aefb0..9ec7cd08 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs @@ -22,19 +22,19 @@ namespace BehaviorDesigner.Runtime.Tasks public override TaskStatus OnUpdate()
{
if (propertyValue == null) {
- //Debug.LogWarning("Unable to get field - field value is null");
+ Debug.LogWarning("Unable to get field - field value is null");
return TaskStatus.Failure;
}
var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
if (type == null) {
- //Debug.LogWarning("Unable to set property - type is null");
+ Debug.LogWarning("Unable to set property - type is null");
return TaskStatus.Failure;
}
var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
if (component == null) {
- //Debug.LogWarning("Unable to set the property with component " + componentName.Value);
+ Debug.LogWarning("Unable to set the property with component " + componentName.Value);
return TaskStatus.Failure;
}
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta index 012823b6..79968a23 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: d98b13b7ae4b36b4092b439731466d9b
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: d98b13b7ae4b36b4092b439731466d9b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta index d1110668..aefc2fea 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: 2765e7ece98046542880a1249b87e096
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 2765e7ece98046542880a1249b87e096 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/SendEvent.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/SendEvent.cs.meta index 82bd42cd..051587eb 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/SendEvent.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/SendEvent.cs.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2
-guid: 53b90428a37913c40b6d415ced4e12f9
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 53b90428a37913c40b6d415ced4e12f9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs b/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs index e817713a..214644fb 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs +++ b/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs @@ -39,8 +39,10 @@ namespace BehaviorDesigner.Runtime.Tasks if (behavior != null) {
var variables = Owner.GetAllVariables();
- for (int i = 0; i < variables.Count; ++i) {
- behavior.SetVariable(variables[i].Name, variables[i]);
+ if (variables != null && synchronizeVariables.Value) {
+ for (int i = 0; i < variables.Count; ++i) {
+ behavior.SetVariable(variables[i].Name, variables[i]);
+ }
}
behavior.EnableBehavior();
diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta index e62076c2..14e6841b 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta @@ -1,8 +1,7 @@ -fileFormatVersion: 2
-guid: bc3d67c80371297439385b30f4be506c
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: bc3d67c80371297439385b30f4be506c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta index 6f958c5e..2c86afe9 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta @@ -1,8 +1,7 @@ -fileFormatVersion: 2
-guid: 130afc7e6aa6e0c4aba29097334aa66b
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 130afc7e6aa6e0c4aba29097334aa66b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Client/Assets/Behavior Designer/Runtime/Actions/Wait.cs.meta b/Client/Assets/Behavior Designer/Runtime/Actions/Wait.cs.meta index 85bfa79a..dbd9b1dc 100644 --- a/Client/Assets/Behavior Designer/Runtime/Actions/Wait.cs.meta +++ b/Client/Assets/Behavior Designer/Runtime/Actions/Wait.cs.meta @@ -1,8 +1,7 @@ -fileFormatVersion: 2
-guid: 67824d2e00531d84db9973773e4426e9
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
+fileFormatVersion: 2 +guid: 67824d2e00531d84db9973773e4426e9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} |