Unity 4에서 Unity 5로 업그레이드할 때 변경되거나 프로젝트에 영향을 줄 수 있는 기능에 대한 추가 정보
커서 잠금 및 커서 가시성은 이제 서로 독립적입니다.
// Unity 4.x
Screen.lockCursor = true;
// Becomes this in Unity 5.0
Cursor.visible = false;
Cursor.lockState = CursorLockMode.Locked;
게임패드 처리 기능은 Unity 5에서 다시 수정되었습니다.
이제 Unity에서 알려진 모델의 데이터베이스를 통하거나 인터페이스로 탐지되거나 설정된 게임패드용 Steam Big Picture / SteamOS에 의해 설정된 SDL_GAMECONTROLLERCONFIG 환경 변수를 사용하여 게임패드를 “설정”할 수 있습니다.
설정된 게임패드는 일관된 레이아웃을 제공합니다. 왼쪽 스틱은 축 0/1을 사용하고, 오른쪽 스틱은 축 3/4를 사용하며, 게임패드의 면에 있는 버튼은 0–3입니다. 게임패드가 설정되어 있는지 확인하려면 Input.IsJoystickPreconfigured()를 호출해야 합니다.
대부분의 API에서 ‘Metro’ 키워드가 ’WSA’로 교체되었습니다. 예를 들어 BuildTarget.MetroPlayer는 BuildTarget.WSAPlayer, PlayerSettings.Metro는 PlayerSettings.WSA로 바뀌었습니다.
UNITY_METRO, UNITY_METRO_8_0, UNITY_METRO_8_1과 같은 스크립트에서 정의되지만 UNITY_WSA, UNITY_WSA_8_0, UNITY_WSA_8_1이라는 새로운 정의가 있습니다.
UnityEngine.AnimationEvent는 이제 구조체입니다. ’null’과 비교하면 컴파일 오류가 발생합니다.
AddComponent(string)는 변수를 사용하여 호출되면 일반 버전 AddComponent<T>()로 자동으로 업데이트할 수 없습니다. 이러한 경우 API Updater는 APIUpdaterRuntimeServices.AddComponent()에 대한 호출로 호출을 대체합니다. 이 메서드를 사용하면 에디터 모드에서 게임을 테스트할 수 있지만(런타임 시점의 타입을 분석하기 위해 최선을 다하지만) 프로덕션에서는 사용할 수 없습니다. 따라서 이러한 메서드를 호출하는 게임을 빌드하면 오류가 발생합니다. Type.GetType(string)을 지원하는 플랫폼에서는 GetComponent(Type.GetType(typeName))를 해결책으로 사용할 수 있습니다.
AssetBundle.Load, AssetBundle.LoadAsync 및 AssetBundle.LoadAll은 사용이 중단되었습니다. 대신 AssetBundle.LoadAsset, AssetBundle.LoadAssetAsync 및 AssetBundle.LoadAllAssets을 사용해야 합니다. 스크립트 업데이터는 로딩 동작이 조금 변경되어 업데이트할 수 없습니다. 5.0에서 모든 로딩 API는 컴포넌트를 더 이상 로드하지 않습니다. 새로운 로딩 API를 사용하여 게임 오브젝트를 먼저 로드한 후 오브젝트의 컴포넌트를 찾아볼 수 있습니다.
.unityPackages의 내부 패키지 포맷이 변경되었으며, 패키지가 Unity로 임포트하는 방법과 충돌이 해결되는 방법에 대한 일부 동작이 변경되었습니다.
패키지는 이제 소스 에셋 및 에셋의 모든 임포터 설정이 포함된 .meta 텍스트 파일로 구성됩니다.
패키지에는 이제 항상 에셋 임포트가 필요합니다.
임포트된 데이터(예: 텍스처 및 오디오 데이터)가 두 배로 증가하지 않으므로 패키지의 크기가 상당히 감소합니다.
프로젝트에 이미 있지만 다른 GUID가 있는 파일 이름을 가진 패키지는 고유한 파일 이름으로 이러한 파일을 임포트합니다. 이것은 실제로 다른 패키지에서 왔거나 사용자가 작성한 프로젝트의 파일 오버라이드를 방지하기 위해 수행됩니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.