private void SettingObj(ref GameObject detail, Vector3 position) { DragAndDropV2 dnd = detail.GetComponent <DragAndDropV2>(); Detail detail1 = detail.GetComponent <Detail>(); dnd.car = car; detail.transform.localPosition = position; Debug.Log(detail.transform.localPosition + " " + detail.transform.position); dnd.canvas = gameObject.transform.parent.gameObject.GetComponent <Canvas>(); detail1.spawnLocalPosition = position; detail1.spawnPosition = detail.transform.position; }
public void CheckForHelp(Detail detail) { StartCoroutine(isFaild(detail)); if (faildCnt == 3) { DragAndDropV2 drop = detail.gameObject.GetComponent <DragAndDropV2>(); Vector3 slotPos = FindDetailCoord(detail); Vector3 detailPos = detail.spawnPosition; StartCoroutine(Glow(detail.gameObject, FindDetailSlot(detail))); StartCoroutine(MoveHand(slotPos, detailPos)); } }