public void SetPoolObjByType(PreLoadType type, GameObject obj) { obj.SetActive(false); obj.transform.DOKill(); obj.transform.parent = transform; obj.transform.localPosition = Vector3.zero; obj.transform.localScale = Vector3.one; lock (poolObjs) { if (!poolObjs[type].Contains(obj)) { poolObjs[type].Add(obj); } else { Debug.Log("E" + type.ToString() + "/已在对象池中,请检查!父物体为:" + obj.transform.parent.name); } } }