참고: 이 섹션의 지침을 릴리스 순서대로 따르십시오. 예를 들어 프로젝트를 2018에서 2021로 업그레이드해야 하는 경우 2019 업그레이드 가이드를 읽고 변경해야 할 사항이 있는지 확인한 후 2021 업그레이드 가이드를 읽으십시오.
이 페이지에는 2020 LTS에서 2021.1로 업그레이드할 때 기존 프로젝트에 영향을 줄 수 있는 Unity 2021.1 버전의 변경 사항이 나열됩니다.
이제 기기 시뮬레이터가 에디터에 포함되며, 게임 창에서 액세스할 수 있습니다.
기기 시뮬레이터를 설정하려면 UnityEngine.Device
네임스페이스를 다음의 Screen, Application 및 SystemInfo 클래스에 추가하십시오.
UnityEngine.Device.Screen;
UnityEngine.Device.Application;
UnityEngine.Device.SystemInfo;
UnityEngine.Device
로 전환하려면 시뮬레이터에서 사용하려는 각 스크립트에 다음 로직을 추가해야 합니다.
using Screen = UnityEngine.Device.Screen;
using Application = UnityEngine.Device.Application;
using SystemInfo = UnityEngine.Device.SystemInfo;
새로운 네임스페이스 UnityEngine.Device
가 시뮬레이터(에디터에 있는 경우)에서 런타임 빌드를 통해 실제 기기 API로 원활하게 전환됩니다.
이제 에디터가 기본 스카이박스 프로브 및 주변광 프로브를 자동으로 베이크하고, 씬을 수동으로 베이크하기 전까지 해당 데이터를 유지합니다. 업그레이드 시 주변광 기여가 없는 씬이 시각적으로 변경될 수 있습니다. 이러한 씬을 원래 모습으로 복원하려면 환경 조명 강도 멀티플라이어를 0으로 설정하십시오. 또는 스카이박스를 검은색으로 설정하고, 씬을 베이크한 후 스카이박스를 원하는 하늘 컬러로 초기화할 수도 있습니다.
코드 커버리지 관리를 위한 사용자 인터페이스가 일반 환경 설정에서 코드 커버리지 패키지 안으로 이동되었습니다.
코드 커버리지 패키지는 Unity 2019.3 이상용 패키지 관리자를 통해 릴리스된 패키지로 제공됩니다. 최신 버전은 1.0.0입니다.
다음 방법 중 하나를 사용하여 코드 커버리지를 활성화할 수 있습니다.
-enableCodeCoverage
를 사용합니다.Coverage.enabled
API를 사용합니다. 다음은 예제 클래스입니다.// Create a new C# script called CodeCoverageMenuItem and place it
// under the Editor folder.
// This class creates a toggle menu item under Code Coverage > Enable
// Code Coverage. Use it to enable/disable Code Coverage.
using UnityEditor;
using UnityEngine.TestTools;
class CodeCoverageMenuItem
{
const string EnableCodeCoverageItemName = "Code Coverage/Enable Code Coverage";
[MenuItem(EnableCodeCoverageItemName, false)]
static void EnableCodeCoverage()
{
Coverage.enabled = !Coverage.enabled;
}
[MenuItem(EnableCodeCoverageItemName, true)]
static bool EnableCodeCoverageValidate()
{
Menu.SetChecked(EnableCodeCoverageItemName, Coverage.enabled);
return true;
}
}
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.