{
#region TRIGGERS
[MenuItem("GameObject/GameplayIngredients/Hooks/Trigger (Box)", false, 10)]
[MenuItem("GameObject/GameplayIngredients/Events/Trigger (Box)", false, 10)]
var hook = go.AddComponent<Hooks.OnTriggerHook>();
var evt = go.AddComponent<Events.OnTriggerEvent>();
go.name = "Box Trigger";
if (Selection.activeGameObject != null)
[MenuItem("GameObject/GameplayIngredients/Hooks/Trigger (Sphere)", false, 10)]
[MenuItem("GameObject/GameplayIngredients/Events/Trigger (Sphere)", false, 10)]
go.name = "Sphere Trigger";
[MenuItem("GameObject/GameplayIngredients/Hooks/Trigger (Capsule)", false, 10)]
[MenuItem("GameObject/GameplayIngredients/Events/Trigger (Capsule)", false, 10)]
go.name = "Capsule Trigger";
[MenuItem("GameObject/GameplayIngredients/Hooks/On Awake", false, 10)]
[MenuItem("GameObject/GameplayIngredients/Events/On Awake", false, 10)]
var hook = go.AddComponent<Hooks.OnAwakeHook>();
go.name = "OnAwake Hook";
var evt = go.AddComponent<Events.OnAwakeEvent>();
go.name = "On Awake";
go.transform.parent = Selection.activeGameObject.transform;
}
[MenuItem("GameObject/GameplayIngredients/Events/On Enable/Disable", false, 10)]
static void CreateOnEnableDisable()
var go = new GameObject();
var evt = go.AddComponent<Events.OnEnableDisableEvent>();
go.name = "On Enable/Disable";
#endregion
using UnityEditor;
using GraphProcessor;
using System.Reflection;
using GameplayIngredients.Hooks;
using GameplayIngredients.Events;
using GameplayIngredients.Logic;
using GameplayIngredients.Actions;
var result = new List<Type>();
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
var hookBase = typeof(HookBase);
var hookBase = typeof(EventBase);
var logicBase = typeof(LogicBase);
var actionBase = typeof(ActionBase);
using NaughtyAttributes;
using UnityEngine;
namespace GameplayIngredients.Hooks
namespace GameplayIngredients.Events
public class OnButtonDownHook : HookBase
public class OnButtonDownEvent : EventBase
public string Button = "Fire1";
using UnityEngine.Events;
public class OnEnableDisableHook : HookBase
public class OnEnableDisableEvent : EventBase
[ReorderableList]
public Callable[] OnEnableEvent;
public class OnKeyDownHook : HookBase
public class OnKeyDownEvent : EventBase
public KeyCode Key = KeyCode.F5;
public class OnMessageHook : HookBase
public class OnMessageEvent : EventBase
public string MessageName = "Message";
using System.Collections;
using System.Collections;
public class OnPickupHook : MonoBehaviour
public class OnPickupEvent : MonoBehaviour
// Start is called before the first frame update
void Start()
public class OnTriggerHook : HookBase
public class OnTriggerEvent : EventBase
public int EnterMaxCount = 0;
public int ExitMaxCount = 0;
public abstract class EventBase : MonoBehaviour
public class OnAwakeEvent : MonoBehaviour
public Callable[] onAwake;
private void Awake()
Callable.Call(onAwake, gameObject);
public class OnDestroyEvent : MonoBehaviour
public Callable[] onDestroy;
private void OnDestroy()
Callable.Call(onDestroy, gameObject);
public class OnStartEvent : EventBase
public Callable[] OnStart;
private void Start()
Callable.Call(OnStart, gameObject);
public abstract class HookBase : MonoBehaviour
public class OnAwakeHook : MonoBehaviour
public class OnStartHook : HookBase
public class OnDestroyHook : MonoBehaviour