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,36 @@
#if GRAPH_DESIGNER
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.UnityObjects
{
using Opsive.GraphDesigner.Runtime;
using Opsive.GraphDesigner.Runtime.Variables;
using UnityEngine;
[Opsive.Shared.Utility.Description("Enables or disables the specified MonoBehaviour.")]
[Shared.Utility.Category("Unity")]
public class SetEnabled : Action
{
[Tooltip("Should the MonoBehaviour be enabled?")]
[SerializeField] protected SharedVariable<bool> m_Enable;
[Tooltip("The MonoBehaviour that should be enabled or disabled.")]
[SerializeField] protected SharedVariable<MonoBehaviour> m_MonoBehaviour;
/// <summary>
/// Executes the task.
/// </summary>
/// <returns>The execution status of the task.</returns>
public override TaskStatus OnUpdate()
{
if (m_MonoBehaviour.Value == null) {
return TaskStatus.Failure;
}
m_MonoBehaviour.Value.enabled = m_Enable.Value;
return TaskStatus.Success;
}
}
}
#endif