diff options
author | chai <chaifix@163.com> | 2021-01-27 16:30:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-27 16:30:19 +0800 |
commit | 6ee18886c8af3858de5e97599b23086823d9f320 (patch) | |
tree | aed86a8c4887586d976410ecd3d14789b2ee3583 /Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs | |
parent | 97da432c35b8c7aaf9dd2c39e2aa4b1f55f36065 (diff) |
*更新Behaviour Designer版本,在最下版本有BUG
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs')
-rw-r--r-- | Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs index f6977b2e..4a6b9cf1 100644 --- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs +++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs @@ -9,8 +9,6 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform [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 Transform")]
[RequiredField]
public SharedVector3 storeValue;
@@ -19,12 +17,10 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform public override void OnStart()
{
- if (!allowEmptyTarget.Value) {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
+ var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
+ if (currentGameObject != prevGameObject) {
+ targetTransform = currentGameObject.GetComponent<Transform>();
+ prevGameObject = currentGameObject;
}
}
@@ -43,7 +39,6 @@ namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform public override void OnReset()
{
targetGameObject = null;
- allowEmptyTarget = false;
storeValue = Vector3.zero;
}
}
|