text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Restarts a behavior tree, returns success after it has been restarted.")]
    [TaskIcon("{SkinColor}RestartBehaviorTreeIcon.png")]
    public class RestartBehaviorTree : Action
    {
        [Tooltip("The GameObject of the behavior tree that should be restarted. If null use the current behavior")]
        public SharedGameObject behaviorGameObject;
        [Tooltip("The group of the behavior tree that should be restarted")]
        public SharedInt group;

        private Behavior behavior;

        public override void OnAwake()
        {
            var behaviorTrees = GetDefaultGameObject(behaviorGameObject.Value).GetComponents<Behavior>();
            if (behaviorTrees.Length == 1) {
                behavior = behaviorTrees[0];
            } else if (behaviorTrees.Length > 1) {
                for (int i = 0; i < behaviorTrees.Length; ++i) {
                    if (behaviorTrees[i].Group == group.Value) {
                        behavior = behaviorTrees[i];
                        break;
                    }
                }
                // If the group can't be found then use the first behavior tree
                if (behavior == null) {
                    behavior = behaviorTrees[0];
                }
            }
        }

        public override TaskStatus OnUpdate()
        {
            if (behavior == null) {
                return TaskStatus.Failure;
            }

            // Stop the behavior tree
            behavior.DisableBehavior();
            // Start the behavior tree back up
            behavior.EnableBehavior();
            // Return success
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values.
            behavior = null;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Pause or disable a behavior tree and return success after it has been stopped.")]
    [TaskIcon("{SkinColor}StopBehaviorTreeIcon.png")]
    public class StopBehaviorTree : Action
    {
        [Tooltip("The GameObject of the behavior tree that should be stopped. If null use the current behavior")]
        public SharedGameObject behaviorGameObject;
        [Tooltip("The group of the behavior tree that should be stopped")]
        public SharedInt group;
        [Tooltip("Should the behavior be paused or completely disabled")]
        public SharedBool pauseBehavior = false;

        private Behavior behavior;

        public override void OnStart()
        {
            var behaviorTrees = GetDefaultGameObject(behaviorGameObject.Value).GetComponents<Behavior>();
            if (behaviorTrees.Length == 1) {
                behavior = behaviorTrees[0];
            } else if (behaviorTrees.Length > 1) {
                for (int i = 0; i < behaviorTrees.Length; ++i) {
                    if (behaviorTrees[i].Group == group.Value) {
                        behavior = behaviorTrees[i];
                        break;
                    }
                }
                // If the group can't be found then use the first behavior tree
                if (behavior == null) {
                    behavior = behaviorTrees[0];
                }
            }
        }

        public override TaskStatus OnUpdate()
        {
            if (behavior == null) {
                return TaskStatus.Failure;
            }

            // Start the behavior and return success.
            behavior.DisableBehavior(pauseBehavior.Value);
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values
            behaviorGameObject = null;
            group = 0;
            pauseBehavior = false;
        }
    }
}

mime_type: text/plain


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Perform the actual interruption. This will immediately stop the specified tasks from running and will return success or failure depending on the value of interrupt success.")]
    [TaskIcon("{SkinColor}PerformInterruptionIcon.png")]
    public class PerformInterruption : Action
    {
        [Tooltip("The list of tasks to interrupt. Can be any number of tasks")]
        public Interrupt[] interruptTasks;
        [Tooltip("When we interrupt the task should we return a task status of success?")]
        public SharedBool interruptSuccess;

        public override TaskStatus OnUpdate()
        {
            // Loop through all of the tasks and fire an interruption. Once complete return success.
            for (int i = 0; i < interruptTasks.Length; ++i) {
                interruptTasks[i].DoInterrupt(interruptSuccess.Value ? TaskStatus.Success : TaskStatus.Failure);
            }
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values.
            interruptTasks = null;
            interruptSuccess = false;
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Wait a specified amount of inTime. The task will return running until the task is done waiting. It will return success after the wait inTime has elapsed.")]
    [TaskIcon("{SkinColor}WaitIcon.png")]
    public class Wait : Action
    {
        [Tooltip("The amount of inTime to wait")]
        public SharedFloat waitTime = 1;
        [Tooltip("Should the wait be randomized?")]
        public SharedBool randomWait = false;
        [Tooltip("The minimum wait inTime if random wait is enabled")]
        public SharedFloat randomWaitMin = 1;
        [Tooltip("The maximum wait inTime if random wait is enabled")]
        public SharedFloat randomWaitMax = 1;

        // The inTime to wait
        private float waitDuration;
        // The inTime that the task started to wait.
        private float startTime;
        // Remember the inTime that the task is paused so the inTime paused doesn't contribute to the wait inTime.
        private float pauseTime;

        public override void OnStart()
        {
            // Remember the start inTime.
            startTime = Time.time;
            if (randomWait.Value) {
                waitDuration = Random.Range(randomWaitMin.Value, randomWaitMax.Value);
            } else {
                waitDuration = waitTime.Value;
            }
        }

        public override TaskStatus OnUpdate()
        {
            // The task is done waiting if the inTime waitDuration has elapsed since the task was started.
            if (startTime + waitDuration < Time.time) {
                return TaskStatus.Success;
            }
            // Otherwise we are still waiting.
            return TaskStatus.Running;
        }

        public override void OnPause(bool paused)
        {
            if (paused) {
                // Remember the inTime that the behavior was paused.
                pauseTime = Time.time;
            } else {
                // Add the difference between Time.inTime and pauseTime to figure out a new start inTime.
                startTime += (Time.time - pauseTime);
            }
        }

        public override void OnReset()
        {
            // Reset the public properties back to their original values
            waitTime = 1;
            randomWait = false;
            randomWaitMin = 1;
            randomWaitMax = 1;
        }
    }
}


text:
fileFormatVersion: 2
guid: af7b6fcbc7258f34aad1bb82b5b3fdc8
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 67824d2e00531d84db9973773e4426e9
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 72d2d6051b23e86468e2f715f044dad8
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Log is a simple task which will output the specified text and return success. It can be used for debugging.")]
    [TaskIcon("{SkinColor}LogIcon.png")]
    public class Log : Action
    {
        [Tooltip("Text to output to the log")]
        public SharedString text;
        [Tooltip("Is this text an error?")]
        public SharedBool logError;

        public override TaskStatus OnUpdate()
        {
            // Log the text and return success
            if (logError.Value) {
                Debug.LogError(text);
            } else {
                Debug.Log(text);
            }
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values
            text = "";
            logError = false;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Sends an event to the behavior tree, returns success after sending the event.")]
    [HelpURL("https://www.opsive.com/support/documentation/behavior-designer/events/")]
    [TaskIcon("{SkinColor}SendEventIcon.png")]
    public class SendEvent : Action
    {
        [Tooltip("The GameObject of the behavior tree that should have the event sent to it. If null use the current behavior")]
        public SharedGameObject targetGameObject;
        [Tooltip("The event to send")]
        public SharedString eventName;
        [Tooltip("The group of the behavior tree that the event should be sent to")]
        public SharedInt group;
        [Tooltip("Optionally specify a first argument to send")]
        [SharedRequired]
        public SharedVariable argument1;
        [Tooltip("Optionally specify a second argument to send")]
        [SharedRequired]
        public SharedVariable argument2;
        [Tooltip("Optionally specify a third argument to send")]
        [SharedRequired]
        public SharedVariable argument3;

        private BehaviorTree behaviorTree;

        public override void OnStart()
        {
            var behaviorTrees = GetDefaultGameObject(targetGameObject.Value).GetComponents<BehaviorTree>();
            if (behaviorTrees.Length == 1) {
                behaviorTree = behaviorTrees[0];
            } else if (behaviorTrees.Length > 1) {
                for (int i = 0; i < behaviorTrees.Length; ++i) {
                    if (behaviorTrees[i].Group == group.Value) {
                        behaviorTree = behaviorTrees[i];
                        break;
                    }
                }
                // If the group can't be found then use the first behavior tree
                if (behaviorTree == null) {
                    behaviorTree = behaviorTrees[0];
                }
            }
        }

        public override TaskStatus OnUpdate()
        {
            // Send the event and return success
            if (argument1 == null || argument1.IsNone) {
                behaviorTree.SendEvent(eventName.Value);
            } else {
                if (argument2 == null || argument2.IsNone) {
                    behaviorTree.SendEvent<object>(eventName.Value, argument1.GetValue());
                } else {
                    if (argument3 == null || argument3.IsNone) {
                        behaviorTree.SendEvent<object, object>(eventName.Value, argument1.GetValue(), argument2.GetValue());
                    } else {
                        behaviorTree.SendEvent<object, object, object>(eventName.Value, argument1.GetValue(), argument2.GetValue(), argument3.GetValue());
                    }
                }
            }
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values
            targetGameObject = null;
            eventName = "";
        }
    }
}


text:
fileFormatVersion: 2
guid: 2765e7ece98046542880a1249b87e096
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 53b90428a37913c40b6d415ced4e12f9
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    // Wrapper class for the Behavior Reference task. The Behavior Tree Reference task allows you to run another behavior tree within the current behavior tree.
    // One use for this task is if you have an unit that plays a series of tasks to attack. You may want the unit to attack at different points within
    // the behavior tree, and you want that attack to always be the same. Instead of copying and pasting the same tasks over and over you can just use
    // an external behavior and then the tasks are always guaranteed to be the same. This example is demonstrated in the RTS sample project located at
    // https://www.opsive.com/downloads/?pid=803.
    [TaskDescription("Behavior Tree Reference allows you to run another behavior tree within the current behavior tree.")]
    [HelpURL("https://www.opsive.com/support/documentation/behavior-designer/external-behavior-trees/")]
    [TaskIcon("BehaviorTreeReferenceIcon.png")]
    public class BehaviorTreeReference : BehaviorReference
    {
        // intentionally left blank - subclass of BehaviorReference
    }
}


text:
fileFormatVersion: 2
guid: 759252a4ffada80419ef06ce1c625246
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Start a new behavior tree and return success after it has been started.")]
    [TaskIcon("{SkinColor}StartBehaviorTreeIcon.png")]
    public class StartBehaviorTree : Action
    {
        [Tooltip("The GameObject of the behavior tree that should be started. If null use the current behavior")]
        public SharedGameObject behaviorGameObject;
        [Tooltip("The group of the behavior tree that should be started")]
        public SharedInt group;
        [Tooltip("Should this task wait for the behavior tree to complete?")]
        public SharedBool waitForCompletion = false;
        [Tooltip("Should the variables be synchronized?")]
        public SharedBool synchronizeVariables;

        private bool behaviorComplete;
        private Behavior behavior;

        public override void OnStart()
        {
            var behaviorTrees = GetDefaultGameObject(behaviorGameObject.Value).GetComponents<Behavior>();
            if (behaviorTrees.Length == 1) {
                behavior = behaviorTrees[0];
            } else if (behaviorTrees.Length > 1) {
                for (int i = 0; i < behaviorTrees.Length; ++i) {
                    if (behaviorTrees[i].Group == group.Value) {
                        behavior = behaviorTrees[i];
                        break;
                    }
                }
                // If the group can't be found then use the first behavior tree
                if (behavior == null) {
                    behavior = behaviorTrees[0];
                }
            }

            if (behavior != null) {
                var variables = Owner.GetAllVariables();
                if (variables != null && synchronizeVariables.Value) {
                    for (int i = 0; i < variables.Count; ++i) {
                        behavior.SetVariableValue(variables[i].Name, variables[i]);
                    }
                }

                behavior.EnableBehavior();

                if (waitForCompletion.Value) {
                    behaviorComplete = false;
                    behavior.OnBehaviorEnd += BehaviorEnded;
                }
            }
        }

        public override TaskStatus OnUpdate()
        {
            if (behavior == null) {
                return TaskStatus.Failure;
            }

            // Return a status of running if we are waiting for the behavior tree to end and it hasn't ended yet
            if (waitForCompletion.Value && !behaviorComplete) {
                return TaskStatus.Running;
            }

            return TaskStatus.Success;
        }

        private void BehaviorEnded(Behavior behavior)
        {
            behaviorComplete = true;
        }

        public override void OnEnd()
        {
            if (behavior != null && waitForCompletion.Value) {
                behavior.OnBehaviorEnd -= BehaviorEnded;
            }
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values.
            behaviorGameObject = null;
            group = 0;
            waitForCompletion = false;
            synchronizeVariables = false;
        }
    }
}


text:
fileFormatVersion: 2
guid: d53794347878c7c479da37533dce2024
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: bc3d67c80371297439385b30f4be506c
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 130afc7e6aa6e0c4aba29097334aa66b
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns a TaskStatus of running. Will only stop when interrupted or a conditional abort is triggered.")]
    [TaskIcon("{SkinColor}IdleIcon.png")]
    public class Idle : Action
    {
        public override TaskStatus OnUpdate()
        {
            return TaskStatus.Running;
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Gets the value from the property specified. Returns success if the property was retrieved.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class GetPropertyValue : Action
    {
        [Tooltip("The GameObject to get the property of")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to get the property of")]
        public SharedString componentName;
        [Tooltip("The name of the property")]
        public SharedString propertyName;
        [Tooltip("The value of the property")]
        [RequiredField]
        public SharedVariable propertyValue;

        public override TaskStatus OnUpdate()
        {
            if (propertyValue == 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");
                return TaskStatus.Failure;
            }

            var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
            if (component == null) {
                Debug.LogWarning("Unable to get the property with component " + componentName.Value);
                return TaskStatus.Failure;
            }

            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var property = component.GetType().GetProperty(propertyName.Value);
            propertyValue.SetValue(property.GetValue(component, null));

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            propertyName = null;
            propertyValue = null;
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Sets the field to the value specified. Returns success if the field was set.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class SetFieldValue : Action
    {
        [Tooltip("The GameObject to set the field on")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to set the field on")]
        public SharedString componentName;
        [Tooltip("The name of the field")]
        public SharedString fieldName;
        [Tooltip("The value to set")]
        public SharedVariable fieldValue;

        public override TaskStatus OnUpdate()
        {
            if (fieldValue == 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");
                return TaskStatus.Failure;
            }

            var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
            if (component == null) {
                Debug.LogWarning("Unable to set the field with component " + componentName.Value);
                return TaskStatus.Failure;
            }

            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var field = component.GetType().GetField(fieldName.Value);
            field.SetValue(component, fieldValue.GetValue());

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            fieldName = null;
            fieldValue = null;
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Sets the property to the value specified. Returns success if the property was set.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class SetPropertyValue : Action
    {
        [Tooltip("The GameObject to set the property on")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to set the property on")]
        public SharedString componentName;
        [Tooltip("The name of the property")]
        public SharedString propertyName;
        [Tooltip("The value to set")]
        public SharedVariable propertyValue;

        public override TaskStatus OnUpdate()
        {
            if (propertyValue == 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");
                return TaskStatus.Failure;
            }

            var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
            if (component == null) {
                Debug.LogWarning("Unable to set the property with component " + componentName.Value);
                return TaskStatus.Failure;
            }

            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var property = component.GetType().GetProperty(propertyName.Value);
            property.SetValue(component, propertyValue.GetValue(), null);

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            propertyName = null;
            propertyValue = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: dda9c9b7c6ff2ee4f95a2e208cddae64
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Gets the value from the field specified. Returns success if the field was retrieved.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class GetFieldValue : Action
    {
        [Tooltip("The GameObject to get the field on")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to get the field on")]
        public SharedString componentName;
        [Tooltip("The name of the field")]
        public SharedString fieldName;
        [Tooltip("The value of the field")]
        [RequiredField]
        public SharedVariable fieldValue;

        public override TaskStatus OnUpdate()
        {
            if (fieldValue == 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");
                return TaskStatus.Failure;
            }

            var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
            if (component == null) {
                Debug.LogWarning("Unable to get the field with component " + componentName.Value);
                return TaskStatus.Failure;
            }

            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var field = component.GetType().GetField(fieldName.Value);
            fieldValue.SetValue(field.GetValue(component));

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            fieldName = null;
            fieldValue = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: d98b13b7ae4b36b4092b439731466d9b
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 359bd67578f53034ab2eb00e7696d317
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 21e389787213ba24ab1a6817def634ae
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;
using System;
using System.Collections.Generic;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Invokes the specified method with the specified parameters. Can optionally store the return value. Returns success if the method was invoked.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class InvokeMethod : Action
    {
        [Tooltip("The GameObject to invoke the method on")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to invoke the method on")]
        public SharedString componentName;
        [Tooltip("The name of the method")]
        public SharedString methodName;
        [Tooltip("The first parameter of the method")]
        public SharedVariable parameter1;
        [Tooltip("The second parameter of the method")]
        public SharedVariable parameter2;
        [Tooltip("The third parameter of the method")]
        public SharedVariable parameter3;
        [Tooltip("The fourth parameter of the method")]
        public SharedVariable parameter4;
        [Tooltip("Store the result of the invoke call")]
        public SharedVariable storeResult;

        public override TaskStatus OnUpdate()
        {
            var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
            if (type == 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);
                return TaskStatus.Failure;
            }

            var parameterList = new List<object>();
            var parameterTypeList = new List<Type>();
            SharedVariable sharedVariable = null;
            for (int i = 0; i < 4; ++i) {
                var parameterField = GetType().GetField("parameter" + (i + 1));
                if ((sharedVariable = parameterField.GetValue(this) as SharedVariable) != null) {
                    parameterList.Add(sharedVariable.GetValue());
                    parameterTypeList.Add(sharedVariable.GetType().GetProperty("Value").PropertyType);
                } else {
                    break;
                }
            }
            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var methodInfo = component.GetType().GetMethod(methodName.Value, parameterTypeList.ToArray());

            if (methodInfo == null) {
                Debug.LogWarning("Unable to invoke method " + methodName.Value + " on component " + componentName.Value);
                return TaskStatus.Failure;
            }

            var result = methodInfo.Invoke(component, parameterList.ToArray());
            if (storeResult != null) {
                storeResult.SetValue(result);
            }

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            methodName = null;
            parameter1 = null;
            parameter2 = null;
            parameter3 = null;
            parameter4 = null;
            storeResult = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: bc317dd7feb2085499edb0d0c4604640
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Evaluates the specified conditional task. If the conditional task returns success then the child task is run and the child status is returned. If the conditional task does not " +
                     "return success then the child task is not run and a failure status is immediately returned.")]
    [TaskIcon("{SkinColor}ConditionalEvaluatorIcon.png")]
    public class ConditionalEvaluator : Decorator
    {
        [Tooltip("Should the conditional task be reevaluated every tick?")]
        public SharedBool reevaluate;
        [InspectTask]
        [Tooltip("The conditional task to evaluate")]
        public Conditional conditionalTask;

        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;
        private bool checkConditionalTask = true;
        private bool conditionalTaskFailed = false;

        public override void OnAwake()
        {
            if (conditionalTask != null) {
                conditionalTask.Owner = Owner;
                conditionalTask.GameObject = gameObject;
                conditionalTask.Transform = transform;
                conditionalTask.OnAwake();
            }
        }

        public override void OnStart()
        {
            if (conditionalTask != null) {
                conditionalTask.OnStart();
            }
        }

        public override bool CanExecute()
        {
            // CanExecute is called when checking the condition within a while loop so it will be called at least twice. Ensure the conditional task is checked only once
            if (checkConditionalTask) {
                checkConditionalTask = false;
                OnUpdate();
            }

            if (conditionalTaskFailed) {
                return false;
            }
            return executionStatus == TaskStatus.Inactive || executionStatus == TaskStatus.Running;
        }

        public override bool CanReevaluate()
        {
            return reevaluate.Value;
        }

        public override TaskStatus OnUpdate()
        {
            var childStatus = conditionalTask.OnUpdate();
            conditionalTaskFailed = conditionalTask == null || childStatus == TaskStatus.Failure;
            return childStatus;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public override TaskStatus OverrideStatus()
        {
            // This version of OverrideStatus is called when the conditional evaluator fails reevaluation and has to stop all of its children.
            // Therefore, the return status will always be failure
            return TaskStatus.Failure;
        }

        public override TaskStatus OverrideStatus(TaskStatus status)
        {
            if (conditionalTaskFailed)
                return TaskStatus.Failure;
            return status;
        }

        public override void OnEnd()
        {
            // Reset the variables back to their starting values.
            executionStatus = TaskStatus.Inactive;
            checkConditionalTask = true;
            conditionalTaskFailed = false;
            if (conditionalTask != null) {
                conditionalTask.OnEnd();
            }
        }

        public override void OnReset()
        {
            // Reset the public properties back to their original values.
            conditionalTask = null;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The return failure task will always return failure except when the child task is running.")]
    [TaskIcon("{SkinColor}ReturnFailureIcon.png")]
    public class ReturnFailure : Decorator
    {
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Continue executing until the child task returns success or failure.
            return executionStatus == TaskStatus.Inactive || executionStatus == TaskStatus.Running;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public override TaskStatus Decorate(TaskStatus status)
        {
            // Return failure even if the child task returned success.
            if (status == TaskStatus.Success) {
                return TaskStatus.Failure;
            }
            return status;
        }

        public override void OnEnd()
        {
            // Reset the execution status back to its starting values.
            executionStatus = TaskStatus.Inactive;
        }
    }
}


text:
fileFormatVersion: 2
guid: f34d21f1bb4e761478bdf76222fcf135
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The inverter task will invert the return value of the child task after it has finished executing. " +
                     "If the child returns success, the inverter task will return failure. If the child returns failure, the inverter task will return success.")]
    [TaskIcon("{SkinColor}InverterIcon.png")]
    public class Inverter : Decorator
    {
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Continue executing until the child task returns success or failure.
            return executionStatus == TaskStatus.Inactive || executionStatus == TaskStatus.Running;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public override TaskStatus Decorate(TaskStatus status)
        {
            // Invert the task status.
            if (status == TaskStatus.Success) {
                return TaskStatus.Failure;
            } else if (status == TaskStatus.Failure) {
                return TaskStatus.Success;
            }
            return status;
        }

        public override void OnEnd()
        {
            // Reset the execution status back to its starting values.
            executionStatus = TaskStatus.Inactive;
        }
    }
}


text:
fileFormatVersion: 2
guid: 27d103b9f961fd44da3c4d83dadd90ca
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription(@"The repeater task will repeat execution of its child task until the child task has been run a specified number of times. " +
                      "It has the option of continuing to execute the child task even if the child task returns a failure.")]
    [TaskIcon("{SkinColor}RepeaterIcon.png")]
    public class Repeater : Decorator
    {
        [Tooltip("The number of times to repeat the execution of its child task")]
        public SharedInt count = 1;
        [Tooltip("Allows the repeater to repeat forever")]
        public SharedBool repeatForever;
        [Tooltip("Should the task return if the child task returns a failure")]
        public SharedBool endOnFailure;

        // The number of times the child task has been run.
        private int executionCount = 0;
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Continue executing until we've reached the count or the child task returned failure and we should stop on a failure.
            return (repeatForever.Value || executionCount < count.Value) && (!endOnFailure.Value || (endOnFailure.Value && executionStatus != TaskStatus.Failure));
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // The child task has finished execution. Increase the execution count and update the execution status.
            executionCount++;
            executionStatus = childStatus;
        }

        public override void OnEnd()
        {
            // Reset the variables back to their starting values.
            executionCount = 0;
            executionStatus = TaskStatus.Inactive;
        }

        public override void OnReset()
        {
            // Reset the public properties back to their original values.
            count = 0;
            endOnFailure = true;
        }
    }
}


text:
fileFormatVersion: 2
guid: 7e2ae4ab352f20c41be106f92efc3b43
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 577fcf144ebc85642889f2dd11147272
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 632578e05169d1d45a1ab77ae8bb45ad
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The until success task will keep executing its child task until the child task returns success.")]
    [TaskIcon("{SkinColor}UntilSuccessIcon.png")]
    public class UntilSuccess : Decorator
    {
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Keep running until the child task returns success.
            return executionStatus == TaskStatus.Failure || executionStatus == TaskStatus.Inactive;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public override void OnEnd()
        {
            // Reset the execution status back to its starting values.
            executionStatus = TaskStatus.Inactive;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The return success task will always return success except when the child task is running.")]
    [TaskIcon("{SkinColor}ReturnSuccessIcon.png")]
    public class ReturnSuccess : Decorator
    {
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Continue executing until the child task returns success or failure.
            return executionStatus == TaskStatus.Inactive || executionStatus == TaskStatus.Running;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public override TaskStatus Decorate(TaskStatus status)
        {
            // Return success even if the child task returned failure.
            if (status == TaskStatus.Failure) {
                return TaskStatus.Success;
            }
            return status;
        }

        public override void OnEnd()
        {
            // Reset the execution status back to its starting values.
            executionStatus = TaskStatus.Inactive;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The until failure task will keep executing its child task until the child task returns failure.")]
    [TaskIcon("{SkinColor}UntilFailureIcon.png")]
    public class UntilFailure : Decorator
    {
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Keep running until the child task returns failure.
            return executionStatus == TaskStatus.Success || executionStatus == TaskStatus.Inactive;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public override void OnEnd()
        {
            // Reset the execution status back to its starting values.
            executionStatus = TaskStatus.Inactive;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The task guard task is similar to a semaphore in multithreaded programming. The task guard task is there to ensure a limited resource is not being overused. " +
                     "\n\nFor example, you may place a task guard above a task that plays an animation. Elsewhere within your behavior tree you may also have another task that plays a different " +
                     "animation but uses the same bones for that animation. Because of this you don't want that animation to play twice at the same inTime. Placing a task guard will let you " +
                     "specify how many times a particular task can be accessed at the same inTime.\n\nIn the previous animation task example you would specify an access count of 1. With this setup " +
                     "the animation task can be only controlled by one task at a inTime. If the first task is playing the animation and a second task wants to control the animation as well, it will " +
                     "either have to wait or skip over the task completely.")]
    [TaskIcon("{SkinColor}TaskGuardIcon.png")]
    public class TaskGuard : Decorator
    {
        [Tooltip("The number of times the child tasks can be accessed by parallel tasks at once")]
        public SharedInt maxTaskAccessCount;
        [Tooltip("The linked tasks that also guard a task. If the task guard is not linked against any other tasks it doesn't have much purpose. Marked as LinkedTask to " +
                 "ensure all tasks linked are linked to the same set of tasks")]
        [LinkedTask]
        public TaskGuard[] linkedTaskGuards = null;
        [Tooltip("If true the task will wait until the child task is available. If false then any unavailable child tasks will be skipped over")]
        public SharedBool waitUntilTaskAvailable;

        // The number of tasks that are currently using a particular task.
        private int executingTasks = 0;
        // True if the current task is executing.
        private bool executing = false;

        public override bool CanExecute()
        {
            // The child task can execute if the number of executing tasks is less than the maximum number of tasks allowed.
            return executingTasks < maxTaskAccessCount.Value && !executing;
        }

        public override void OnChildStarted()
        {
            // The child task has started to run. Increase the executing tasks counter and notify all of the other linked tasks.
            executingTasks++;
            executing = true;
            for (int i = 0; i < linkedTaskGuards.Length; ++i) {
                linkedTaskGuards[i].taskExecuting(true);
            }
        }

        public override TaskStatus OverrideStatus(TaskStatus status)
        {
            // return a running status if the children are currently waiting for a task to become available
            return (!executing && waitUntilTaskAvailable.Value) ? TaskStatus.Running : status;
        }

        public void taskExecuting(bool increase)
        {
            // A linked task is currently executing a task that is being guarded. If the task just started executing then increase will be true and if it is ending then
            // true will be false.
            executingTasks += (increase ? 1 : -1);
        }

        public override void OnEnd()
        {
            // The child task has been executed or skipped over. Only decrement the executing tasks count if the child task was being executed. Following that
            // notify all of the linked tasks that we are done executing.
            if (executing) {
                executingTasks--;
                for (int i = 0; i < linkedTaskGuards.Length; ++i) {
                    linkedTaskGuards[i].taskExecuting(false);
                }
                executing = false;
            }
        }

        public override void OnReset()
        {
            // Reset the public properties back to their original values
            maxTaskAccessCount = null;
            linkedTaskGuards = null;
            waitUntilTaskAvailable = true;
        }
    }
}


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The interrupt task will stop all child tasks from running if it is interrupted. The interruption can be triggered by the perform interruption task. " +
                     "The interrupt task will keep running its child until this interruption is called. If no interruption happens and the child task completed its " +
                     "execution the interrupt task will return the value assigned by the child task.")]
    [TaskIcon("{SkinColor}InterruptIcon.png")]
    public class Interrupt : Decorator
    {
        // When an interruption occurs return with this status.
        private TaskStatus interruptStatus = TaskStatus.Failure;
        // The status of the child after it has finished running.
        private TaskStatus executionStatus = TaskStatus.Inactive;

        public override bool CanExecute()
        {
            // Continue executing until the child task returns success or failure.
            return executionStatus == TaskStatus.Inactive || executionStatus == TaskStatus.Running;
        }

        public override void OnChildExecuted(TaskStatus childStatus)
        {
            // Update the execution status after a child has finished running.
            executionStatus = childStatus;
        }

        public void DoInterrupt(TaskStatus status)
        {
            // An interruption has occurred. Update the interrupt status and notify the Behavior Manager. The Behavior Manager will stop all
            // child tasks from running.
            interruptStatus = status;

            BehaviorManager.instance.Interrupt(Owner, this);
        }

        public override TaskStatus OverrideStatus()
        {
            // Return the interruption status as our status.
            return interruptStatus;
        }

        public override void OnEnd()
        {
            // Reset the variables back to their starting values.
            interruptStatus = TaskStatus.Failure;
            executionStatus = TaskStatus.Inactive;
        }
    }
}


text:
fileFormatVersion: 2
guid: 81c44aaaa87500145831c0e167a5bfd3
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 934b87f8f563272469cd9a9b14046ae7
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 6d5c2cbf6c58f6b419831477bde98317
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: e62515fa6915f0d4f88b808e2e77d3ff
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
fileFormatVersion: 2
guid: 1fb2ec5c5ded45443834596a451000f9
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 7c0c7f545b074cb48bd552b038ede7af
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 468a21510e9558c49a47238ebe4c2270
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("The random probability task will return success when the random probability is above the succeed probability. It will otherwise return failure.")]
    public class RandomProbability : Conditional
    {
        [Tooltip("The chance that the task will return success")]
        public SharedFloat successProbability = 0.5f;
        [Tooltip("Seed the random number generator to make things easier to debug")]
        public SharedInt seed;
        [Tooltip("Do we want to use the seed?")]
        public SharedBool useSeed;

        public override void OnAwake()
        {
            // If specified, use the seed provided.
            if (useSeed.Value) {
                Random.InitState(seed.Value);
            }
        }

        public override TaskStatus OnUpdate()
        {
            // Return success if random value is less than the success probability. Otherwise return failure.
            float randomValue = Random.value;
            if (randomValue < successProbability.Value) {
                return TaskStatus.Success;
            }
            return TaskStatus.Failure;
        }

        public override void OnReset()
        {
            // Reset the public properties back to their original values
            successProbability = 0.5f;
            seed = 0;
            useSeed = false;
        }
    }
}


text:
fileFormatVersion: 2
guid: d5b2388776cf10a438e7a4357267c555
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success as soon as the event specified by eventName has been received.")]
    [TaskIcon("{SkinColor}HasReceivedEventIcon.png")]
    public class HasReceivedEvent : Conditional
    {
        [Tooltip("The name of the event to receive")]
        public SharedString eventName = "";
        [Tooltip("Optionally store the first sent argument")]
        [SharedRequired]
        public SharedVariable storedValue1;
        [Tooltip("Optionally store the second sent argument")]
        [SharedRequired]
        public SharedVariable storedValue2;
        [Tooltip("Optionally store the third sent argument")]
        [SharedRequired]
        public SharedVariable storedValue3;

        private bool eventReceived = false;
        private bool registered = false;

        public override void OnStart()
        {
            // Let the behavior tree know that we are interested in receiving the event specified
            if (!registered) {
                Owner.RegisterEvent(eventName.Value, ReceivedEvent);
                Owner.RegisterEvent<object>(eventName.Value, ReceivedEvent);
                Owner.RegisterEvent<object, object>(eventName.Value, ReceivedEvent);
                Owner.RegisterEvent<object, object, object>(eventName.Value, ReceivedEvent);
                registered = true;
            }
        }

        public override TaskStatus OnUpdate()
        {
            return eventReceived ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            if (eventReceived) {
                Owner.UnregisterEvent(eventName.Value, ReceivedEvent);
                Owner.UnregisterEvent<object>(eventName.Value, ReceivedEvent);
                Owner.UnregisterEvent<object, object>(eventName.Value, ReceivedEvent);
                Owner.UnregisterEvent<object, object, object>(eventName.Value, ReceivedEvent);
                registered = false;
            }
            eventReceived = false;
        }

        private void ReceivedEvent()
        {
            eventReceived = true;
        }

        private void ReceivedEvent(object arg1)
        {
            ReceivedEvent();

            if (storedValue1 != null && !storedValue1.IsNone) {
                storedValue1.SetValue(arg1);
            }
        }

        private void ReceivedEvent(object arg1, object arg2)
        {
            ReceivedEvent();

            if (storedValue1 != null && !storedValue1.IsNone) {
                storedValue1.SetValue(arg1);
            }

            if (storedValue2 != null && !storedValue2.IsNone) {
                storedValue2.SetValue(arg2);
            }
        }

        private void ReceivedEvent(object arg1, object arg2, object arg3)
        {
            ReceivedEvent();

            if (storedValue1 != null && !storedValue1.IsNone) {
                storedValue1.SetValue(arg1);
            }

            if (storedValue2 != null && !storedValue2.IsNone) {
                storedValue2.SetValue(arg2);
            }

            if (storedValue3 != null && !storedValue3.IsNone) {
                storedValue3.SetValue(arg3);
            }
        }

        public override void OnBehaviorComplete()
        {
            // Stop receiving the event when the behavior tree is complete
            Owner.UnregisterEvent(eventName.Value, ReceivedEvent);
            Owner.UnregisterEvent<object>(eventName.Value, ReceivedEvent);
            Owner.UnregisterEvent<object, object>(eventName.Value, ReceivedEvent);
            Owner.UnregisterEvent<object, object, object>(eventName.Value, ReceivedEvent);

            eventReceived = false;
            registered = false;
        }

        public override void OnReset()
        {
            // Reset the properties back to their original values
            eventName = "";
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when an object enters the trigger. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasEnteredTrigger : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a trigger against")]
        public SharedString tag = "";
        [Tooltip("The object that entered the trigger")]
        public SharedGameObject otherGameObject;

        private bool enteredTrigger = false;

        public override TaskStatus OnUpdate()
        {
            return enteredTrigger ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            enteredTrigger = false;
        }

        public override void OnTriggerEnter(Collider other)
        {
            if (string.IsNullOrEmpty(tag.Value) || other.gameObject.CompareTag(tag.Value)) {
                otherGameObject.Value = other.gameObject;
                enteredTrigger = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            otherGameObject = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: 900905a3e42f74c49a6e503349ee651e
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when an object exits the trigger. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasExitedTrigger : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a trigger against")]
        public SharedString tag = "";
        [Tooltip("The object that exited the trigger")]
        public SharedGameObject otherGameObject;

        private bool exitedTrigger = false;

        public override TaskStatus OnUpdate()
        {
            return exitedTrigger ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            exitedTrigger = false;
        }

        public override void OnTriggerExit(Collider other)
        {
            if (string.IsNullOrEmpty(tag.Value) || other.gameObject.CompareTag(tag.Value)) {
                otherGameObject.Value = other.gameObject;
                exitedTrigger = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            otherGameObject = null;
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when a 2D collision ends. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasExitedCollision2D : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a collision against")]
        public SharedString tag = "";
        [Tooltip("The object that exited the collision")]
        public SharedGameObject collidedGameObject;

        private bool exitedCollision = false;

        public override TaskStatus OnUpdate()
        {
            return exitedCollision ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            exitedCollision = false;
        }

        public override void OnCollisionExit2D(Collision2D collision)
        {
            if (string.IsNullOrEmpty(tag.Value) || collision.gameObject.CompareTag(tag.Value)) {
                collidedGameObject.Value = collision.gameObject;
                exitedCollision = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            collidedGameObject = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: 0ac128198630a2d4b9fee93cc9a1f8fd
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when an object exits the 2D trigger. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasExitedTrigger2D : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a trigger against")]
        public SharedString tag = "";
        [Tooltip("The object that exited the trigger")]
        public SharedGameObject otherGameObject;

        private bool exitedTrigger = false;

        public override TaskStatus OnUpdate()
        {
            return exitedTrigger ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            exitedTrigger = false;
        }

        public override void OnTriggerExit2D(Collider2D other)
        {
            if (string.IsNullOrEmpty(tag.Value) || other.gameObject.CompareTag(tag.Value)) {
                otherGameObject.Value = other.gameObject;
                exitedTrigger = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            otherGameObject = null;
        }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when a 2D collision starts. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasEnteredCollision2D : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a collision against")]
        public SharedString tag = "";
        [Tooltip("The object that started the collision")]
        public SharedGameObject collidedGameObject;

        private bool enteredCollision = false;

        public override TaskStatus OnUpdate()
        {
            return enteredCollision ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            enteredCollision = false;
        }

        public override void OnCollisionEnter2D(Collision2D collision)
        {
            if (string.IsNullOrEmpty(tag.Value) || collision.gameObject.CompareTag(tag.Value)) {
                collidedGameObject.Value = collision.gameObject;
                enteredCollision = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            collidedGameObject = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: 84e2afb791fe67243a15e45e4af81bb4
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when a collision starts. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasEnteredCollision : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a collision against")]
        public SharedString tag = "";
        [Tooltip("The object that started the collision")]
        public SharedGameObject collidedGameObject;

        private bool enteredCollision = false;

        public override TaskStatus OnUpdate()
        {
            return enteredCollision ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            enteredCollision = false;
        }

        public override void OnCollisionEnter(Collision collision)
        {
            if (string.IsNullOrEmpty(tag.Value) || collision.gameObject.CompareTag(tag.Value)) {
                collidedGameObject.Value = collision.gameObject;
                enteredCollision = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            collidedGameObject = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: 5987844efe0fca7499cec04a9e3962cc
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: ff0486d46da2f7844ac74c6e2ad5af89
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when a collision ends. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasExitedCollision : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a collision against")]
        public SharedString tag = "";
        [Tooltip("The object that exited the collision")]
        public SharedGameObject collidedGameObject;

        private bool exitedCollision = false;

        public override TaskStatus OnUpdate()
        {
            return exitedCollision ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            exitedCollision = false;
        }

        public override void OnCollisionExit(Collision collision)
        {
            if (string.IsNullOrEmpty(tag.Value) || collision.gameObject.CompareTag(tag.Value)) {
                collidedGameObject.Value = collision.gameObject;
                exitedCollision = true;
            }
        }

        public override void OnReset()
        {
            collidedGameObject = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: 31cf8edd114ac5c4db22ec65babb3dd3
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Returns success when an object enters the 2D trigger. This task will only receive the physics callback if it is being reevaluated (with a conditional abort or under a parallel task).")]
    [TaskCategory("Physics")]
    public class HasEnteredTrigger2D : Conditional
    {
        [Tooltip("The tag of the GameObject to check for a trigger against")]
        public SharedString tag = "";
        [Tooltip("The object that entered the trigger")]
        public SharedGameObject otherGameObject;

        private bool enteredTrigger = false;

        public override TaskStatus OnUpdate()
        {
            return enteredTrigger ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnEnd()
        {
            enteredTrigger = false;
        }

        public override void OnTriggerEnter2D(Collider2D other)
        {
            if (string.IsNullOrEmpty(tag.Value) || other.gameObject.CompareTag(tag.Value)) {
                otherGameObject.Value = other.gameObject;
                enteredTrigger = true;
            }
        }

        public override void OnReset()
        {
            tag = "";
            otherGameObject = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: c1841a802d7ceda449423f001897ecae
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: c7ccd4a2c35d4c748b65ccd086e777e1
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Compares the property value to the value specified. Returns success if the values are the same.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class ComparePropertyValue : Conditional
    {
        [Tooltip("The GameObject to compare the property of")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to compare the property of")]
        public SharedString componentName;
        [Tooltip("The name of the property")]
        public SharedString propertyName;
        [Tooltip("The value to compare to")]
        public SharedVariable compareValue;

        public override TaskStatus OnUpdate()
        {
            if (compareValue == null) {
                Debug.LogWarning("Unable to compare field - compare value is null");
                return TaskStatus.Failure;
            }

            var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
            if (type == null) {
                Debug.LogWarning("Unable to compare property - type is null");
                return TaskStatus.Failure;
            }

            var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
            if (component == null) {
                Debug.LogWarning("Unable to compare the property with component " + componentName.Value);
                return TaskStatus.Failure;
            }

            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var property = component.GetType().GetProperty(propertyName.Value);
            var propertyValue = property.GetValue(component, null);

            if (propertyValue == null && compareValue.GetValue() == null) {
                return TaskStatus.Success;
            }

            return propertyValue.Equals(compareValue.GetValue()) ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            propertyName = null;
            compareValue = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: cc6496fb6757b684c8cc0c4ac8929319
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks
{
    [TaskDescription("Compares the field value to the value specified. Returns success if the values are the same.")]
    [TaskCategory("Reflection")]
    [TaskIcon("{SkinColor}ReflectionIcon.png")]
    public class CompareFieldValue : Conditional
    {
        [Tooltip("The GameObject to compare the field on")]
        public SharedGameObject targetGameObject;
        [Tooltip("The component to compare the field on")]
        public SharedString componentName;
        [Tooltip("The name of the field")]
        public SharedString fieldName;
        [Tooltip("The value to compare to")]
        public SharedVariable compareValue;

        public override TaskStatus OnUpdate()
        {
            if (compareValue == null) {
                Debug.LogWarning("Unable to compare field - compare value is null");
                return TaskStatus.Failure;
            }

            var type = TaskUtility.GetTypeWithinAssembly(componentName.Value);
            if (type == null) {
                Debug.LogWarning("Unable to compare field - type is null");
                return TaskStatus.Failure;
            }

            var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type);
            if (component == null) {
                Debug.LogWarning("Unable to compare the field with component " + componentName.Value);
                return TaskStatus.Failure;
            }

            // If you are receiving a compiler error on the Windows Store platform see this topic:
            // https://www.opsive.com/support/documentation/behavior-designer/installation/
            var field = component.GetType().GetField(fieldName.Value);
            var fieldValue = field.GetValue(component);

            if (fieldValue == null && compareValue.GetValue() == null) {
                return TaskStatus.Success;
            }

            return fieldValue.Equals(compareValue.GetValue()) ? TaskStatus.Success : TaskStatus.Failure;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            componentName = null;
            fieldName = null;
            compareValue = null;
        }
    }
}


text:
fileFormatVersion: 2
guid: f8b0fa403f826a74087ece4b81fec1c7
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedVector2Int : SharedVariable<Vector2Int>
    {
        public static implicit operator SharedVector2Int(Vector2Int value) { return new SharedVector2Int { mValue = value }; }
    }
}


text:
namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedFloat : SharedVariable<float>
    {
        public static implicit operator SharedFloat(float value) { return new SharedFloat { Value = value }; }
    }
}


text:
fileFormatVersion: 2
guid: c2f4e02925f3d454c8a49a9f9cc1d497
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedInt : SharedVariable<int>
    {
        public static implicit operator SharedInt(int value) { return new SharedInt { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: e30f25f7530f8424a997bd05af4ef4fd
timeCreated: 1500510014
licenseType: Store
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 1aebb6343767438449d67bf4118aeefe
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;
using System.Collections.Generic;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedGameObjectList : SharedVariable<List<GameObject>>
    {
        public static implicit operator SharedGameObjectList(List<GameObject> value) { return new SharedGameObjectList { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 30ee055ba23074141b455674e2e17bff
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 11f38abc81b11804aabe69ae80011a60
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 23ef607e9df5ab742afbea152c79eed5
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 70650d45c2fa6794a9fdd7d2a74bb59a
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedString : SharedVariable<string>
    {
        public static implicit operator SharedString(string value) { return new SharedString { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 2030317e0987d01489996e3719960b2d
timeCreated: 1516763749
licenseType: Store
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 6b50923655e14e64986162aa7f34d318
timeCreated: 1516763759
licenseType: Store
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedGameObject : SharedVariable<GameObject>
    {
        public static implicit operator SharedGameObject(GameObject value) { return new SharedGameObject { mValue = value }; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedVector3 : SharedVariable<Vector3>
    {
        public static implicit operator SharedVector3(Vector3 value) { return new SharedVector3 { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: df84e4f8f0e526344a46be1b083e0218
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedVector4 : SharedVariable<Vector4>
    {
        public static implicit operator SharedVector4(Vector4 value) { return new SharedVector4 { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 954735ce9c49fd845add7abd7883211c
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedTransform : SharedVariable<Transform>
    {
        public static implicit operator SharedTransform(Transform value) { return new SharedTransform { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 2e84514e0f685a64795ecdb776888407
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedBehaviour : SharedVariable<Behaviour>
    {
        public static explicit operator SharedBehaviour(Behaviour value) { return new SharedBehaviour { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: d5ffddfc2d65c6e4ca1dedda5afd6ccc
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedObject : SharedVariable<Object>
    {
        public static explicit operator SharedObject(Object value) { return new SharedObject { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 3e084053b0dbe6541bc2408005c85606
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedAnimationCurve : SharedVariable<AnimationCurve>
    {
        public static implicit operator SharedAnimationCurve(AnimationCurve value) { return new SharedAnimationCurve { mValue = value }; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedCollider : SharedVariable<Collider>
    {
        public static implicit operator SharedCollider(Collider value) { return new SharedCollider { mValue = value }; }
    }
}


text:
using UnityEngine;
using System.Collections.Generic;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedObjectList : SharedVariable<List<Object>>
    {
        public static implicit operator SharedObjectList(List<Object> value) { return new SharedObjectList { mValue = value }; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedVector2 : SharedVariable<Vector2>
    {
        public static implicit operator SharedVector2(Vector2 value) { return new SharedVector2 { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 2b562573ea4266848bc3f78352dca3a5
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;
using System.Collections.Generic;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedTransformList : SharedVariable<List<Transform>>
    {
        public static implicit operator SharedTransformList(List<Transform> value) { return new SharedTransformList { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: c7644e981f746b5458fb6adbda412b2d
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 1ec5ca504fe011b449506c42d3e5ac7f
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 00de328b40e8ac84ebf75e48fe353f38
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 9e04c1684b0b8b7439be44cc63a4d5f2
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedBool : SharedVariable<bool>
    {
        public static implicit operator SharedBool(bool value) { return new SharedBool { mValue = value }; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedRect : SharedVariable<Rect>
    {
        public static implicit operator SharedRect(Rect value) { return new SharedRect { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: e12e4a2550a6e5f4aa39fdd59126ed66
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedColor : SharedVariable<Color>
    {
        public static implicit operator SharedColor(Color value) { return new SharedColor { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 2093670c041663d4096c217e7c790683
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedQuaternion : SharedVariable<Quaternion>
    {
        public static implicit operator SharedQuaternion(Quaternion value) { return new SharedQuaternion { mValue = value }; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedVector3Int : SharedVariable<Vector3Int>
    {
        public static implicit operator SharedVector3Int(Vector3Int value) { return new SharedVector3Int { mValue = value }; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime
{
    [System.Serializable]
    public class SharedMaterial : SharedVariable<Material>
    {
        public static implicit operator SharedMaterial(Material value) { return new SharedMaterial { mValue = value }; }
    }
}


text:
fileFormatVersion: 2
guid: 2398d4531b638134384482dcac3e850c
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
using BehaviorDesigner.Runtime.Tasks;

namespace BehaviorDesigner.Runtime.ObjectDrawers
{
    public class IntSliderAttribute : ObjectDrawerAttribute
    {
        public int min;
        public int max;

        public IntSliderAttribute(int min, int max)
        {
            this.min = min;
            this.max = max;
        }
    }
}


text:
using BehaviorDesigner.Runtime.Tasks;

namespace BehaviorDesigner.Runtime.ObjectDrawers
{
    public class FloatSliderAttribute : ObjectDrawerAttribute
    {
        public float min;
        public float max;

        public FloatSliderAttribute(float min, float max)
        {
            this.min = min;
            this.max = max;
        }
    }
}


text:
fileFormatVersion: 2
guid: 92948bfcff9a1fc48834935ebb0dbdcb
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: 2373bfe29d0e5bc47b88a46226aa6a61
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:


text:
fileFormatVersion: 2
guid: d6754f4427b326d40989875dcec68569
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 86eae8ff89eb1e74587fab228694ef60
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: ea238eb37d041a94daac280218577e30
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 809e0096a90b09e48bb5fe6833bd3f8f
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 16995157, guid: a811bde74b26b53498b4f6d872b09b6d, type: 3}
  m_Name: DOTweenSettings
  m_EditorClassIdentifier:
  useSafeMode: 1
  safeModeOptions:
    nestedTweenFailureBehaviour: 0
  timeScale: 1
  useSmoothDeltaTime: 0
  maxSmoothUnscaledTime: 0.15
  rewindCallbackMode: 0
  showUnityEditorReport: 0
  logBehaviour: 0
  drawGizmos: 1
  defaultRecyclable: 0
  defaultAutoPlay: 3
  defaultUpdateType: 0
  defaultTimeScaleIndependent: 0
  defaultEaseType: 6
  defaultEaseOvershootOrAmplitude: 1.70158
  defaultEasePeriod: 0
  defaultAutoKill: 1
  defaultLoopType: 0
  showPreviewPanel: 1
  storeSettingsLocation: 0
  modules:
    showPanel: 0
    audioEnabled: 1
    physicsEnabled: 1
    physics2DEnabled: 1
    spriteEnabled: 1
    uiEnabled: 1
    textMeshProEnabled: 0
    tk2DEnabled: 0
  showPlayingTweens: 0
  showPausedTweens: 0


text:
fileFormatVersion: 2
guid: f59478cb0b79096468a1c6cccb9a73cf
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 6e78acb06cfa2004a9ac87f587b852d9
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 73184ef9e8bc03945bd42cb9b205d6f7
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 11400000
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 3b8e3b47441e2c346bce652796952e7f
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: c221749c5359a7b4389160713a6c7bf8
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 8c51be016bb823f4a8c009d440cd710b
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 7e8e92f7c31a4a74f9d5d88070b3dbbd
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 1
    sampleRateSetting: 0
    sampleRateOverride: 0
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 9e748a4de002c8a4aa5c5dc4b7a8dee1
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 1
    sampleRateSetting: 0
    sampleRateOverride: 0
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 051168dd3f18b614cb273426a6521fb5
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 1
    sampleRateSetting: 0
    sampleRateOverride: 0
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 55d4633165ab2e14585a6583320876a7
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 1
    sampleRateSetting: 0
    sampleRateOverride: 0
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: d834da361ac718f40a50b9b24eff160b
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 1
    sampleRateSetting: 0
    sampleRateOverride: 0
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: c9af4606bb554f60b4e38da76090ec12, type: 3}
  m_Name: Character2
  m_EditorClassIdentifier:
  "\u5907\u6CE8": "\u7C92\u5B50\u67AA"
  characterId: 2
  prefab: {fileID: 4349074551556820740, guid: 201cbdce23879e146aa150ad3be423a7, type: 3}
  previewPrefab: {fileID: 6344530443264138963, guid: b800253ee2bc6f94cabb5ba6511f7cf7, type: 3}
  icon: {fileID: 21300000, guid: d0819760aef40994d907e1e1194d39dd, type: 3}
  attackIcon: {fileID: 21300000, guid: 730924160008b44faa735ce0327848cd, type: 3}
  baseHp: 100
  increaseHp: 10
  baseAttack: 10
  increaseAttack: 2
  baseDefence: 0
  increaseDefence: 0
  basePaintEfficiency: 1
  increasePaintEfficiency: 10
  moveSpeed: 3
  attackSpeed: 1
  trustValue: 99
  jumpSpeed: 10
  heroName: Ash
  stroies:
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq


text:
fileFormatVersion: 2
guid: 6a0defe3d2effc14ebb26469053ae39b
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 4b1b36049c9715747918b7c8de92cca5
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 00fe3665966b92e4d81bb9f7bdb14449
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 04fe91e85afe50645ad9652e4f21226e
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: c9af4606bb554f60b4e38da76090ec12, type: 3}
  m_Name: Character1
  m_EditorClassIdentifier:
  "\u5907\u6CE8": "\u8C03\u8BD5\u4F7F\u7528\u7684\u89D2\u82721"
  characterId: 1
  prefab: {fileID: 8200326896365405706, guid: c3f00d8c5b037fd42abc7db335b8093f, type: 3}
  previewPrefab: {fileID: 0}
  icon: {fileID: 21300000, guid: 8617a66043f9a3b4a8a52fb03cb23679, type: 3}
  attackIcon: {fileID: 21300000, guid: 730924160008b44faa735ce0327848cd, type: 3}
  baseHp: 100
  increaseHp: 10
  baseAttack: 10
  increaseAttack: 2
  baseDefence: 0
  increaseDefence: 0
  basePaintEfficiency: 100
  increasePaintEfficiency: 10
  moveSpeed: 3
  attackSpeed: 1
  trustValue: 156
  jumpSpeed: 10
  heroName:
  stroies:
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq


text:
fileFormatVersion: 2
guid: 24027adaba00b524a81a3335146467c9
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: c9af4606bb554f60b4e38da76090ec12, type: 3}
  m_Name: Character4
  m_EditorClassIdentifier:
  "\u5907\u6CE8": "\u62D6\u5730\u54E5"
  characterId: 4
  prefab: {fileID: 51922025878053220, guid: f34f8a84a50059c468e2228be94efbe8, type: 3}
  previewPrefab: {fileID: 3543239625598509286, guid: 62532325e2139d546b5377b81c62e66e, type: 3}
  icon: {fileID: 21300000, guid: 855f51be763ee8843913f1f6cad61686, type: 3}
  attackIcon: {fileID: 21300000, guid: 730924160008b44faa735ce0327848cd, type: 3}
  baseHp: 100
  increaseHp: 10
  baseAttack: 10
  increaseAttack: 2
  baseDefence: 0
  increaseDefence: 0
  basePaintEfficiency: 100
  increasePaintEfficiency: 10
  moveSpeed: 8
  attackSpeed: 10
  trustValue: 70
  jumpSpeed: 10
  heroName: "\u6EDA\u7B52\u6D17\u8863\u673A"
  stroies:
  - "\u7C73\u5BB6\u5168\u81EA\u52A8\u62D6\u626B\u4E00\u4F53\u53EA\u80FD\u673A\u5668\u4EBA\u7684\u6539\u826F\u7248"
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: c9af4606bb554f60b4e38da76090ec12, type: 3}
  m_Name: Character0
  m_EditorClassIdentifier:
  "\u5907\u6CE8": "\u673A\u67AA\u54E5"
  characterId: 0
  prefab: {fileID: 2919390753416987159, guid: ea4b925cea87ec34195578be2d4687de, type: 3}
  previewPrefab: {fileID: 8392926111038834147, guid: c0c2a60d8f65b764bbbd6299bde899a7, type: 3}
  icon: {fileID: 21300000, guid: 32cb3d5c66612184cbc514914573137a, type: 3}
  attackIcon: {fileID: 21300000, guid: 730924160008b44faa735ce0327848cd, type: 3}
  baseHp: 100
  increaseHp: 10
  baseAttack: 10
  increaseAttack: 2
  baseDefence: 0
  increaseDefence: 0
  basePaintEfficiency: 100
  increasePaintEfficiency: 10
  moveSpeed: 4
  attackSpeed: 4.5
  trustValue: 124
  jumpSpeed: 10
  heroName: "\u6218\u8F66"
  stroies:
  - "\u8FD1\u536B\u5E72\u5458\uFF0C\u673A\u67AA\u54E5\uFF0C\u7533\u8BF7\u51FA\u6218"
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfqasdASFASFAsfASFDasfq


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: c9af4606bb554f60b4e38da76090ec12, type: 3}
  m_Name: Character3
  m_EditorClassIdentifier:
  "\u5907\u6CE8": "\u8C03\u8BD5\u4F7F\u7528\u7684\u89D2\u8272"
  characterId: 3
  prefab: {fileID: 8200326896365405706, guid: c3f00d8c5b037fd42abc7db335b8093f, type: 3}
  previewPrefab: {fileID: 0}
  icon: {fileID: 21300000, guid: d31331b11b7d7f34797d9797f496e98b, type: 3}
  attackIcon: {fileID: 21300000, guid: 730924160008b44faa735ce0327848cd, type: 3}
  baseHp: 100
  increaseHp: 10
  baseAttack: 10
  increaseAttack: 2
  baseDefence: 0
  increaseDefence: 0
  basePaintEfficiency: 100
  increasePaintEfficiency: 10
  moveSpeed: 3
  attackSpeed: 1
  trustValue: 50
  jumpSpeed: 10
  heroName: "\u9EA6\u6797\u70AE\u624B"
  stroies:
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq
  - asdASFASFAsfASFDasfq