chore: initial commit

This commit is contained in:
2026-05-08 11:04:00 +08:00
commit f55d2a57c3
6278 changed files with 866081 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a boolean value to a float value (true = 1.0, false = 0.0).")]
[Shared.Utility.Category("Conversions")]
public class ConvertBoolToFloat : Action
{
[Tooltip("The boolean value to convert.")]
[SerializeField] protected SharedVariable<bool> m_Value;
[Tooltip("The variable that should be set to the converted float value.")]
[RequireShared] [SerializeField] protected SharedVariable<float> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value ? 1.0f : 0.0f;
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 73c605544c0648e4bbf8dcfe72348337
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a boolean value to an integer value (true = 1, false = 0).")]
[Shared.Utility.Category("Conversions")]
public class ConvertBoolToInt : Action
{
[Tooltip("The boolean value to convert.")]
[SerializeField] protected SharedVariable<bool> m_Value;
[Tooltip("The variable that should be set to the converted integer value.")]
[RequireShared] [SerializeField] protected SharedVariable<int> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value ? 1 : 0;
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3955564edbd009346b730327375e3d48
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a boolean value to a string value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertBoolToString : Action
{
[Tooltip("The boolean value to convert.")]
[SerializeField] protected SharedVariable<bool> m_Value;
[Tooltip("The variable that should be set to the converted string value.")]
[RequireShared] [SerializeField] protected SharedVariable<string> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value.ToString();
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 888e5ecfd2f882346ad4879020c18283
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a float value to a boolean value (0.0 = false, non-zero = true).")]
[Shared.Utility.Category("Conversions")]
public class ConvertFloatToBool : Action
{
[Tooltip("The float value to convert.")]
[SerializeField] protected SharedVariable<float> m_Value;
[Tooltip("The variable that should be set to the converted boolean value.")]
[RequireShared] [SerializeField] protected SharedVariable<bool> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value != 0.0f;
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 49e265c8db111534fab491cfc5672622
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a float value to an integer value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertFloatToInt : Action
{
[Tooltip("The float value to convert.")]
[SerializeField] protected SharedVariable<float> m_Value;
[Tooltip("The variable that should be set to the converted integer value.")]
[RequireShared] [SerializeField] protected SharedVariable<int> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = Mathf.RoundToInt(m_Value.Value);
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7e596c94da53a4a45ad9113b33a1aea4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a float value to a string value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertFloatToString : Action
{
[Tooltip("The float value to convert.")]
[SerializeField] protected SharedVariable<float> m_Value;
[Tooltip("The variable that should be set to the converted string value.")]
[RequireShared] [SerializeField] protected SharedVariable<string> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value.ToString();
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cc1ceef260c01c645b8b47ce20199dc6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,37 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a GameObject value to a Transform value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertGameObjectToTransform : Action
{
[Tooltip("The GameObject value to convert.")]
[SerializeField] protected SharedVariable<GameObject> m_Value;
[Tooltip("The variable that should be set to the converted Transform value.")]
[RequireShared] [SerializeField] protected SharedVariable<Transform> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
if (m_Value.Value != null) {
m_StoreResult.Value = m_Value.Value.transform;
return TaskStatus.Success;
}
m_StoreResult.Value = null;
return TaskStatus.Failure;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a297e510d0a945c449c2d125813fe9d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts an integer value to a boolean value (0 = false, non-zero = true).")]
[Shared.Utility.Category("Conversions")]
public class ConvertIntToBool : Action
{
[Tooltip("The integer value to convert.")]
[SerializeField] protected SharedVariable<int> m_Value;
[Tooltip("The variable that should be set to the converted boolean value.")]
[RequireShared] [SerializeField] protected SharedVariable<bool> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value != 0;
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 67e0599636ba3b7419611ae159070c04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts an integer value to a float value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertIntToFloat : Action
{
[Tooltip("The integer value to convert.")]
[SerializeField] protected SharedVariable<int> m_Value;
[Tooltip("The variable that should be set to the converted float value.")]
[RequireShared] [SerializeField] protected SharedVariable<float> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value;
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 07440ccf7d92b14498b7e4c7b9e08e5e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts an integer value to a string value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertIntToString : Action
{
[Tooltip("The integer value to convert.")]
[SerializeField] protected SharedVariable<int> m_Value;
[Tooltip("The variable that should be set to the converted string value.")]
[RequireShared] [SerializeField] protected SharedVariable<string> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
m_StoreResult.Value = m_Value.Value.ToString();
return TaskStatus.Success;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: eeadd74b13bc65d45af983c98b9f3e01
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a string value to a boolean value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertStringToBool : Action
{
[Tooltip("The string value to convert.")]
[SerializeField] protected SharedVariable<string> m_Value;
[Tooltip("The variable that should be set to the converted boolean value.")]
[RequireShared] [SerializeField] protected SharedVariable<bool> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
if (bool.TryParse(m_Value.Value, out bool result)) {
m_StoreResult.Value = result;
return TaskStatus.Success;
}
return TaskStatus.Failure;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 336754ea3fd33e44e91733089662ebd7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a string value to a float value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertStringToFloat : Action
{
[Tooltip("The string value to convert.")]
[SerializeField] protected SharedVariable<string> m_Value;
[Tooltip("The variable that should be set to the converted float value.")]
[RequireShared] [SerializeField] protected SharedVariable<float> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
if (float.TryParse(m_Value.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float result)) {
m_StoreResult.Value = result;
return TaskStatus.Success;
}
return TaskStatus.Failure;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d22d87f8a2847f34185c0ff330b89209
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a string value to an integer value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertStringToInt : Action
{
[Tooltip("The string value to convert.")]
[SerializeField] protected SharedVariable<string> m_Value;
[Tooltip("The variable that should be set to the converted integer value.")]
[RequireShared] [SerializeField] protected SharedVariable<int> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
if (int.TryParse(m_Value.Value, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture, out int result)) {
m_StoreResult.Value = result;
return TaskStatus.Success;
}
return TaskStatus.Failure;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e2d95d3a42e27184da971d47c792ff72
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,37 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Conversions
{
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Converts a Transform value to a GameObject value.")]
[Shared.Utility.Category("Conversions")]
public class ConvertTransformToGameObject : Action
{
[Tooltip("The Transform value to convert.")]
[SerializeField] protected SharedVariable<Transform> m_Value;
[Tooltip("The variable that should be set to the converted GameObject value.")]
[RequireShared] [SerializeField] protected SharedVariable<GameObject> m_StoreResult;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
if (m_Value.Value != null) {
m_StoreResult.Value = m_Value.Value.gameObject;
return TaskStatus.Success;
}
m_StoreResult.Value = null;
return TaskStatus.Failure;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 36617d392cb63e24184a825b05f4f78a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: