Unity

    04. Photon - 실습 1 (2) 플레이어 Material 바꾸기

    🔷 실습 1 (2) - 플레이어 Material 바꾸기 - MonoBehaviourPunCallbacks - PunRPC / GetComponent().RPC(nameof(함수명), RpcTarget.AllViaServer, 파라미터); - public override void OnPlayerEnteredRoom(Player newPlayer) - Player가 물체에 부딪혔을 때 넘어지지 않도록 Freeze Rotation 체크 - Sphere 생성 : Item_1 - Position : 0, 0.6, 0 - Material 생성해서 적용 - 위와 같이 Item_2, Item_3 생성 using System.Collections; using System.Collections.Generic; using ..

    03. Photon - 실습 1 (1) player 생성, 위치 동기화

    🔷 실습 1 room에 입장하면서 player 생성 위치 동기화 🔶 Photon 기본 세팅 - 포톤 어플리케이션 생성 - 아이디 복사 - 유니티 PUN2 패키지 임포트 - 아이디 붙여넣기 🔷 이동 로직 - 빈게임오브젝트 생성 : PhotonManager - 스크립트 생성 : PhotonManager - 게임오브젝트에 스크립트 추가 - 큐브 생성 : Floor - Scale : 10, 0.1, 10 - 빈게임오브젝트 생성 : GameManager - 스크립트 생성 : GameManager - 빈게임오브젝트에 스크립트 추가 - 빈게임 오브젝트 생성 : SpawnPointGroup - Position : 0, 0.6, 0 - 하위에 빈게임오브젝트 생성 : SpawnPoint_1, SpawnPoint_2 - 마..

    06. Firebase Realtime Database - 심화

    🔷 Firebase 심화 데이터 구조가 앞서 포스팅한 예제처럼 간단하지 않을 경우, 아래의 글을 참조 🔶 파이어베이스 데이터 구조 - 위와 같이 데이터 구조를 생성 🔷 Load data using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; // Firebase 네임스페이스 선언 using Firebase; using Firebase.Database; public class FirebaseManager : MonoBehaviour { // 저장할 데이터 UI public InputField userName; public InputField gold; // 로..

    05. Firebase Realtime Database - Delete

    🔷 Delete Data using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; // Firebase 네임스페이스 선언 using Firebase; using Firebase.Database; // Firebase에 저장할 데이터 구조 public class User { public string userName; public int gold; // 생성자 public User(string _userName, int _gold) { this.userName = _userName; this.gold = _gold; } } public class FirebaseM..

    04. Firebase Realtime Database - Select

    🔷 Select Data using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; // Firebase 네임스페이스 선언 using Firebase; using Firebase.Database; // Firebase에 저장할 데이터 구조 public class User { public string userName; public int gold; // 생성자 public User(string _userName, int _gold) { this.userName = _userName; this.gold = _gold; } } public class FirebaseM..

    03. Firebase Realtime Database - Load

    🔷 주의할 점 ...정말 별 거 아닌 걸로 몇시간씩이나 소비해서 힘들었다. 데이터를 로드하는 것은 성공하였지만, UI의 text가 바뀌지 않아서 골머리를 썩었다. 문제는 task 안쪽에다가 UI.text를 바꾸는 코드를 작성해서 그런 것이었다. 데이터가 로드될 때까지 기다렸다가 UI.text를 바꾸는 코드를 작성하니 해결되었다. 🔷 Load Data using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; // Firebase 네임스페이스 선언 using Firebase; using Firebase.Database; // Firebase에 저장할 데이터 구조 ..

    02. Firebase Realtime Database - Insert

    🔷 Realtime Database 세팅 🔶 Firebase - Realtime Database - 데이터베이스 만들기 - 다음 - 테스트 모드에서 시작 - 사용 설정 - '+' 기호 - 데이터 아무거나 기입 > 추가 - 데이터가 삽입된 것을 확인 - X 를 눌러 데이터 삭제 - 클릭하여 주소 복사 🔶 Unity { "project_info": { "project_number": "878253878040", "project_id": "fir-demo-3c2bb", "storage_bucket": "fir-demo-3c2bb.appspot.com", "firebase_url": "https://fir-demo-3c2bb-default-rtdb.firebaseio.com/" }, "client": [ { "..

    01. Firebase Setting

    🔷 Firebase 세팅 🔶 document https://firebase.google.com/docs/unity/setup?hl=ko Unity 프로젝트에 Firebase 추가 Unity 프로젝트에 Firebase 추가plat_iosplat_androidplat_unity Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google firebase.google.com https://firebase.google.com/docs/database/unity/start Unity용 Firebase 실시간 데이터베이스 시작하기 Firebase 실시간 데이터베이스는 NoSQL 클라우드 데이터베..