Version: 2021.3
패키지용 샘플 생성
버전 지정

패키지 매니페스트

Unity uses a package manifest file (package.json) to manage information about a specific version of a specific package. The package manifest is always at the root of the package and contains crucial information about the package, such as its registered name and version number. It also defines useful information to communicate to the user, such as a user-friendly name that appears in the UI, a brief description of the package, and the earliest version of Unity the package is compatible with.

패키지 매니페스트는 JSON(JavaScript Object Notation) 구문을 사용하여 패키지 콘텐츠를 설명합니다. 파일의 포맷은 npmpackage.json 포맷과 유사하지만, 일부 프로퍼티에 대해 다른 시맨틱을 사용합니다.

The Package Manager reads this manifest to find out what the package contains, how to unpack its contents, and what information to display the user in the Package Manager window. The manifest stores this information in a series of required, recommended, and optional properties.

필수 프로퍼티

If these properties aren’t present, either the registry refuses the package when it’s published, or the Package Manager can’t fetch or load the package.

프로퍼티 JSON 타입 설명
name String The officially registered package name. This name must conform to the Unity Package Manager naming convention, which uses reverse domain name notation. For more information about the naming convention, see Naming your package.

Note: This is a unique identifier, not the user-friendly name that appears in the list view in the Package Manager window.
version 문자열 패키지 버전 숫자입니다(MAJOR.MINOR.PATCH).

예를 들어 “3.2.1”은 3번째 메이저 릴리스, 2번째 마이너 릴리스, 첫 번째 패치를 나타냅니다.

이 값은 시맨틱 버전 지정을 준수해야 합니다. 자세한 내용은 버전 지정을 참조하십시오.

Recommended properties

The Package Manager can install packages in a project even if the recommended properties don’t have valid values or are missing.

However, you should assign values for these properties to ensure that your package is discoverable and to provide a better experience for users.

프로퍼티 JSON 타입 설명
description String A brief description of the package. This is the text that appears in the details view of the Package Manager window. This field supports UTF–8 character codes. This means that you can use special formatting character codes, such as line breaks (\n) and bullets (\u25AA).
displayName String Unity 에디터에 표시되는 사용자 친화적 이름입니다(예: 프로젝트 브라우저의 Package Manager 창 등).

예: Unity Timeline, ProBuilder, In App Purchasing
unity String Indicates the lowest Unity version the package is compatible with. If omitted, the Package Manager considers the package compatible with all Unity versions.

The expected format is “<MAJOR>.<MINOR>” (for example, 2018.3). To point to a specific patch, use the unityRelease property as well.

Note: A package that isn’t compatible with Unity doesn’t appear in the Package Manager window.

옵션 프로퍼티

These properties are optional, meaning that you can omit them. However, if they’re present, they must have a valid value.

프로퍼티 JSON 타입 설명
author 오브젝트 The author of the package.

This object contains one required field, name, and two optional fields, email and url.

For example:
{ "name" : "John Doe",
   "email" : "john.doe@example.com",
   "url" : "http://john.doe.example.com/"
}
changelogUrl String Custom location for this package’s changelog specified as a URL. For example:
"changelogUrl": "https://example.com/changelog.html"

Note: When the Package Manager can’t reach the URL location (for example, if there is a network issue), it does the following:

- If the package is installed, the Package Manager opens a file browser displaying the CHANGELOG.md file in the package cache.
- If the package isn’t installed, the Package Manager displays a warning that an offline changelog isn’t available.
dependencies 오브젝트 A map of package dependencies. Keys are package names, and values are specific versions. They indicate other packages that this package depends on.

Note: The Package Manager doesn’t support range syntax, only SemVer versions.
documentationUrl String Custom location for this package’s documentation specified as a URL. For example:
"documentationUrl": "https://example.com/"

Note: When the Package Manager can’t reach the URL location (for example, if there is a network issue), it does the following:

- If the package is installed, the Package Manager opens a file browser displaying the Documentation~ folder in the package cache.
- If the package isn’t installed, the Package Manager displays a warning that offline documentation isn’t available.
hideInEditor 부울 Package Manager hides most packages automatically (the implicit value is “true”), but you can set this property to “false” to make sure that your package and its assets are always visible.
keywords 문자열 배열 패키지 관리자가 API를 검색할 때 사용하는 키워드 배열입니다. 사용자가 적절한 패키지를 찾는 데 도움이 됩니다.
license String SPDX 식별자 포맷을 사용하는 OSS 라이선스의 식별자, 또는 “LICENSE.md 파일 참조”와 같은 문자열입니다.

참고: 패키지 매니페스트에서 이 프로퍼티를 생략하면 패키지는 LICENSE.md 파일을 포함해야 합니다.
licensesUrl String Custom location for this package’s license information specified as a URL. For example:
"licensesUrl": "https://example.com/licensing.html"

Note: When the Package Manager can’t reach the URL location (for example, if there is a network issue), it does the following:

- If the package is installed, it opens a file browser displaying the LICENSE.md file in the package cache.
- If the package isn’t installed, the Package Manager displays a warning that offline license information isn’t available.
samples 오브젝트 배열 패키지에 포함된 샘플 리스트입니다. 각 샘플에는 표시 이름, 설명 그리고 Samples~ 폴더 자체에서 시작하는 샘플 폴더의 경로가 포함됩니다.

{
   "displayName": "<name-to-appear-in-the-UI>",
   "description": "<brief-description>",
   "path": "Samples~/<sample-subfolder>"
}

자세한 내용은 패키지용 샘플 생성을 참조하십시오.
type String 패키지 관리자에 추가 정보를 제공하는 상수입니다.

내부 사용으로 예약되어 있습니다.
unityRelease String Part of a Unity version indicating the specific release of Unity that the package is compatible with. You can use this property when an updated package requires changes made during the Unity alpha/beta development cycle. This might be the case if the package needs newly introduced APIs, or uses existing APIs that have changed in a non-backward-compatible way without API Updater rules.

The expected format is “<UPDATE><RELEASE>” (for example, 0b4).

Note: If you omit the recommended unity property, this property has no effect.

A package that isn’t compatible with Unity doesn’t appear in the Package Manager window.

패키지 매니페스트 예시

{
  "name": "com.[company-name].[package-name]",
  "version": "1.2.3",
  "displayName": "Package Example",
  "description": "This is an example package",
  "unity": "2019.1",
  "unityRelease": "0b5",
  "documentationUrl": "https://example.com/",
  "changelogUrl": "https://example.com/changelog.html",
  "licensesUrl": "https://example.com/licensing.html",
  "dependencies": {
    "com.[company-name].some-package": "1.0.0",
    "com.[company-name].other-package": "2.0.0"
 },
 "keywords": [
    "keyword1",
    "keyword2",
    "keyword3"
  ],
  "author": {
    "name": "Unity",
    "email": "unity@example.com",
    "url": "https://www.unity3d.com"
  }
}


패키지용 샘플 생성
버전 지정