protected void DoInstantiate(ActorController actor, string socketName, bool onlyUseSocketPosition) { this.DoInstantiate(actor); if (this.go != null && !string.IsNullOrEmpty(socketName)) { GameObject gameObject = ObjectUtil.FindChildObject(actor.gameObject, socketName); if (gameObject == null) { return; } if (onlyUseSocketPosition) { this.go.transform.position = gameObject.transform.position; } else { Transform transform = this.go.transform; transform.parent = gameObject.transform; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; transform.localScale = Vector3.one; actor.AddPoolSocket(transform); } } }