parksh3641의 등록된 링크

키자드에 등록된 총 461개의 포스트를 확인하실 수 있습니다.

Tistory

유니티 C# NGUI 가변 해상도 대응 IOS 간단 사용법

UIroot.cs 코드 변경 public void UpdateScale(bool updateAnchors = true) { if (mTrans != null) { float calcActiveHeight = activeHeight; if (calcActiveHeight > 0f) { float size = 2f / calcActiveHeight; Vector3 ls = mTrans.localScale; if (!(Mathf.Abs(ls.x - size)

Tistory

유니티 C# 파이어베이스 익명 로그인 간단 사용법 Firebase Auth Guest Login

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseAuth.unitypackage 설치 코드 작성 using Firebase; using Firebase.Extensions; using System.Collections; using System.Collections.Generic; using UnityEngine; p..

Tistory

유니티 C# 파이어베이스 데이터 저장, 불러오기 Save, Load 간단 사용법 데이터베이스 DataBase

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseDatabase.unitypackage 설치 코드 작성 using Firebase; using Firebase.Database; using Firebase.Extensions; using System.Collections; using System.Collections...

Tistory

유니티 C# 파이어베이스 리더 보드 랭킹 Leaderboard 간단 구현법

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseDatabase.unitypackage 설치 코드 작성 using Firebase; using Firebase.Database; using Firebase.Extensions; using System.Collections; using System.Collections...

Tistory

유니티 C# 파이어베이스 클라우드 스토리지 Cloud Storage 간단 사용법

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseStorage.unitypackage 설치 코드 작성 using Firebase; using Firebase.Extensions; using Firebase.Storage; using System.Collections; using System.Collections.Ge..

Tistory

유니티 C# 리소스 로드 Resource.Load 함수 간단 사용법

코드 작성 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ResourceLoad : MonoBehaviour { void Start() { GameObject obj = Resources.Load("GameObject") as GameObject; Sprite sprite = Resources.Load("GameObject") as Sprite; AudioClip audioClip = Resources.Load("GameObject") as AudioClip; TextAsset textAsset = Resources.Load..

Tistory

유니티 생명 주기 Life Cycle 간단 설명

using UnityEngine; public class UnityLiftCycle : MonoBehaviour { void Awake() { Debug.Log("1"); } void OnEnable() { Debug.Log("2"); } void Start() { Debug.Log("3"); } void FixedUpdate() { Debug.Log("4"); } void OnTriggerEnter(Collider other) { Debug.Log("5"); } void OnCollisionEnter(Collision other) { Debug.Log("6"); } void Update() { Debug.Log("7"); } void LateUpdate() { Debug.Log("8"); } void ..

Tistory

유니티 C# 부모 자식 오브젝트 가져오기 GetChild 간단 사용법

주의 자식 오브젝트는 씬에서 활성화되어 있어야합니다. 코드 작성 (GetComponentsInChildren 활용) using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class GetChild : MonoBehaviour { public Transform[] objList; void Start() { objList = gameObject.GetComponentsInChildren(); } } 다른 방법 (자식 오브젝트를 여러개 가진 자식 오브젝트를 가져오는법) using System; using System.Collections; usin..

Tistory

유니티 C# 로컬 푸시 알림 Local Push Notification 간단 구현

에셋 다운로드 Simple Android Notifications Free | 기능 통합 | Unity Asset Store Use the Simple Android Notifications Free from Hippo on your next project. Find this integration tool & more on the Unity Asset Store. assetstore.unity.com 코드 작성 using UnityEngine; using System.Collections.Generic; using System; using Assets.SimpleAndroidNotifications; #if UNITY_IOS using NotificationServices = UnityEngine.iOS..

Tistory

유니티 플레이팹 친구 추가, 삭제하기 Playfab Friends Add, Delete 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using System; using System.Collections.G..

Tistory

유니티 플레이팹 아이템 구매 Playfab Shop Purchase Item 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using System; using System.Collections.G..

Tistory

유니티 플레이팹 아이템 주기 Playfab Grant Item ToUser 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using System; using System.Collections.G..

Tistory

유니티 C# 애플 로그인 Sign ln with Apple Login 간단 구현

애플 SDK 설치 Release Sign in with Apple Unity Plugin v1.4.2 · lupidan/apple-signin-unity Changed Handles empty NSPersonNameComponents sent by Apple when not requesting a name, to be nil natively. Updated MacOSAppleAuthManager.bundle with the updated native code Removed Removes FixSe... github.com 코드 작성 using System.Collections; using System.Text; #if UNITY_IOS using AppleAuth; using AppleAuth.Nativ..

Tistory

유니티 플레이팹 페이스북 로그인 Playfab Sign ln with Facebook Login 간단 구현

페이스북 유니티 SDK 설치 Unity SDK - 문서 - Facebook for Developers The Unity engine and ecosystem gives developers a world class technology platform from which they can build games that work seamlessly across multiple platforms quickly and effectively. The Facebook SDK for Unity complements Unity Technologies' cross-platf developers.facebook.com 코드 작성 using Facebook.Unity; using PlayFab; using PlayFab.Cli..

Tistory

유니티 플레이팹 애플 로그인 Playfab Sign ln with Apple Login 간단 구현

유니티용 애플 SDK 설치 Release Sign in with Apple Unity Plugin v1.4.2 · lupidan/apple-signin-unity Changed Handles empty NSPersonNameComponents sent by Apple when not requesting a name, to be nil natively. Updated MacOSAppleAuthManager.bundle with the updated native code Removed Removes FixSe... github.com 코드 작성 using System.Collections; using System.Text; using PlayFab; using PlayFab.ClientModels; #if ..

Tistory

유니티 플레이팹 Json으로 타이틀 데이터 저장, 불러오기 Playfab

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 공통 private void DisplayPlayfabError(PlayFabErr..

Tistory

유니티 C# 구글 스프레드 시트 Google Sheet 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using UnityEngine.Networking; public class Example : MonoBehaviour { const string DownloadURL = "https://docs.google.com/spreadsheets/d/" + "주소 Id 값" + "/export?format=tsv&gid=0"; void Awake() { StartCoroutine(DownloadFile()); } IEnumerator DownloadFile() { Debug.Log("File Downloading..."); Unit..

Tistory

유니티 C# 자주 사용하는 연산자 Operator 모음

산술 연산자 using UnityEngine; public class Example : MonoBehaviour { public int a = 10; public int b = 5; void Awake() { //더하기 연산자 Debug.Log(a + b); // 15 //빼기 연산자 Debug.Log(a - b); // -5 //곱하기 연산자 Debug.Log(a * b); // 50 //나누기 연산자 Debug.Log(a / b); // 2 //나머지 연산자 b = 3; Debug.Log(a % b); // 1 //할당 연산자 a++; // a = 11 a--; // a = 10 } } 할당 연산자 using UnityEngine; public class Example : MonoBehaviour {..

Tistory

유니티 C# 디버그 로그 종류 Debug.Log 간단 사용법

코드 작성 using UnityEngine; public class Example : MonoBehaviour { void Awake() { Debug.Log("회색 디버그 로그"); Debug.LogWarning("노란색 디버그 로그"); Debug.LogError("빨간색 디버그 로그"); } } 참고할만한 글 유니티 C# 비속어 필터 적용 inputfield 간단 사용법 Assets / Resoures / BadWord.txt 준비 코드 작성 using System.Collections; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; using UnityEngine; using Unity..

Tistory

유니티 C# 비속어 필터 적용 inputfield 간단 사용법

유니티 C# 비속어 필터 적용 inputfield 간단 사용법 Assets / Resoures / BadWord.txt 준비 코드 작성 using System.Collections; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public InputField inputField; public string[] lines; string LINE_SPLIT_RE = @"\r\n|\n\r|\n|\r"; void Awake() { if (File.Exists(..

Tistory

유니티 C# 파이어베이스 SDK 다운로드 Firebase Unity SDK

파이어베이스 SDK 설치 Unity 프로젝트에 Firebase 추가 | Firebase Documentation 의견 보내기 Unity 프로젝트에 Firebase 추가 plat_ios plat_android plat_unity Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드 firebase.google.com 참고할만한 글 유니티 C# 파이어베이스 인증 Firebase Auth 간단 사용법 파이어베이스 SDK 다운로드 https://firebase.google.com/docs/unity/setup?hl=ko Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기..

Tistory

유니티 C# 파이어베이스 Crashlytics 간단 사용법

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseCrashlytics.unitypackage 설치 코드 작성 using Firebase; using Firebase.Analytics; using System.Collections; using System.Collections.Generic; using UnityEng..

Tistory

유니티 허브 설치 및 개발 환경 세팅하기 Unity Hub

유니티 허브 설치 https://unity3d.com/kr/get-unity/download Download Unity! Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers. unity3d.com 유니티 원하는 버전 설치 (LTS 추천) https://unity3d.com/kr/get-unity/download/archive Get Unity - Download..

Tistory

유니티 플레이팹 타이틀 데이터 불러오기 Playfab GetTitleInternal 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 플레이팹 서버 시간 가져오기 Playfab GetServerTime 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 플레이팹 타이틀 뉴스 가져오기 Playfab ReadTitleNews 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 플레이팹 클라우드 스크립트 사용 Playfab CloudScripts 간단 사용법

클라우드 스크립트 사용하는 이유? 클라이언트에서 코드를 처리하는 방식이 아닌 서버에서 처리하기때문에 로그를 남길 수도 있고 더 빠르고 안전하게 코드를 처리할 수 있습니다. 코드 작성 (기본값 세팅) using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayfabManager : MonoBehaviour { private void SetEditorOnlyMessage(string message, bool ..

Tistory

유니티 플레이팹 유저 프로필 가져오기 Playfab GetProfile 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 데이터 가져오기 using PlayFab; using PlayFab.ClientMo..

Tistory

유니티 플레이팹 닉네임 변경, 불러오기 Playfab NickName 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 플레이팹 리더보드 랭킹 불러오기 Playfab LeaderBoard 간단사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 모바일 64비트 빌드 최적화 세팅 모음 Unity Moblie Build

물리를 사용하지 않는다면 Project Settings / Qualitiy / Auto Simulation, Auto Sync Transforms 끄기 프레임 조절 보드 게임 Application.targetFrameRate = 30 Fps 게임 Application.targetFrameRate = 60 빌드 압축 형식 Build Settings / Texture Compression ETC Compression Method LZ4HC 선택 64비트 빌드를 위한 플레이어 설정 Project Settings / Player / Other Settings Color Space = Linear 선택 Multithreaded Rendering 사용 Static Batching 사용 Compute Skinning..

Tistory

유니티 C# 카메라 흔들기 Camera Shake 간단 사용법

코드 작성 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public float shakeAmount = 3.0f; public float shakeTime = 1.0f; private void Start() { StartCoroutine(Shake(shakeAmount, shakeTime)); } IEnumerator Shake(float ShakeAmount, float ShakeTime) { float timer = 0; while (timer

Tistory

유니티 C# 오디오 Audio Source , Audio Clip 간단 사용법

코드 작성 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public AudioSource audioSource; public AudioClip audioClip; private void Start() { audioSource.Play(); //재생 audioSource.Stop(); //정지 audioSource.Pause(); //일시정지 audioSource.UnPause(); //일시정지 해제 audioSource.playOnAwake = true; //씬 시작시 바로 재..

Tistory

유니티 플레이팹 유저 데이터 가져오기 Playfab SetUserData 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 데이터 불러오기 using PlayFab; using PlayFab.ClientMo..

Tistory

유니티 플레이팹 유저 데이터 불러오기 Playfab GetUserData 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 유저 데이터 불러오기 using PlayFab; using PlayFab.Clien..

Tistory

유니티 C# 자석 효과 Magnet 간단 구현

코드 작성 (적용하고 싶은 오브젝트에 적용) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public Transform target; public float moveSpeed = 1.0f; private void Update() { Vector2 relativePos = target.transform.position - transform.position; float angle = Mathf.Atan2(relativePos.y, relativePos.x) * Mathf.Rad2Deg; transform...

Tistory

유니티 C# 스킬 쿨타임 구현 FillAmount 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SkillManager : MonoBehaviour { [Range(0, 20)] public float skillTime = 10.0f; [Range(0, 20)] public float skillCoolTime = 10.0f; public Image skillFillAmount; public Text skillCoolTimeText; bool isUseSkill = true; private void Awake() { skillInformationText.text = "Skill OFF"; ..

Tistory

유니티 C# 코루틴 Coroutine 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { private void Start() { StartCoroutine(ExampleCoroutine()); StartCoroutine(Example2Coroutine()); StopAllCoroutine(); //모든 코루틴 정지 } IEnumerator ExampleCoroutine() { Debug.Log("코루틴 실행중"); yield return new WaitForSeconds(1f); StartCoroutine(ExampleCoroutin..

Tistory

유니티 C# 시간 DateTime 출력하기 간단 사용법

코드 작성 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { DateTime today; DateTime now; private void Start() //날짜 디버그 출력 { today = System.DateTime.Today; now = System.DateTime.Now; Debug.Log(today.ToString("yyyy-MM-dd")); Debug.Log(now.ToString("yyyy-MM-dd-hh-mm-ss")); } void AddDateTime() //날짜 ..

Tistory

유니티 C# 시스템 언어 가져오기 System Language 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { void Start() { if (Application.systemLanguage == SystemLanguage.English) { Debug.Log("영어"); } else if (Application.systemLanguage == SystemLanguage.Korean) { Debug.Log("한국어"); } else if (Application.systemLanguage == SystemLanguage.Japanese) { Debug.Log("일본어"); } else if (A..

Tistory

유니티 C# 해상도 설정 SetResolution 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public int width = 1080; //가로 public int height = 1920; //세로 private void Start() { Screen.SetResolution(width, height, true); } }

Tistory

유니티 C# 화면 터치 드래그 Touch Drag 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class TouchManager : MonoBehaviour { private Vector2 startPos; public float minSwipeDistY = 50f; public float minSwipeDistX = 50f; private bool firstSwipe = false; public string direction = ""; //Up, Down, Left, Right로 입력이 들어옵니다. void Update() { if (Time.timeScale == 0) { InputButtonUp(); return; } } publ..

Tistory

유니티 C# 일시정지 Pause 구현하기 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { bool isPause = false; void Awake() { Time.timeScale = 1; } public void Pause() { if (!isPause) //정지됨 { isPause = true; Time.timeScale = 0; } else //해제 { isPause = false; Time.timeScale = 1; } } }

Tistory

유니티 C# 메테리얼 알파값 간단 변경법 Unity Material Alpha

Material 의 SurfaceType 이 Transparent 이어야 알파값을 적용할 수 있습니다. URP 기준 Material를 UI/Unlit/Transparent로 생성후 Tint의 Alpha 값을 변경하면 됩니다. 코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { Material material; float alpha = 0; private void Awake() { material = GetComponent(); material.color = new Color(color.r, color.g, color.b, alpha / ..

Tistory

유니티 C# 스킨드 메쉬 랜더러 Blend Shape 설정 간단 사용법

Blend Shape이란? 스킨드 매쉬 랜더러 애니메이션을 적용하고 싶을때 사용 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { SkinnedMeshRenderer skinnedMeshRenderer; private void Awake() { skinnedMeshRenderer = GetComponent(); } private void OnEnable() { StartCoroutine(SetBlendShapeCoroution(skinnedMeshRenderer)); } private void OnDisable() { StopAllCoroutin..

Tistory

유니티 C# 공전, 자전 간단 구현 Revolution

공전 public class MoonRevolution : MonoBehaviour { public Transform target; [Range(0, 100)] public float rotateSpeed = 10f; private void Update() { transform.RotateAround(target.transform.position, new Vector3(0, 1, 0), rotateSpeed * Time.deltaTime); } } 자전 public class EarthRotation : MonoBehaviour { [Range(0, 100)] public float speed = 25f; private void Update() { transform.Rotate(new Vector3(0,..

Tistory

유니티 C# 플랫폼 분기별 코드 작성하기 Platform 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { void Start() { #if UNITY_EDITOR Debug.Log("유니티 에디터에서 실행"); #elif UNITY_ANDROID Debug.Log("안드로이드에서 실행"); #elif UNITY_IOS Debug.Log("아이폰에서 실행"); #elif UNITY_WEBGL Debug.Log("웹에서 실행"); #endif } } 다른 방법 using System.Collections; using System.Collections.Generic; using UnityEngi..

Tistory

유니티 플레이팹 유저 인벤토리 가져오기 Playfab GetUserInventory 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 플레이팹 상점 카테고리 가져오기 Playfab GetCatalog 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 코드 작성 using PlayFab; using PlayFab.ClientModel..

Tistory

유니티 플레이팹 통계 저장 불러오기 Playfab GetStatistics 간단 사용법

플레이팹 로그인이 되었다는 가정하에 진행 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesMod parksh3641.tistory.com 저장 public void UpdatePlayerStatistics(string k..

Tistory

유니티 C# 버튼 리스너 onClick AddListener 추가 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public Button[] buttons; private void Start() { for(int i = 0; i < buttons.Length; i ++) //여러 버튼에 클릭 이벤트 등록 { int temp = i; buttons[i].onClick.AddListener(() => OnClick(temp + i)); } } void OnClick(int number) { Debug.Log(number); } } 리스너 제거 (제거 안해줄경우 ..

Tistory

유니티 C# 시스템 액션 System.Action 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class Example : MonoBehaviour { int a = 0; int b = 0; private void Start() { a = 5; b = 4; CheckAction(a + b, ResultAction); } public void CheckAction(int number, Action action) { if(number > 10) { action.Invoke(true); } else { action.Invoke(false); } } public void ResultAction(bool check) {..

Tistory

유니티 C# 인터페이스 Interface 간단 사용법

인터페이스 선언 using System.Collections; using System.Collections.Generic; using UnityEngine; public class InterfaceManager : MonoBehaviour { } public interface IButtonClick { void Initalize(); void OnClick(); } 인터페이스 활용 (상속 받을 시 무조건 구현해야함) using System.Collections; using System.Collections.Generic; using UnityEngine; public class ExampleOne : IButtonClick { public int number = 0; public void Initaliz..

Tistory

유니티 C# 비동기 프로그래밍 Task 간단 사용법

using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Threading.Tasks; public class Example : MonoBehaviour { int number = 0; private void Start() { Task.Run(() => Testing()); } async Task Testing() { await Task.Run(() => { while(number < 500) { number++; } }); await Task.Delay(5000); } }

Tistory

유니티 플레이팹 구글 로그인 Playfab Sign In with Google Login 간단 구현

구글 로그인 SDK 설치 GitHub - playgameservices/play-games-plugin-for-unity: Google Play Games plugin for Unity Google Play Games plugin for Unity. Contribute to playgameservices/play-games-plugin-for-unity development by creating an account on GitHub. github.com 구글 로그인 구현 using GooglePlayGames; using GooglePlayGames.BasicApi; using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab...

Tistory

유니티 C# 조건문 if, else, Swtich 문 간단 사용법

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { int a = 0; int b = 0; string s = "안녕하세요"; string t = "반갑습니다"; private void Start() { if (a > b) { Debug.Log("a가 b보다 큽니다."); } else { Debug.Log("a가 b보다 같거나 작습니다."); } if (s.Equals(t)) { Debug.Log("서로 같습니다."); } else { Debug.Log("서로 다릅니다."); } switch(a) { case..

Tistory

유니티 C# 반복문 for, foreach, While 문 간단 사용법

For문 for (int i = 0; i < 10; i++) { Debug.Log("Iteration " + i); } Foreach문 int[] numbers = {1, 2, 3, 4, 5}; foreach (int number in numbers) { Debug.Log("Number: " + number); } While문 int count = 0; while (count < 5) { Debug.Log("Count: " + count); count++; }

Tistory

유니티 C# 예외처리 Try Catch Finally 문 간단 사용법

Try Catch Finally 문을 사용하는 이유는? 프로그램 실행 중 예외상황이 발생하면 프로그램이 멈춰버리기 때문에 예외처리를 해줘서 멈추지 않게 만들어줍니다. 코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class Example : MonoBehaviour { int a = 0; int b = 0; int result = 0; private void Start() { try { result = a + b; Debug.Log(result); } catch (NullReferenceException e) { Debug.Log("오류 내용 : " + e); }..

Tistory

유니티 C# Application 관련 API 사용법 모음

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public Text versionText; private void Awake() { Application.targetFrameRate = 60; //프레임 조절 Screen.sleepTimeout = SleepTimeout.NeverSleep; //잠들지 않도록 설정 Screen.sleepTimeout = SleepTimeout.SystemSetting; //시스템 설정 사용 versionText.text = Application.version;..

Tistory

유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법

코드 작성 using PlayFab; using PlayFab.ClientModels; using PlayFab.Json; using PlayFab.ProfilesModels; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using EntityKey = PlayFab.ProfilesModels.EntityKey; public class PlayfabManager : MonoBehaviour { static string customId = ""; static string playfabId = ""; private string entityId; priva..

Tistory

유니티 C# 충돌 처리 OnTrigger Enter, Stay, Exit 간단 사용법

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public void OnTriggerEnter(Collider other) { if(other.gameObject.tag == "Player") { Debug.Log("플레이어와 접촉 시작"); } } public void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { Debug.Log("3D 플레이어와 접촉중"); } } public void OnTriggerExit(Col..

Tistory

유니티 C# 타이머 만들기 시분초 00:00:00 Timer

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public Text timerText; public int timer = 0; private void Start() { StartCoroutine(TimerCoroution()); } IEnumerator TimerCoroution() { timer += 1; timerText.text = (timer / 3600).ToString("D2") + ":" + (timer / 60 % 60).ToString("D2") + ":" + (timer % ..

Tistory

유니티 C# 로컬 데이터 저장, 불러오기 PlayerPrefs 간단 사용법

데이터 저장 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { private void SetValue() { PlayerPrefs.SetFloat("Apple", 1.0f); PlayerPrefs.SetInt("Orange", 1); PlayerPrefs.SetString("Banana", "Banana"); } } 데이터 불러오기 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { pri..

Tistory

유니티 C# 이벤트 델리게이트 delegate Event 간단 사용법

델리게이트 선언 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Example : MonoBehaviour { public delegate void GameEvent(); //이벤트 선언 public static event GameEvent eGameStart, eGamePause, eGameEnd; public delegate void ScoreEvent(int number); //이벤트 선언 public static event ScoreEvent ePlusScore, eMinusScore; private void Start() { eGameStar..

Tistory

유니티 C# 랜덤 난수 생성 Random.Range 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { public int minNumber = 0; public int maxNumber = 10; void Start() { int random = Random.Range(0, 10); Debug.Log(random); int random2 = Random.Range(minNumber, maxNumber); Debug.Log(random2); } } 유니티 Api 참조 https://docs.unity3d.com/kr/530/ScriptReference/Random.Range.html Ra..

Tistory

유니티 C# 씬 로드 동기, 비동기 간단 사용법 Load Scene Async

씬 동기 로드 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class Example : MonoBehaviour { public void LoadScene(int number) { SceneManager.LoadScene(number); } public void LoadScene(string name) { SceneManager.LoadScene(name); } } 씬 비동기 로드 using System.Collections; using System.Collections.Generic; using..

Tistory

유니티 C# 코루틴 동작, 시간 딜레이 Coroutine, Invoke 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class Example : MonoBehaviour { private void Start() { StartCoroutine(DelayCoroution()); Invoke("Delay", 5); } IEnumerator DelayCoroution() { yield return new WaitForSeconds(5); Debug.Log("5초가 지났습니다."); } void Delay() { Debug.Log("5초가 지났습니다."); } } ..

Tistory

유니티 C# 키보드 입력 Keyboard input 간단 사용법

using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { void Update() { if(Input.GetKey(KeyCode.A)) { Debug.Log("Press A"); } if (Input.GetKey(KeyCode.UpArrow)) { Debug.Log("Press UpArrow"); } if (Input.GetKey(KeyCode.Space)) { Debug.Log("Press Space"); } } }

Tistory

유니티 C# 캐릭터 키보드 이동 간단 구현

방향키로 이동 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class PlayerMove : MonoBehaviour { public float moveSpeed = 5.0f; private void FixedUpdate() //키보드로 이동 { float h = Input.GetAxis("Horizontal"); float v = Input.GetAxis("Vertical"); transform.position += new Vector3(h, 0, v) * moveSpeed * Time.deltaTime; } } 키보드로 이동 using System.Col..

Tistory

유니티 C# 특수문자 제한 간단 사용법 input text

코드 작성 using System.Collections; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; using UnityEngine; public class NickNameManager : MonoBehaviour { public InputField inputField; public void CheckNickName() { string Check = Regex.Replace(inputField.text, @"[^a-zA-Z0-9가-힣]", "", RegexOptions.Singleline); Check = Regex.Replace(inputField.text, @"[^\w\.@-]", ""..

Tistory

유니티 C# 파이어베이스 애널리틱스 Firebase Analytics 간단 사용법

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseAnalytics.unitypackage 설치 코드 작성 using Firebase; using Firebase.Analytics; using System.Collections; using System.Collections.Generic; using UnityEngin..

Tistory

유니티 C# 인앱결제 시스템 IAP Manager 간단 사용법

코드 작성 (구버전용) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Purchasing; public class IAPManager : MonoBehaviour, IStoreListener { private static IStoreController mStoreController; private static IExtensionProvider mStroeExtensionProvider; public static string Product_1 = "shop.cristalpack100"; void Start() { if (mStoreController == null) { Initia..

Tistory

유니티 C# CSV 파일 저장, 불러오기 Read, Write 간단 사용법

파일 저장 경로 불러오는 코드 작성 using System.IO; using UnityEngine; public static class SystemPath { public static string GetPath(string fileName) { string path = GetPath(); return Path.Combine(GetPath(), fileName); } public static string GetPath() { string path = null; switch (Application.platform) { case RuntimePlatform.Android: path = Application.persistentDataPath; path = path.Substring(0, path.LastInde..

Tistory

유니티 C# 윈도우 창 애니메이션 Window Animation 간단 사용법

코드 작성 (Dotween 사용) using UnityEngine; using System.Collections; using DG.Tweening; public class WindowAnimation : MonoBehaviour { float duration = 0.15f; Vector3 scaleTo = new Vector3(1f, 1f, 1f); void OnEnable() { transform.localScale = new Vector3(0, 0, 0); transform.DOScale(scaleTo, duration); } void OnDisable() { transform.localScale = new Vector3(0, 0, 0); } } 코드 작성 using UnityEngine; using..

Tistory

유니티 C# 파이어베이스 푸시알림 Firebase Cloud Messaging FCM 간단 사용법

파이어베이스 SDK 다운로드 Unity 프로젝트에 Firebase 추가 | Unity용 Firebase 의견 보내기 Unity 프로젝트에 Firebase 추가 Firebase Unity SDK를 활용하여 Unity 게임을 업그레이드 해보세요. Firebase를 Unity 프로젝트에 연결하는 것이 얼마나 간편한지 보여드리기 위해 Google은 MechaHamst firebase.google.com 압축 푼 뒤 dotnet4 / FirebaseMessaging.unitypackage 설치 코드 작성 using Firebase; using Firebase.Messaging; using System.Collections; using System.Collections.Generic; using UnityEngin..

Tistory

유니티 C# 페이드 인 페이드아웃 Fade In, Fade Out 간단 사용법

코드 작성 using UnityEngine; using System.Collections; public class FadeInOut : MonoBehaviour { public float fadeSpeed = 1.5f; public bool fadeInOnStart = true; public bool fadeOutOnExit = true; private CanvasGroup canvasGroup; void Start() { canvasGroup = GetComponent(); if (fadeInOnStart) { canvasGroup.alpha = 0f; StartCoroutine(FadeIn()); } } IEnumerator FadeIn() { while (canvasGroup.alpha < 1) {..

Tistory

유니티 C# 버튼 클릭 애니메이션 Button Click Animation 간단 사용법

코드 작성 using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.EventSystems; public class ButtonClickAnimation : MonoBehaviour, IPointerDownHandler, IPointerUpHandler { public void OnPointerDown(PointerEventData eventData) //버튼 눌렀을 떄 { transform.localScale = Vector3.one * 0.95f; } public void OnPointerUp(PointerEventData eventData) //버튼을 땟을 때 { transform.localScale = ..

Tistory

유니티 C# 기즈모 Gizmo 간단 사용법

using System.Collections; using System.Collections.Generic; using UnityEngine; public class Gizmo : MonoBehaviour { public Color color = Color.blue; public float radius = 1.0f; void OnDrawGizmos() { Gizmos.color = color; Gizmos.DrawSphere(transform.position, radius); } }

Tistory

유니티 C# 인터넷 연결 상태 확인 Network Connect 간단 사용법

코드 작성 using UnityEngine; public class NetworkConnect : MonoBehaviour { bool isConnect = false; public bool CheckConnectInternet() { if (Application.internetReachability == NetworkReachability.NotReachable) { // 인터넷 연결이 안되었을때 isConnect = false; } else if (Application.internetReachability == NetworkReachability.ReachableViaCarrierDataNetwork) { // 데이터로 인터넷 연결이 되었을때 isConnect = true; } else { // 와이..

Tistory

유니티 C# DontDestroyOnLoad 간단 사용법

using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ExampleDontDestroyOnLoad : MonoBehaviour { void Awake() { var obj = FindObjectsOfType(); if (obj.Length == 1) { DontDestroyOnLoad(this); } else { Destroy(this); } } }

Tistory

유니티 C# 파일 저장 경로 System Path 간단 사용법

코드 작성 using System.IO; using UnityEngine; public static class SystemPath { public static string GetPath(string fileName) //파일 위치 불러오기 { string path = GetPath(); return Path.Combine(GetPath(), fileName); } public static string GetPath() //플랫폼 별 파일이 저장되는 위치 불러오기 { string path = null; switch (Application.platform) { case RuntimePlatform.Android: path = Application.persistentDataPath; path = path.Su..

Tistory

유니티 C# 프레임 체크 Fps Check 간단 사용법

using System.Collections; using System.Collections.Generic; using UnityEngine; public class FpsCheck : MonoBehaviour { float deltaTime = 0.0f; void Update() { deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f; } void OnGUI() { int w = Screen.width, h = Screen.height; GUIStyle style = new GUIStyle(); Rect rect = new Rect(0, 0, w, h * 2 / 100); style.alignment = TextAnchor.UpperLeft; style...

Tistory

유니티 C# 구글 애드몹 보상형 광고 간단 구현 Google Admob 8.7.0

유니티용 구글 Admob SDK 설치 Releases · googleads/googleads-mobile-unityOfficial Unity Plugin for the Google Mobile Ads SDK - googleads/googleads-mobile-unitygithub.com 구글 Admob 설정  Google AdMob: 모바일 앱 수익 창출인앱 광고를 사용하여 모바일 앱에서 더 많은 수익을 창출하고, 사용이 간편한 도구를 통해 유용한 분석 정보를 얻고 앱을 성장시켜 보세요.admob.google.com 구글 Admob 홈페이지  보상형 광고  |  Unity  |  Google for DevelopersGoogle 모바일 광고 Unity 플러그인 버전 5.4.0 이하에서는 서비스가 종료되어..

Tistory

유니티 C# 열거형 Enum 간단 사용법

Enum 이란? 상수에 이름을 붙여 구분을 쉽게 하기위해 사용합니다. Enum을 사용하지 않고 코드 작성시 using System.Collections; using System.Collections.Generic; using UnityEngine; public class ExampleEnum : MonoBehaviour { int gold = 0; int crystal = 1; int money = 0; void Awake() { money = 0; switch (money) { case 0: Debug.Log("골드 발견"); break; case 1: Debug.Log("크리스탈 발견"); break; default: Debug.Log("아무것도 발견하지 못했습니다"); break; } } } Enu..

Tistory

유니티 C# 싱글톤 패턴 Singleton Pattern 간단 사용법

싱글 톤 패턴 해당 클래스의 인스턴스가 하나만 존재하도록 보장하는 패턴. 게임 내에서 전역적으로 접근해야 하는 매니저 클래스 등에 사용됩니다. using UnityEngine; public class Singleton : MonoBehaviour { public static Singleton instance; //인스턴스 선언 public int a = 0; public string name = "안녕하세요"; void Awake() { instance = this; } public void OnClick() { Debug.Log("클릭되었습니다"); } } 다른 곳에서 참조하기 using UnityEngine; public class UseSingleton : MonoBehaviour { void St..

Tistory

유니티 C# 구글 로그인 Google Play Games GPGS 간단 구현

구글 유니티용 SDK 다운로드 Unity용 Google Play 게임즈 플러그인 시작하기 | Android 게임 개발 | Android Developers Unity용 Google Play 게임즈 플러그인 시작하기 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. 이 주제에서는 Unity용 Google Play 게임즈 플러그인을 사용하도록 Unit developer.android.com 코드 작성 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using GooglePlayGames; using GooglePlayGames.BasicApi; public cla..

Tistory

유니티 파티클 시스템 Particle System 간단 정리

Prewarm 처음부터 재생 Bursts 동시에 입자를 확 뿜어낼 수 있음 (담배 도넛 효과) Shape 입자가 나올 모양의 형태를 지정할 수 있음 Velocity Over LifeTime 원하는 방향으로 속도를 부여할 수 있음 (태풍 효과) Limit Velocity over LiftTime 저항을 줄 때 편함 Force over LifeTime 일정한 방향으로 힘을 계속 가함 Color over LifeTime 시간이 지날수록 색깔을 변화 시킴 (중간에도 색을 지정할 수 있음) Color by Speed 입자에 스피드에 따른 색깔 지정 Size over LifeTime 시간이 지날수록 크기를 변화 시킴 Noise 파티클의 움직임을 방해함 (부들부들 떨리는 효과) Collision 입자에 충돌 가능 여..

Tistory

유니티 플레이팹 패키지 Playfab Unity SDK 설치

Playfab (플레이팹) 무료 DB 서버 Unity3D(C#) SDK - PlayFab PlayFab Unity3D(C#) SDK의 방문 페이지입니다. docs.microsoft.com 들어가셔서 빠른 다운로드 링크 : PlayFab SDK용 Unity 편집기 확장 (유니티 에디터에서 플레이팹 로그인 가능) 빠른 다운로드 링크 : Unity PlayFab SDK 2개를 설치하고 Import 합니다. 만약 Google Play Games SDK를 이미 설치한 상태라면 Import시 ExternalDependencyManager는 제외해야합니다. (충돌 우려가 있음) 다른 플레이팹 기능 구현 참조 유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 코드 작..

Tistory

유니티 C# 형 변환 Type Conversions 간단 사용법

정수 → 실수 형변환 int a = 5; float b = (int)a; 정수 → 실수 형변환 float a = 1.0f; int b = (float)a; 정수, 실수 → 문자열 int a = 1; float b = 1.0f; string c = a.ToString(); string d = b.ToString(); 문자열 → 정수, 실수 변환 string a = "12345"; int b = Int.Parse(a); float c = float.Parse(a);

Tistory

비둘기의 모험 기획스토리 2편 - Pigeon's Adventure

설계와 구현 나는 엄밀히 말하자면 게임 기획자가 아니라 게임 디렉터였다. 기획자는 디렉터와 개발자 사이에 존재하는 컨버터 혹은 변압기 같은 존재인데 나는 디렉팅을 했지 실질적인 구현에 있어서 훈수 이상의 무언가를 하지 못했다. 개발자 친구가 내 말을 듣고 기획과 개발을 동시에 했다고 보면 된다. 나의 기획에선 이미 게임 안에 유기적인 소사회를 구축했지만, 개발자에게 게임 엔진 혹은 컴퓨터 언어에 기반하여 목적을 전달하지 못했고, 개발자의 역량 또한 나의 기준에 상응하지 못해, 어떻게든 이뤄낸 다운그레이드 된 결과에서 조금씩 개선하는 방향으로 진행되었다. "마치 평생 이론만 배운 헬스 트레이너가 평생 운동해본적 없는 비만 체형의 사람을 운동시켜 올림픽을 준비하는 꼴이었다." 플레이 주체인 비둘기가 날아다니..

Tistory

유니티 유용한 에셋 추천 모음 Unity Asset

DOTween Pro UI 애니메이션, 페이드 인 아웃 등 간편한 효과들을 쉽게 적용시킬 수 있는 Asset DOTween Pro | 비주얼 스크립팅 | Unity Asset Store Get the DOTween Pro package from Demigiant and speed up your game development process. Find this & other 비주얼 스크립팅 options on the Unity Asset Store. assetstore.unity.com Odin - Inspector and Serializer 편집기나 인스펙터창에서 여러가지 편리한 기능을 사용할 수 있는 Asset Odin - Inspector and Serializer | 유틸리티 도구 | Unity As..

Tistory

유니티 C# Scriptable Object 스크립터블 오브젝트 간단 사용법

스크립터블 오브젝트란? ScriptableObject는 클래스 인스턴스와는 별도로 대량의 데이터를 저장하는 데 사용할 수 있는 데이터 컨테이너로 프로젝트의 메모리 사용을 줄일 때 사용합니다. 코드 작성 (예시 : 데이터베이스 만들기) using UnityEngine; [CreateAssetMenu(fileName = "PlayerDataBase", menuName = "DataBase/PlayerDataBase")] public class PlayerDataBase : ScriptableObject { [SerializeField] private int money = 0; public int Money { get { return money; } set { money = value; } } [Seriali..

Tistory

유니티 C# 최적화 기법 Object Pooling 오브젝트 풀링 간단 사용법

오브젝트 풀링이란? 오브젝트 풀링은 프로젝트를 최적화하고 게임 오브젝트를 빠르게 생성하고 파괴해야 할 때 CPU에 가해지는 부담을 줄이기 위해 사용합니다. 코드 작성 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPooling : MonoBehaviour { public GameObject prefab; //생성할 프리팹 public List prefabList = new List(); //프리팹을 보관할 리스트 public int index = 0; //리스트에서 순서대로 생성하기 위한 값 void Awake() { for (int i = 0; i <..

Tistory

비둘기의 모험 개발스토리 4편 - Pigeon's Adventure

12. 스토리의 중요성 세상에 존재하는 수많은 명작 게임들은 하나같이 플레이어 마음속을 파고드는 주옥같은 스토리도 한몫을 차지합니다. 기획자인 친구는 예전부터 글을 써 왔기 때문에 이런 일은 정말 능숙하게 잘 해냅니다. 친구는 저에게 여러가지 스토리를 보여줬었는데 저는 그중에서 제일 게임과 콘셉트가 비슷한 스토리를 선택했습니다. "흰색 비둘기(루루)는 어느 한 새장에서 우연히 탈출해 전세계 각지를 돌아다니며 그 과정에서 여러 동료와 장애물들을 만나면서 성장하며 최종적으로는 원래의 주인 만두 아저씨를 찾아가게 됩니다." 스토리를 보지않고 플레이하는 게이머분들도 계시지만 세계관이 뚜렷하게 잡혀있는 게임은 그에 맞게 여러 가지 새로운 콘텐츠와 다양한 오브젝트를 추가하기가 굉장히 편해지고 플레이어들 하여금 억지..

Tistory

비둘기의 모험 개발스토리 5편 - Pigeon's Adventure

16. 게임을 구성하고 있는 요소들 저는 주변 게임을 좋아하지 않는 사람들에게 게임이란 단어를 소개할 때 항상 쓰는 말이 있습니다. 바로 "게임은 하나의 종합예술이야"라고 말이죠. 한 장르에만 국한되어 있지 않고 모든 장르가 골고루 혼합되어있기 때문입니다. 저는 그중에서 효과음이나 배경음악 같은 청각적인 요소를 제일 좋아하는 편입니다. 예전에 좋아했던 게임, 영화, 드라마 등을 생각할 때 그것들의 대표적인 OST를 듣곤 하죠. 사람들은 자신이 좋아했던 게임들을 머릿속에서 떠올리려고 할 때 보통 그 게임이 가지고 있는 특유의 게임성이나 대표 음악, 메인 캐릭터를 제일 많이 떠올립니다. 저희는 게임의 마스코트, 게임성은 충분히 끌어올렸으나 메인 OST가 없었습니다. 친구는 회의에서 아는 친구에게 작곡을 부탁..

Tistory

비둘기의 모험 개발 후기 - Pigeon's Adventure

닭둘기의 모험은 21살 군대 가기 전 친구와 10개월 동안을 만든 게임입니다. 전체 기간 중 6개월 정도를 집중도 있게 개발했었고 참 다산 다난한 시간이었던 것 같습니다. 처음이라 우여곡절이 많았고 무엇보다 혼자서 독학으로 개발했기 때문에 시행착오 또한 너무나도 많았지만 돌이켜보면 그 시절의 저한테 칭찬을 해주고 싶습니다. 무엇보다 끈기와 노력, 열정으로 게임을 포기하지 않고 끝끝내 "완성"시켰기 때문입니다. 또한 게임 하나를 만들기 위해 개발, 그래픽, 기획, 음악 등 다양한 사람들과 함께 게임 하나를 만들기 위해 수많은 노력이 필요하다는 것을 알게 되었습니다. 하루 종일 컴퓨터 앞에 앉아 작업을 하면서 운동을 안 하다 보니 몸무게가 53kg까지 줄어듬과 동시에 체력적이나 정신적으로 정말 힘들었었고 이..

Tistory

비둘기의 모험 기획스토리 1편 - Pigeon's Adventure

비행의 꿈 문득 내 방에서 창밖을 보는데 빌딩과 빌딩 사이를 자유롭게 휘젓고 다니는 비둘기를 보았다. 인간은 태초부터 z좌표에 대한 꿈을 가지고 있었다. 비행기가 바로 그것이며, 엘리베이터도 그것이다. 나는 비행에 대한 이상을 게임을 통해 구현해야겠다고 생각했다. 그때까지는 말이다. 관념의 구체화 나는 바로 전화를 때려 개발자 친구에게 아이디어를 설명 해주었다. 나는 뭐든지 시작하고 본다. 감당할 수 있는지는 염두하지 않는다. 개발자 친구는 이 아이디어가 흥미롭지만 구체적인 속도로 따라잡으려는 눈치였다. 머릿속의 아이디어는 언제나 관념과 감각으로 이루어지기에 모든 것이 유기적이고 완벽하게 작동한다. 하지만 물리적 현실로서의 구현 단계에선, 어떤 경계를 넘어 구체화가 필요해진다. 이때 개발자와 기획자의 역..

Tistory

비둘기의 모험 개발스토리 1편 - Pigeon's Adventure

1. 개발을 시작하게 된 계기 저는 아주 오래전부터 모바일 게임을 만들어보고 싶은 생각을 가지고 있었습니다. 하지만 어떤 게임을 만들어야 될지 몰라 고민만 하며 하루하루 보내고 있었죠. 어느 날 기획자를 꿈꾸던 한 친구가 저에게 게임을 한 번 같이 만들어보면 어떻겠냐고 제안을 해왔습니다. 같이 게임을 만들면서 서로의 실력을 키워보자는 생각 었던 셈이죠. 제가 프로그래밍을 그 친구는 기획쪽을 맡고 나머지 그림 그릴 사람과 음악을 작곡할 사람은 자신이 구해보겠다고 했습니다. 완벽히 나눈 건 아닙니다. 일단 서로의 확실한 분야는 있어야 했으니까요. 예전부터 꿈꿔왔던 일이었고 재밌겠다는 생각에 저는 그 제안을 흔쾌히 수락하게 됩니다. 처음 친구와 회의를 하는 과정에서 그 친구는 저에게 비둘기가 도심을 여행하는 ..

Tistory

비둘기의 모험 개발스토리 2편 - Pigeon's Adventure

4. 새로운 콘텐츠가 필요한 시점 흔히 게임을 오래즐기기 위해선 다양한 컨텐츠가 구비되어 있어야 합니다. 어떤 게임이든 새로운 컨텐츠를 구상하는 전쟁을 매일 하고있습니다. 유저들을 게임에 오래 붙잡아 놓기 위해선 질리지 않게 하는 게 게임의 수명을 늘리는 지름길일 겁니다. 한국 플레이어는 전세계적으로 게임 컨텐츠 소비력이 굉장히 빠른 편입니다. 새로운 게임이 나왔다고해도 얼마 못가서 유저들이 전부 클리어해버리고 새로운 업데이트를 해달라고 요청하기 때문입니다. 새롭게 만들어야 할 것들은 회의를 통해 계속해서 늘어났지만 부족한 프로그래밍 실력덕분에 개발은 갈수록 더뎌갔습니다. 사실상 1인 개발자나 다름이 없었기 때문에 더욱 그랬죠. 하지만 언젠가 다 구현해보이겠다는 열정 하나만큼은 누구보다 컸습니다. 게임을..

Tistory

비둘기의 모험 개발스토리 3편 - Pigeon's Adventure

8. 메인화면을 구상하다. 게임이 어느 정도 완성되어 가면서 이제 임시로 그림을 그려서 대체했던 것들을 어느 정도 구체화시켜야 할 시기가 찾아왔습니다. 저는 하나하나 교체가 필요한 그림들을 친구에게 알려주면 그 친구는 일러스트에게 다시 알려주면 방식이었죠. 지금 생각해보니 전달 방식이 썩 좋은 시스템은 아니었던 거 같습니다. 이제까지 많은 게임들을 해본 결과 딱 필요하다고 생각한 것들만을 추가했습니다. 그 이상은 제가 생각하기에 굳이 필요없는 기능들이었습니다. 친구는 게임의 테스터 역할을 수행했습니다. 틈틈히 플레이하면서 저에게 게임의 버그를 알려주었죠. 개발 기간 동안 버그를 고치는 시간이 개발하는 시간보다 더 많았습니다. 하루 종일 버그를 고치느라 다른 콘텐츠를 추가하기가 힘든 날도 있었죠. 하하 이..

1 2 3 4 5