#if GRAPH_DESIGNER /// --------------------------------------------- /// Behavior Designer /// Copyright (c) Opsive. All Rights Reserved. /// https://www.opsive.com /// --------------------------------------------- namespace Opsive.BehaviorDesigner.Runtime.Utility { using Opsive.BehaviorDesigner.Runtime.Components; using Unity.Entities; /// /// Utility functions that are used throughout the behavior tree execution. /// public static class ComponentUtility { /// /// Adds the components necessary in order to trigger an interrupt. /// /// The EntityManager that the entity belongs to. /// The entity that should have the components added. public static void AddInterruptComponents(EntityManager entityManager, Entity entity) { entityManager.AddComponent(entity); entityManager.SetComponentEnabled(entity, false); entityManager.AddComponent(entity); entityManager.SetComponentEnabled(entity, false); } } } #endif