일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 유니티 Json 데이터 연동
- 오브젝트 풀링
- 유니티 UI
- 앱 배포
- 오큘러스
- 드래곤 플라이트
- 유니티
- 개발
- 포트폴리오
- ChatGPT
- 드래곤 플라이트 모작
- meta xr
- 팀 프로젝트
- 길건너 친구들
- XR
- 개발일지
- HAPTIC
- Photon Fusion
- meta
- 연습
- 유니티 GUI
- 모작
- Oculus
- input system
- 팀프로젝트
- 멀티플레이
- 가상현실
- OVR
- CGV
- VR
- Today
- Total
목록유니티 기초 (26)
EasyCastleUNITY

버튼을 통한 공격 및 그에 걸맞는 애니메이션 작동 Test2_PlayerAttackSceneMain (버튼의 이벤트를 연결, 사거리 지정) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Test2 { public class Test2_PlayerAttackSceneMain : MonoBehaviour { [SerializeField] private Button btnAttack; [SerializeField] private HeroController heroController; [SerializeField] private MonsterController ..

callback은 무조건 대리자 onClick은 대리자이다. 변수에 메서드를 넘기기에 삭제할게 아닌 이상, 익명으로 하는 것이 좋다. 그 이유는 명명으로 하면 메서드가 분리가 되는데 익명은 한번에 작성이 가능하기 때문이다. 하지만 메서드가 너무 길어지는 경우, 명명을 사용하기도 한다. 즉, 어떤 방식으로 작성할지는 개발자의 마음이다.

Test_PlayerControlSceneMain using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Test; public class Test_PlayerControlSceneMain : MonoBehaviour { [SerializeField] private HeroController heroController; // Start is called before the first frame update void Start() { this.heroController.onMoveComplete = (target) =>{ Debug.Log("이동을 완료 했습니다."); /..

구현이 된 부분 영웅이 이동하여 몬스터를 공격하는 애니메이션을 실행하는 부분까지 구현이 안 된 부분 몬스터가 피격시 몬스터가 피격되는 애니메이션을 실행하는 부분 Test_PlayerControlSceneMain -> 전체적인 실행을 하는 클래스 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Test; public class Test_PlayerControlSceneMain : MonoBehaviour { [SerializeField] private HeroController heroController; // Start is called before the fir..

1.코루틴 이용 오브젝트 이용(애니메이션 포함) HeroController (아직 Test여서 namespace Test에다가 정의하여 사용함) using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Test { public class HeroController : MonoBehaviour { private Vector3 targetPosition; private Coroutine moveRoutine; private Animator anim; // Start is called before the first frame update void Start() { this.anim = this.GetCompo..

https://docs.unity3d.com/kr/2021.3/Manual/Coroutines.html 코루틴 - Unity 매뉴얼 코루틴을 사용하면 작업을 다수의 프레임에 분산할 수 있습니다. Unity에서 코루틴은 실행을 일시 정지하고 제어를 Unity에 반환하지만 중단한 부분에서 다음 프레임을 계속할 수 있는 메서드입니 docs.unity3d.com 메서드가 아무리 길어도 1프레임안에서 실행된다. 따라서, 시간에 따라서 메서드를 적용하려면, 평범한 메서드로는 안된다. 그러므로, for문을 여러 frame에 걸쳐서 사용해야 된다. 즉, 렌더링을 값이 변하고 렌더링하고 다시 값이 변하면 렌더링 하는 방식을 해야된다. Update에서도 가능하지만 코루틴이 더 편리하다. 왜 그러냐면 코루틴은 Update와..

추가된 요소 1.Lobby에서 각각 효과가 다른 바구니를 선택하고 그 바구니를 통해 게임이 실행 2.최고 점수가 게임 중에 계속 보여짐, 게임 도중 최고점수가 갱신이 되면, 그 즉시 최고점수는 변화함 3.게임이 종료되면, 게임에서 사용한 바구니의 종류와 현재 점수, 그리고 전체적인 최고점수를 보여준다. 1. LobbyScene 1-1. 사용되는 스크립트: LobbyMain, (InfoManager: 선택된 바구니의 타입을 저장받음) InfoManager는 마지막에 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.U..

0.조명 조정 1. 바구니 이동(Ray를 활용) BasketController using System.Collections; using System.Collections.Generic; using UnityEngine; public class BasketController : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { //마우스 왼쪽 클릭 하면 (화면을 클릭하면) Ray를 만들자 if (Input.GetMouseButtonDown(0)) { //화면상의 좌표-> Ray객체 생성 Ray ray = Camera.ma..