Exemple #1
0
        /*
         * Static.
         */

        public static AdaptiveScalerItem New(GameObject gameObject)
        {
            var item = new AdaptiveScalerItem
            {
                gameObject = gameObject
            };

            var interfaceTypes = Enum.GetValues(typeof(InterfaceType)).Cast <InterfaceType>();

            item.items = interfaceTypes.Select(AdaptiveScalerSubItem.New).ToArray();
            return(item);
        }
Exemple #2
0
        private void Reset()
        {
            if (items == null)
            {
                items = new AdaptiveScalerItem[] { }
            }
            ;
            else
            {
                UnityEditor.ArrayUtility.Clear(ref items);
            }

            UnityEditor.ArrayUtility.Add(ref items, AdaptiveScalerItem.New(gameObject));
        }