public static AudioClip GetClip(ClipDatas.Type type) { if (_Clipdatas == null || _Clipdatas.Length == 0) { Debug.Log("Có ClipDatas nào đâu mà tìm?"); return(null); } for (int i = 0; i < _Clipdatas.Length; i++) { ClipDatas c = _Clipdatas[i]; if (c.type == type) { return(c.GetClip()); } } Debug.Log("Không có ClipDatas nào type = " + type.ToString() + " cả!"); return(null); }
public ClipDatas Clone() { ClipDatas a = Instantiate(this); return(a); }