유니티 심화 86

LearnUGUI - Test07 [ StageClear ] - Ribbon, Stars, Particle [ UI ]

AnimationReceiver using System; using System.Collections; using System.Collections.Generic; using UnityEngine; //컴포넌트 속성을 자동추가해줌 [RequireComponent(typeof(Animator))] public class AnimationReceiver : MonoBehaviour { public Action onFinished; public void OnFinished() { Debug.Log("animation finish"); if(this.onFinished != null) { this.onFinished(); } } } Test07Main using System.Collections; using S..

유니티 심화 2023.09.12

[주말과제] LearnUGUI - HW01 [ Shop_Gem ]

Shop_Gold를 할 때는 GoldIcon.transform.position을 저 pos_x, pos_y로 할 때 자꾸 그림이 아래에 리스폰 되서 음.. 왜이러지 하고 그냥 수작업으로 다 위치 조정을 해줬었는데 .. [ 그래서 나온 위치가 x는 41에다가 내가 알아온 x위치 , y는 800에다가 내가 알아온 y위치였다.] 근데 너무 멍청하게해서 2번째 Gem할 때는 다른 방식으로 해봐야지.. 하고 Gem을 하면서 생각해보니 localPosition을 쓰면 내가 구한 위치로 오는거였다;; HW02AtlasManager using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.U2D; pub..

[복습] LearnUGUI - Practice05 [Shop], DataManager로 데이터 받아오기

너무 이해가 안되서 천천히 생각하면서 계속 반복반복했다. 처음에는 UIChestScrollView가 무슨 역할인지도 이해가 안됐는데 그나마 이해가 되고 DataManager- LoadChestData함수의 역직렬화도 GetChestData의 ToList로 데이터를 return 하는 것도 보다보니 익숙해진다. 그래도 이해가 잘 되진 않아서 계속 연습해야할 것 같다. 특히 AtlasManager는 다른 것도 벅찬데 이것도 이해하려면 잘 모르겠어서 그냥 적고 패스했다.. 6. DataManager로 데이터 받아오기 Practice05UIChestCell using System; using System.Collections; using System.Collections.Generic; using TMPro; u..

[복습] LearnUGUI - Practice05 [Shop] 잘 몰라서 메모장에 적어놓고 연습

DataManager 안 쓰는거 먼저 새로운 Practice05 Scene을 만들어서 연습 1. guide 만들어주기 2. main 빈 오브젝트 만들어주기, UIScrollView 만들어주기 3. scroll Rect, mask, horizontal layout group, Content Size cutter 추가 4. 이미지 ChestCell들 이미지 만들어주기 5. 메모장에 적은거 보고 코딩해보기 [DataManager X] Practice05UIChestCell using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Practice05UIChestCel..

[복습] LearnUGUI - Test05[Shop]

지금 내가 느끼는게 ScrollView나 DataManager나 스크립트들이 무슨 역할을 하는지 잘 모르는거 같다. ..잘 모르겠어서 복습을 마저했는데 계속 해봐야할 것 같다. 메모장에 적어서 생각 정리를 좀 해야할 것 같다. 이 부분 어떻게 추가했는지 잘 몰랐다가 그냥 내가 + 버튼을 눌러서 UIAtlas를 입력해주면 알아서 AtlasManager가 Text를 읽고 경로를 찾아가는 것 같다. AtlasManager using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.U2D; public class AtlasManager : MonoBehaviour { [SerializeField] ..

LearnUGUI - Test05 [Shop] - 데이터 저장/ 불러오기 , json, DataManager, ChestData, Prefab

Test05UIScrollView using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.U2D; public class Test05UIChestScrollView : MonoBehaviour { [SerializeField] private Transform contentTr; [SerializeField] private GameObject uiChestCellPrefab; [SerializeField] private GameObject uiChestCellAdPrefab; private List cellList = new List(); public void Init() { List ch..

유니티 심화 2023.09.07