Repository URL to install this package:
Version:
1.0.0 ▾
|
using System;
using Fluctio.FluctioSim.Core.Components.MachineLearning.Agents;
using UnityEngine;
namespace Fluctio.FluctioSim.Core.Components.MachineLearning.TriggerActions
{
public abstract class AgentAction : TriggerAction
{
[NonSerialized] protected Agent Agent;
protected virtual void Awake()
{
Agent = GetComponentInParent<Agent>();
if (Agent == null)
{
Debug.LogWarning("This component should be inside GameObject with Agent component");
}
}
protected override void OnEnable()
{
if (Agent == null)
{
return;
}
base.OnEnable();
}
protected override void OnDisable()
{
if (Agent == null)
{
return;
}
base.OnDisable();
}
}
}