Unity&C# 28

[Unity] Frame

Application.TargetFrameRate와 FixedUpdate의 차이Application.targetFrameRateUnity 어플리케이션이 초당 실행하려는 프레임 수를 제어하는 속성Application.targetFrameRate=60;// 60fps로 제한프레임 속도를 최적화 할 수 있음FixedUpdate기기의 성능에 관계 없이 일정한 시간간격으로 호출되는 메소드물리 연산에 사용하기 적합함.void FixedUpdate(){ transform.position += vector3.up*speed;}고정된 시간간격(기본 50Hz)으로 호출 됨그래서 둘이 무슨 차이?Application.targetFrameRate로 60fps를 고정하면 UI반응이나 그래픽 업데이트까지 60fps로 고정..

Unity&C#/Unity 2024.10.14

data path

읽기 전용 데이터 경로 string assetsPath = Application.dataPath; 런타임 시에는 외부 파일이나 저장소 경로에 접근할 때 Application.persistentDataPath를 사용하는 것이 일반적 string dataPath = Application.persistentDataPath; 외부 파일(예: 사용자의 문서 폴더에 있는 파일)의 경로를 얻을 때는 System.Environment string documentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); string filePath = Path.Combine(documentsPath, "MyFile.txt"..

Unity&C#/Unity 2023.09.25

[에러] Package Manager 외부 패키지 등록이 안돼요.

[Package Manager Window] Cannot perform upm operation: Unable to add package [repository.name.git]: [repository.name.git#urp] does not point to a valid package. No package manifest was found. [NotFound]. UnityEditor.EditorApplication:Internal_CallUpdateFunctions () 분명 여기 +를 누르고 ~ git ~을 누르고 나오는 창에 ~.git을 입력하면 패키지가 설치가 되어야하는데 안된다. 이럴땐 Project 폴더에 Packages -> Manifest.json을 수정해서 넣어주면 된다. scopedReg..

Unity&C# 2023.05.02