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