Client/Unity 11

Unity Protobuf 설치

21.3버전을 사용했다.  1. 컴파일러 다운로드https://github.com/protocolbuffers/protobuf/releases?q=visual+studio&expanded=true Releases · protocolbuffers/protobufProtocol Buffers - Google's data interchange format - protocolbuffers/protobufgithub.com 2. 라이브러리 다운로드dll파일 4개 다운로드한다.https://www.nuget.org/packages/Google.Protobuf/3.21.3#supportedframeworks-body-tabhttps://www.nuget.org/packages/System.Memory/#support..

Client/Unity 2024.09.01

Unity) CharacterController에서 transform.position이 작동하지 않을 때

캐릭터의 순간이동(포탈이동)이 되지 않는 문제.# 캐릭터컨트롤러는 계속해서 position을 정의하기 때문에(?) 임의로 위치변경을 할 수 없다. 해결방법)비활성화했다가 이동하고 풀어주기interactorTransform.GetComponent().enabled = false;interactorTransform.position = destination.position;interactorTransform.GetComponent().enabled = true; 참고) Resolved - transform.position does not workI've been trying to make my own save and load features for my game. I got everything working ..

Client/Unity 2024.05.10

Unity) 3인칭 캐릭터 - 카메라

셋팅)FollowCamera와 Camera는 캐릭터의 가슴높이 정도로 위치를 조정한다. 스크립트)using System;using System.Collections;using System.Collections.Generic;using UnityEngine;public class CameraMovement : MonoBehaviour{ public Transform objectToFollow; // 따라갈 카메라 public float followSpeed = 10f; // 카메라 속도 public float sensitivity = 100f; // 마우스 감도 public float clampAngle = 70f; // 상하 각도 제한 public float smoothness..

Client/Unity 2024.05.02

Unity) Third Person Camera

무료에셋) StarterAssets - FirstPerson | Updates in new CharacterController package | Unity 필수에셋 | Unity Asset StoreGet the StarterAssets - FirstPerson | Updates in new CharacterController package package from Unity Technologies and speed up your game development process. Find this & other Unity 필수에셋 options on the Unity Asset Store.assetstore.unity.com 1. 플레이어 생성 및 컴포넌트 추가.플레이어 종속으로 카메라용 빈 오브젝트 생성 2..

Client/Unity 2024.04.28

Unity) 3D - 캐릭터 이동

이동거리 계산)캐릭터가 이동한 위치는 (방향 * 거리)이다.다시 풀어쓰면, 방향 * 속력 * 시간이다.코드로 풀어보면, nomalized Vector * speed * Time.deltaTime이다. 오브젝트 설정)Character Controller는 Collider를 갖고 있기 때문에 따로 Collider가 필요하지 않다. Slope Limit: 올라갈 수 있는 경사의 한계 각도Step Offset: 오를 수 있는 최대 높이 (계단의 경우 인접한 계단의 높이)Center: 캡슐 충돌 범위의 중심점Radius: 캡슐 충돌 범위의 반지름Hight: 캡슐 충돌 범위의 높이 이미지 변경)3D 캡슐 플레이어의 경우, 이미지 변경을 위해서는 Material을 생성하고 이미지나 색상 변경을 한 후 해당 Mater..

Client/Unity 2024.04.26