Version: 2023.2
언어: 한국어
Diagnose network issues
패키지 명명

커스텀 패키지 생성

Unity 패키지 관리자는 Unity의 공식 패키지 관리 시스템으로 다음과 같은 기능을 수행합니다.

  • Unity가 빠르고 간편하게 새로운 기능을 배포하고 기존 기능을 업데이트하도록 해줍니다.
  • 사용자들이 재사용 가능한 컴포넌트를 발견하고 공유할 수 있는 플랫폼을 제공합니다.
  • Unity를 확장 가능한 개방형 플랫폼으로 홍보합니다.

You can use the Package Manager to define project dependencies, resolve package dependencies, download packages, add packages, and integrate content in your projects.

패키지 소개와 Unity 패키지 관리자의 작동 방식에 대한 일반적인 내용은 패키지 문서를 참조하십시오.

개요

패키지는 다음을 포함할 수 있습니다.

  • C# 스크립트
  • 어셈블리
  • Native plug-ins
  • 모델, 텍스처, 애니메이션 및 오디오 클립, 기타 에셋.

참고: 패키지 관리자는 패키지의 스트리밍 에셋을 지원하지 않습니다. 대신 어드레서블 패키지를 사용하십시오.

또한 각 패키지는 패키지 이름, 패키지 버전, 종속성 리스트, 저장소 URL 등과 같은 정보가 들어 있는 패키지 매니페스트 파일을 포함합니다.

Procedure

새 패키지를 만들려면 다음 단계를 따르십시오.

  1. 다음 방법 중 하나를 사용하여 패키지를 위한 빈 셸을 만듭니다.

  2. Make sure the layout of your folder structure follows the package layout convention for Unity packages. For example, if you have Editor and Runtime libraries, make sure you store them under the Editor and Runtime folders.

  3. If your package includes code, make sure the package layout you created has the necessary assembly definition files. For information about creating and defining assembly definition files, see Assembly definition and packages. For additional information, see Assembly definitions.

    Note: If the console window reports a warning after adding an assembly definition file, save your project, close it, then reopen it.

  4. Add your tools, libraries, and any assets your package requires.

  5. Add tests to your package. Tests are essential for ensuring that the package works as expected in different scenarios:

    • 모든 에디터 테스트를 Tests/Editor에 작성합니다.
    • Write all your Play Mode Tests in Tests/Runtime.
  6. If you have samples for your package, add them to the proper samples subfolder.

    참고: 패키지는 샘플만 포함할 수 있지만 동일한 레이아웃과 JSON 구조를 사용한 툴 또는 템플릿 패키지의 일부로 샘플을 포함할 수도 있습니다.

  7. You can update the CHANGELOG.md file every time you publish a new version. Every new feature or bug fix should have a trace in this file. For more details on the chosen changelog format, see the Keep a Changelog documentation.

    This step is optional for packages that you don’t share, but strongly recommended for shared packages, so that users know which version best suits their needs.

    Tip: You can provide a link to an external web page where you host this package’s changelog by setting the changelogUrl property in your package’s package.json manifest file.

  8. You can include licenses and third-party notices in the LICENSE.md and THIRD PARTY NOTICES.md files.

    This step is optional for packages that you don’t share, but strongly recommended for shared packages, so that your users don’t misuse your packages or violate any third-party licenses.

    Tip: You can provide a link to an external web page where you host this package’s licensing and third-party notices by setting the licensesUrl property in your package’s package.json manifest file.

  9. Document your package.

    Tip: You can provide a link to an external web page where you host this package’s documentation by setting the documentationUrl property in your package’s package.json manifest file.

  10. Share your package.

내장된 패키지 새로 만들기

프로젝트 폴더 내부에 커스텀 패키지를 만들려면 다음 단계를 따르십시오.

Note: These instructions are part of the larger procedure for Creating custom packages.

  1. Unity Hub를 열고 컴퓨터에 빈 프로젝트를 생성합니다.

    컴퓨터의 기존 프로젝트를 사용하거나, 프로젝트 아래에 패키지를 포함하거나, 로컬 폴더에서 패키지를 설치할 수 있습니다. 하지만 새로운 프로젝트로 시작하면 패키지 콘텐츠의 오류를 줄일 수 있습니다.

  2. Using your computer’s file manager (for example the Windows File Explorer or the macOS Finder), navigate to your project folder and locate the Packages subdirectory.

  3. Create a new subdirectory for your package inside the Packages folder using a name that matches the package name and follows the naming conventions. For example, if your package name is com.example.mypackage, create a subdirectory called com.example.mypackage.

    Note: This is particularly important if your package contains assets, because the AssetDatabase looks for an asset path that matches Packages/<your-package-name>/Assets, regardless of the actual folder name.

  4. Open your preferred text editor and create a JSON file called package.json in the root of the package folder.

  5. Fill out all required and recommended fields in the package.json file. You can use the package manifest example as a reference.

When you reopen Unity, the new package appears in the Package Manager window and in the Project window, where you can view and modify the package contents. If you select the package.json file in the Project window, you can also modify its JSON values directly in the Inspector window.

Return to the main procedure to complete the creation of your package.

새로운 로컬 패키지 만들기

Follow these instructions if you want to create a custom package outside your project folder.

Note: These instructions are part of the larger procedure for Creating custom packages.

  1. 컴퓨터의 파일 관리자(예: Windows File Explorer 또는 macOS Finder)를 사용하여 패키지를 위한 폴더를 만듭니다.

    패키지의 일부 콘텐츠를 이미 만든 경우에는 기존 위치를 사용할 수도 있습니다.

  2. Open your preferred text editor and create a JSON file called package.json in the root of the package folder.

  3. Fill out all required and recommended fields in the package.json file, making sure the name property follows the naming conventions. You can use the package manifest example as a reference.

  4. In Unity, create a new project or open an existing project.

  5. Open the Package Manager window and follow the instructions for installing a local package, using the package.json file you just created.

The new package appears in the Package Manager window and in the Project window, where you can view and modify the package contents. If you select the package.json file in the Project window, you can also modify its JSON values directly in the Inspector window.

Return to the main procedure to complete the creation of your package.

Diagnose network issues
패키지 명명
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961