728x90 Unity32 [Unity 2D / 유니티 교과서] 4장 예제 SwipeCar AudioSource mp3파일이 아닌 ogg파일로 변경해서 사용하기! ( 용량 최소 약 1/5로 줄음) Input.mousePosition Unity공간 좌표가 아니라 실행화면의 Screen(픽셀공간) 좌표 죄표계는 3D, Screen, UI 각각 존재 Awake 이벤트 함수. (활성화된 오브젝트에서!)인스턴스 생성 직후 실행. Start보다 먼저 실행 transform.Translate(x, y, z, Space.self/world) 로컬 좌표. 월드 좌표GameObject.Find("string") Scene안에 있는 GameObject 이름 검색(오타 주의) CarController using System.Collections; using System.Collections.Generic; usin.. 2023. 1. 30. [Unity 2D / 유니티교과서] 3장 예제 Roulette using System.Collections; using System.Collections.Generic; using UnityEngine; public class RouletteController : MonoBehaviour { private float rotSpeed = 0; public float attenuation = 0.96f; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { this.rotSpeed = 10; } //오브젝트를 회전 하는 방법 //회전은 Transform이.. 2023. 1. 30. 이전 1 ··· 3 4 5 6 다음 728x90