본문 바로가기

유니티B과정224

[UGUI] StudyUI - slider UI -> lmage를 하나더 만들고 이미지 찾아서 넣기 UI -> Image 추가 이름 변경 빈 오브젝트를 만들어 slider라고 이름 짓고 *크기를 조정해준다(중앙에서부터) 자식으로 top, bottom, frame 을 넣어준다 UI -> Image 생성 -> 이름을 fill로 하고 게이지 바를 넣는다 slider에 slider를 Add Conponent 하고 Fill Ract에 fill오브젝트를 넣는다 위치 조정 후 뒤로 넣기 *다시 처음부터 -> 구조를 다시 만지는 이유를 생각해봐야 함. 구조 변경하는 것을 외우지 말고 그때그때 상황이 달리지니 생각을 해야함. frame을 -> frame_sprite로 이름을 번경해주고 frame 빈 오브젝트를 만들고 크기를 조정해준다 그 안에 자식들로 넣어준다 .. 2021. 11. 3.
[UGUI] StudyUI 준비하기 UI -> Image 오브젝트 생성 00_2_Component 를 Source Image에 끌어다 넣는다 Set Native Size를 눌러준다 좌표를 0, 0, 0으로 만들어 준다 오브젝트 이름을 guide로 변경해주고 투명도를 줄여준다 메인 카메라의 Clear Flags를 Solid Color로 바꿔주고 Background의 색을 어둡게 해준다 준비 끝 2021. 10. 28.
[3D]AppleCatch - 사과 받기 3d 프로젝트 생성 안드로이드 빌드 세팅 Models , Sounds 에 챕터8 리소스 넣기 Save as 에서 GameScene저장 1920x1080 Landscape로 화면 조정 stage 끌어오고 언팩하고 Dictional Light 위치 조정 Intensity 0.7 바스켓의 그림자 변경하기 Edit -> Project Settings -> Qullity -> Shadow Distance(150->30) 변경 변경 후 모습 바스켓을 상.하.좌.우로 이동하기 Scriptes 파일을 만들고 스크립트 생성 Basket 오브젝트에 넣어준다 라이트 설정과 코드 using System.Collections; using System.Collections.Generic; using UnityEngine; pub.. 2021. 10. 25.
[3D] MiniRPG - 플레이어 버튼 생성 UI로 버튼 오브젝트를 생성한다 Text 이름을 캐릭터 생성으로 바꿔준다 스크립트 생성 코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestCreateHeroMain : MonoBehaviour { public Button btnCreatHero; public GameObject prefab; // Start is called before the first frame update void Start() { this.prefab = Resources.Load("Prefabs/ch_02_01"); //동기 Debug.LogFormat("pr.. 2021. 10. 22.
[3D] MiniRPG - 플레이어 생성 및 컨트롤 플레이어 생성 플레이어 이동 Hero 프리팹화 하기 Model Name 에 리소스 이름을 적는다 ch_02_01 *오류 상황 발생 오류 해결 - 프리팹 이름(스펠링)이 달랐다... 생성 및 이동 코드는 선생님 코드 using System.Collections; using System.Collections.Generic; using UnityEngine; public class InputTestMain : MonoBehaviour { public Transform point; public Hero hero; public string modelName; private GameObject heroPrefab; private GameObject modelPrefab; // Start is called befor.. 2021. 10. 19.
[3D] MiniRPG 준비 및 리소스 프로젝트명 : MiniRPG 템플릿 : 3D 타겟 플랫폼 : android 해상도 : 1920x1080 리소스 출처 : Unity Asset Store 무료 2021. 10. 19.
[2D]프로젝트PlayAndplane - 적 기체 랜덤 스폰 파일 폴더명 특수문자X GameManeger 오브젝트를 생성 GameManeger 스크립트를 만든 후 넣어준다 코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameManeger : MonoBehaviour { public GameObject[] EnemyObjs; public Transform[] spawnPoint; public float maxSpawnDelay; public float curSpawnDelay; // Start is called before the first frame update void Start() { } // Update is called once.. 2021. 10. 15.
[2D]프로젝트Play&plane - 적 기체 제거 각각의 Enemy 오브젝트들의 hp를 5, 10, 20 으로 해준다 적 기체 제거 완료 2021. 10. 14.
[2D]프로젝트Play&plane - 적기 피격 시 미사일 불통과 Destroy(this.gameObject); 를 바깥으로 끄집어낸다 피격시 미사일 불통과 2021. 10. 14.
[2D]프로젝트Play&plane - 적기 피격 연출 *적기 피격 연출 Enemy Small, Middle, Big 오브젝트에 각각 Enemy A, B, C Hit 이미지를 자식으로 넣는다 EnemyHitTrigger 스크립트를 생성 각각 부모Enemy에 끌어다 넣는다 EnemyHitTrigger 스크립트 열기 코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class EnemyHitTrigger : MonoBehaviour { public int hp = 100; public GameObject hitGo; private float delta; private float span = 0.2f; private bool isHit = false;.. 2021. 10. 14.