Пример #1
0
        public T AddParameter <T>() where T : TweeningParameter
        {
            var result = gameObject.AddComponent <T>();

            result.hideFlags = HideFlags.HideInInspector;
            result.SetSupportTypes();
            ArrayTools.Clear(ref parameters);
            return(result);
        }
Пример #2
0
        public TweeningParameter AddParameter(Type type)
        {
            var newParameter = ( TweeningParameter )gameObject.AddComponent(type);

            newParameter.hideFlags = HideFlags.HideInInspector;
            newParameter.SetSupportTypes();
            ArrayTools.Clear(ref parameters);
            return(newParameter);
        }
Пример #3
0
        public static void DestroyAllChilds(this UnityEngine.Transform root)
        {
            var childs = new UnityEngine.GameObject[0];

            foreach (UnityEngine.Transform child in root)
            {
                ArrayTools.Add(ref childs, child.gameObject);
            }
            childs.DoForAll(UnityEngine.Object.Destroy);
            ArrayTools.Clear(ref childs);
        }