public T AddParameter <T>() where T : TweeningParameter { var result = gameObject.AddComponent <T>(); result.hideFlags = HideFlags.HideInInspector; result.SetSupportTypes(); ArrayTools.Clear(ref parameters); return(result); }
public TweeningParameter AddParameter(Type type) { var newParameter = ( TweeningParameter )gameObject.AddComponent(type); newParameter.hideFlags = HideFlags.HideInInspector; newParameter.SetSupportTypes(); ArrayTools.Clear(ref parameters); return(newParameter); }
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); }