summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs
index 84fa411d..9f4dc201 100644
--- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs
+++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Rigidbody/GetPosition.cs
@@ -8,8 +8,6 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityRigidbody
{
[Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
public SharedGameObject targetGameObject;
- [Tooltip("Can the target GameObject be empty?")]
- public SharedBool allowEmptyTarget;
[Tooltip("The position of the Rigidbody")]
[RequiredField]
public SharedVector3 storeValue;
@@ -20,12 +18,10 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityRigidbody
public override void OnStart()
{
- if (!allowEmptyTarget.Value) {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- rigidbody = currentGameObject.GetComponent<Rigidbody>();
- prevGameObject = currentGameObject;
- }
+ var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
+ if (currentGameObject != prevGameObject) {
+ rigidbody = currentGameObject.GetComponent<Rigidbody>();
+ prevGameObject = currentGameObject;
}
}
@@ -44,7 +40,6 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityRigidbody
public override void OnReset()
{
targetGameObject = null;
- allowEmptyTarget = false;
storeValue = Vector3.zero;
}
}