如何实例化一个对象放在另一个对象的子物体中
sprite1.transform.parent= ((GameObject)Instantiate(preFab, new Vector3(sprite1.transform.position.x, sprite1.transform.position.y, -0.009681821f), Quaternion.identity)).transform;不正确 错哪了
InvalidCastException: Cannot cast from source type to destination type.
Server+<AwakeWait>c__Iterator3.MoveNext () (at Assets/Scripts/Server.cs:35)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Server:Awake() (at Assets/Scripts/Server.cs:26)
好帖就是要顶 顶顶多好 真心顶 难得一见的好帖 LZ真是人才 顶顶多好 真心顶 难得一见的好帖 很好哦