1 2 3 4 5 6 7 8 9 10 11 | //오브젝트를 생성할 좌표 public float x = 0; public float y = 0; public float z = 0; public GameObject player; //생성할 오브젝트 // Use this for initialization void Start () { Instantiate(player, new Vector3(x, y, z), Quaternion.identity); }ㅇ |
이렇게 코딩 후.
이 Player오브젝트를 아래 처럼 끌어다 놓으면 된다.
'시바 | Unity(유니티) 5.x' 카테고리의 다른 글
Unity 5.x 충돌 이벤트 (0) | 2018.03.22 |
---|---|
오브젝트(Object)를 생성 및 삭제하기 (0) | 2018.03.22 |
카메라 추적 상하 좌우 따라 움직이기 (0) | 2018.03.20 |
카메라 추적 마우스 좌우만 움직이기 (0) | 2018.03.20 |
Unity getkey 이벤트 차이점 (0) | 2018.03.14 |
Unity2D 캐릭터 이동 + 점프 (0) | 2018.03.12 |
[Unity] Vector3에 대한 이해 (0) | 2018.03.09 |
[Unity] Mathf.clamp함수란? (0) | 2018.03.09 |