Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
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();
		}
	}
}