Example #1
0
        public static GameObject OnDestroy(this GameObject gameObject, ActionOnDestroy.Properties p)
        {
            // Add the component
            ActionOnDestroy.AddComponent(gameObject, p);

            // Return to fluent design
            return(gameObject);
        }
Example #2
0
        public static GameObject OnDestroy(this GameObject gameObject, Action action)
        {
            // Add the component
            ActionOnDestroy.AddComponent(gameObject, new ActionOnDestroy.Properties {
                enable = true, onDestroy = action
            });

            // Return to fluent design
            return(gameObject);
        }