이 섹션은 다음 문제에 관한 정보를 제공합니다.
네트워크 관련 문제가 발생한 경우 Unity 패키지 관리자 진단 툴을 실행할 수도 있습니다. 자세한 내용은 네트워크 문제를 참조하십시오.
패키지 관리자는 문제가 발생하면 Package Manager 창에 오류 표시기를 표시합니다.
시스템 관련 문제
Error messages that appear in the status bar indicate the Package Manager has detected an issue that is not related to a specific package. For example, if the Package Manager cannot access the package registry server, it displays this message in the status bar:
네트워크가 패키지 레지스트리 서버에 도달하지 못하는 경우 네트워크에 연결 문제가 발생했기 때문일 수 있습니다. 여러분 또는 시스템 관리자가 네트워크 오류를 수정하면 상태 표시줄의 내용이 지워집니다.
If your network connection is working, but you are not signed into your Unity account, the Package Manager doesn’t display any Asset Store packages. When you try to use the My Assets scope, the Package Manager displays an error in the status bar:
Click the Sign in button inside the list view to sign into your Unity account through the Unity Hub.
패키지별 문제
If a specific package has a problem when loading or installing (for example, when determining which package versions to load), the error icon () appears in the package list next to the compromised package (A). To find out what the problem is, open the compromised package’s details view to see the detailed error message (B):
While building, if there are a lot of errors about Missing Behavior, the UnityLinker might be mistakenly stripping out a component that it thinks is unreferenced. It often does this because the stripping level is too aggressive. For example, if you have a prefab in an AssetBundle that references the SpriteShape component in the 2D SpriteShape package, the object might be missing and might generate compiler warnings.
To fix this, you can either lower the stripping level for the UnityLinker or declare the package’s assemblies inside the link.xml
file in order to preserve them from being stripped:
<linker>
<assembly fullname="Unity.2D.SpriteShape.Runtime" preserve="all"/>
<assembly fullname="Unity.2D.Common.Runtime" preserve="all"/>
</linker>
For more information on stripping levels and the UnityLinker, see Managed code stripping.
package.manifest
파일이 손상되면 다음과 유사한 오류가 Unity 콘솔에 나타납니다.
패키지를 확인하지 못함: [<project-path>/Packages/manifest.json] 파일이 유효한 JSON이 아님:
44:1에서 예기치 못한 토큰 '}'
}
You can use the information contained in the error message to fix the JSON. There are a number of online validators that you can use to try to correct the problem. Once you save the corrected file, Unity reloads the Package Manager window.
As of 2019.3, your manifest.json
file should not contain any references to the com.unity.package-manager-ui package. You can either reset your project’s package configuration or remove the following line from the manifest’s dependencies list:
"com.unity.package-manager-ui": "2.1.1",
If you are still experiencing problems, check to see if your project manifest uses “exclude” as a package version. This is an obsolete value for the dependencies property. If you find any lines like these, remove the entire line. Package Manager only installs packages that are explicitly included as a dependency in your project, so once you remove that entry, Package Manager ignores the package and doesn’t install it.
If the Package Manager still fails to load, follow the procedures under Packages not recognized and Resetting your project’s package configuration.
When you upgrade a project to a newer Unity version, the Package Manager automatically updates incompatible packages to newer compatible versions. However, if your package doesn’t compile, the Package Manager displays error messages in the Console.
이러한 메시지를 해결하려면 오류 메시지를 읽은 후 해결할 수 있는 문제를 수정해야 합니다. 예를 들어 패키지에 다른 패키지나 버전에 대한 종속성이 없는 경우 패키지를 직접 설치할 수 있습니다.
또한 제대로 동작할 때까지 다음과 같은 해결책을 순서대로 시도해 볼 수 있습니다.
Packages
folder under your project.Packages
folder, leaving only the manifest.json
file. Then try to reload the project.Library/PackageCache/com.unity.package-manager-ui@<version>
folder in the failing project with the same folder from the newly created project.레지스트리에서 새 패키지를 설치할 수 없는 경우에는 권한 관련 문제일 수 있습니다.
다음의 캐시 폴더에 대한 전체 권한이 있어야 합니다.
C:\Users\yourname\AppData\Local\Unity\cache
~/Users/Library/Unity/cache
It might be a problem with the network. Check your firewall and proxy settings.
때때로 학교, 관공서 같은 기관이나 네트워크 보호 작업 공간에서는 프록시 서버를 설치하여 네트워크와 인터넷 간 트래픽을 제어하고, Unity 또는 패키지 관리자에서 인식되지 않는 고유한 서버 인증서를 사용하십시오. 자세한 내용은 네트워크 관리자에 문의하시기 바랍니다.
If you see a lot of compilation errors, this might indicate that Unity is not recognizing the packages in your existing project. In this case, you might be missing a .NET component.
Windows:
MacOS:
.NET SDK v2.2.101 컴포넌트를 다운로드하여 설치합니다.
Visual Studio의 권장 업데이트를 설치합니다.
Homebrew를 사용하여 mono를 브루잉(brew)하고 설치합니다.
brew update
brew install mono # optional
brew upgrade mono
If necessary, delete the Library/obj/temp
folder under your project and restart Unity.
여전히 문제가 발생하면 컴퓨터를 재부팅합니다.
콘솔이 hostfxr.dll
라이브러리를 찾았지만 Unity가 C:\<path_to_app>\hostfxr.dll
에서 로드하지 못했다고 보고하는 경우 KB2999226 및 KB2533623 패치를 모두 설치한 후 Windows 7 또는 Windows Server 2008 R2에서 이 오류를 수정할 수 있습니다.
If a project has too many package issues, you can reset your project back to the default package configuration for the Editor’s version of Unity. This operation resets all packages in your project. This might not fix the source of the problem, but it can help you figure out what the problem is.
Note: You can’t undo resetting your package configuration, so make sure you back up the manifest.json
file first or make sure your project is under source control. You can also take extra precautions by cloning your project and testing out the operation on the clone before proceeding.
기본 패키지 설정으로 되돌아가려면 Help 메뉴에서 Reset Packages to defaults를 선택하십시오.
최종 변경 사항을 적용하기 전에 다음 단계에 따라 패기지 초기화를 테스트해볼 수도 있습니다.
Clone your project by copy-pasting your project folder and renaming it so that it is easy to find (for example, if your project is called MyProject
then you could use something like clone_MyProject
).
Load your newly cloned project.
도움말 메뉴에서 Reset Packages to defaults를 선택합니다.
Depending on the size of your project, this might take a few minutes.
Check that it successfully reset the packages. If so, you can perform the operation safely on the original project.
SSH 프로토콜을 사용하여 Git URL을 통해 패키지를 설치하는 경우 ssh-agent*가 백그라운드에서 실행되고 PID 환경 변수가 올바르게 설정되었더라도 Git에서 인증 오류를 수신할 수 있습니다.
스크립트가 ssh-agent를 백그라운드에서 성공적으로 시작할 수 있으면 익스포트한 환경 변수는 해당 스크립트를 실행하는 Bash 셸과 해당 시점 이후에 실행되는 자식 프로세스에만 적용됩니다. 이는 스크립트가 부모 프로세스, 관련이 없는 프로세스 또는 이전에 생성된 자식 프로세스의 환경 변수를 변경하지 못하기 때문입니다. 스크립트가 .bashrc
에 있는 경우에도 Bash 셸에서만 실행됩니다.
Unity 아이콘을 더블 클릭하거나 허브를 사용하여 Windows와 macOS 모두에서 Unity 또는 Unity Hub를 시작하는 경우에는 셸에서 실행되지 않으므로 스크립트가 실행되지 않습니다. 즉, Unity 에디터가 이러한 변수들을 설정하지 못하기 때문에 Unity에서 호출된 Git 프로세스도 변수를 설정할 수 없습니다.
이 문제를 해결하려면 다음 중 하나를 수행하십시오.
# env 변수를 네이티브 창에 노출
setx SSH_AGENT_PID "$SSH_AGENT_PID"
setx SSH_AUTH_SOCK "$SSH_AUTH_SOCK"