예제 #1
0
        public static GameObject OnStart(this GameObject gameObject, ActionOnStart.Properties p)
        {
            // Add the component
            ActionOnStart.AddComponent(gameObject, p);

            // Return to fluent design
            return(gameObject);
        }
예제 #2
0
        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);
        }