본문 바로가기

Unity

(33)
2020-05-22 마우스 클릭받아 이동 Test.class 더보기 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; public class Test : MonoBehaviour { public GameObject flagGo; public float speed = 2; RaycastHit hit = default; private void Awake() { } private void Update() { i..
MainCam과 UICam의 설정문제 카메라 세팅 값 확인
2020-05-21 수업내용 캐릭터선택 및 상태화면 과제 : 캐릭터 선택창에서 영웅 선택 버튼을 누르면, 해당하는 영웅이 InGame씬에서 생성되게 만들기 결과 : 캐릭터에게 기능이 붙을 수도 있으니, Hero스크립트를 하나만들어 영웅을 동적생성하면서 스크립트를 컴포넌트로 붙여줌. 그리고 인게임의 자식으로 붙여주었다. CharacterData.class 더보기 1 2 3 4 5 6 7 8 9 10 11 12 using System.Collections; using System.Collections.Generic; using UnityEngine; public class CharacterData { public int id; public int hp; public string res_name; public string thumb_name; } DataMan..
2020-05-19 스크롤바 팝업 코드분석 오늘 배운 소스코드를 분석해 보았습니다. 아직 제 생각을 코드로 풀기에는 저의 지식이 한참 부족한 것 같아, 먼저 제가 이 코드를 읽을 수 있는지 없는지를 판단하기위해 코드 분석을 했습니다. 다행히도 읽을 수 없는 부분, 또는 이해를 하지 못하는 부분은 딱히 없었고, 많은 부분반복이 필요하다고 생각됩니다. App.class 더보기 using System.Collections; using System.Collections.Generic; using UnityEngine; public class App : MonoBehaviour //App클래스는 Mono를 상속 { //App이하는일과 UIApp이 하는일을 분리. //why? App이 많은 일을 하지 않게 하기위해서. public UIApp uiApp; /..
2020-05-19 수업내용 스크롤뷰 수동으로 스크롤뷰 만들기 유니티 화면 1-1 더보기 유니티 화면 1-2 더보기 동적으로 스크롤뷰 만들기 유니티 화면 1-1 ListItem_Mission 더보기 유니티 화면 2-1 SampleScene 더보기 소스코드 App.class 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 using System.Collections; using System.Collections.Generic; using UnityEngine; public class App : MonoBehaviour { public UIApp uIApp; // Start is called before the first frame update void Start() { uIApp.Init();..
2020-05-18 유니티 복습 (파일 입출력, 람다식, 대리자) App.Class 더보기 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; public class App : MonoBehaviour { public List heroList; public Dictionary dicCharacterData; public Dictionary dicCharacterInfo; private void Awake() { DataManager.GetInstance().LoadData(); this.dicCharacterData = new Dictionary(); this.dicCharacterInfo = new Dictionary(); t..
2020-05-18 유니티 UITitle 만들기 UITitle.Class 더보기 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 ..
2020-05-18 유니티 파일 입출력... DataManager 더보기 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 using System.Collections; using System.Collections.Generic; using UnityEngine; using Newtonsoft.Json; using System.Linq; public class DataManager { static DataManager instance; private Dictionary dicMissionData; private DataManager() { this.dicMissionDa..