public static GameObject OnEnable(this GameObject gameObject, ActionOnEnable.Properties p) { // Add the component ActionOnEnable.AddComponent(gameObject, p); // Return to fluent design return(gameObject); }
public static GameObject OnEnable(this GameObject gameObject, Action action) { // Add the component ActionOnEnable.AddComponent(gameObject, new ActionOnEnable.Properties { enable = true, onEnable = action }); // Return to fluent design return(gameObject); }