반응형

Unity 6

unity - Assets 상위 폴더 경로 가져오기

Assets 상위 경로를 접근 Application.dataPath 를 사용하여 기본 경로를 가져온다 타겟 디바이스 마다 경로가 다르기 때문에 확인 후 사용 [ https://docs.unity3d.com/ScriptReference/Application-dataPath.html ] 본 글은 상위 폴더에 output 폴더 생성을 위하여 사용 using System.IO; public class GetPath : MonoBehaviour { public string path; void Start() { path = Application.dataPath; string newPath = Path.GetFullPath(Path.Combine(path,@"../")); Debug.Log(newPath); } }

programming/unity 2021.09.08

error - Visual Studio와 Unity 연동 문제 해결

1) 문제 비주얼 스튜디오를 사용 중 유니티 관련 클래스 & 메서드가 인식되지 않는 문제 * Monomonobehaviour가 색이 안바껴요안 바껴요 , * Start() Update() 색이 안 바껴요 등... 2) 경우 1. 비주얼 스튜디오와 유니티를 별도로 설치한 경우 2. Visual Studio Tools for Unity가 안깔린 경우 3. Unity External Tools 설정이 안된경우 3) 해결 1. Visual Studio Tools for Unity 깔기 ◆ Visual Studio Installer 실행 ◆ 자세히 - 수정 - 게임 - Unity를 사용한 게임 개발 체크 - 수정 ( 우측 하단 ) 2. Unity External Tools 설정 ◆ Unity 실행 - Edit -..

programming/unity 2021.01.05

[unityLearn] 2D Roguelike 3 of 14 : Tile Prefabs 튜토리얼

원본 동영상 이번장에서는 프로젝트에서 사용될 기보적인 타일 프리 팹을 만들게 됩니다. 순서에 맞춰 설정을 해주시고 각 컴포넌트들의 속성을 잘 확인해주세요. 3. Creating the Tile Prefab 타일 프리팹 만들기 빈 오브젝트 생성 Floor1으로 이름변경 Sprite Renderer 컴포넌트를 추가 Sprite Renderer의 Sprite를 Scavenger_SpriteSheet_32 (Floor Sprite) 설정 (1) Sprite 칸을 더블클릭 (2) 오른쪽의 동그라미를 클릭 Sprite Renderer의 Sorting Layer를 Floor로 설정 Floor1 오브젝트를 Project 창에 드래그 앤 드롭으로 프리팹 생성 Sprite Renderer의 Sprite를 Scavenger..

[unityLearn] 2D Roguelike 2 of 14 : Animation 튜토리얼 ( 2 / 2 )

원본 동영상 3:30 ~ Player 설정하기 Player 오브젝트의 Inspector의 오브젝트 속성 중 Tag를 Player로 변경 Layer을 Blocking Layer로 변경 #Tip 영상에서는 Food ~ Soda까지는 튜토리얼에서 미리 tag를 추가 해 놓은 상태이며, Tag – Add Tag… 로 추가가 가능하다 #Tip 프로젝트에 Food, Exit, Enemy, Soda 태그가 없다면 추가해 준다 Player 오브젝트가 가지고 있는 Sprite Renderer의 Sorting Layer를 Units로 변경 #Tip Tag, Layer, Sorting Layer 태그(Tag)는 오브젝트를 식별하는데 사용되는 값이다 쉽게 별명 정도로 생각하면 좋다 레이어(Layer)는 오브젝트들의 그룹 또는..

[unityLearn] 2D Roguelike 2 of 14 : Animation 튜토리얼 ( 1 / 2 )

원본 동영상 2.Player and Enemy Animations 플레이어 오브젝트 만들기 빈 오브젝트 생성 (두 방법 중 하나를 선택) (1) Menu - GameObject – Create Empty (2) Inspector – 우클릭 – Create Empty 빈 오브젝트의 이름은 Player로 변경 (1) 오브젝트 클릭 - 우클릭 – Rename (2) 오브젝트 클릭 – F2 Player Animation 만들기 Sprites 폴더에 준비되어 있는 sprite sheet 열기 #Tip 일반적으로는 한 장의 이미지로 인식하지만 튜토리얼에서는 이미 slice 되어 있는 이미지가 준비되어 있습니다. #Tip 이미지를 셋팅 하는 방법은 Sptite클릭 후 Inspector에서 Sprite Mode – M..

[unityLearn] 2D Roguelike 1 of 14 : Project Introduction 튜토리얼

이번 튜토리얼은 유니티에서 공식으로 제공하는 2D 로그 라이크 게임입니다. 필요 에셋은 아래의 링크에서 찾아보실 수 있습니다. 2D Roguelike - Unity Learn Learn how to make a 2D Roguelike game with this project. Over the course of the project you will create procedural tile-based levels, implement turn-based movement, add a hunger system, and finally add audio and mobile touch controls. This video series was learn.unity.com

반응형