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