文档

Unity Engine


User Manual

Script Reference

Unity Engine


Sign a UPM package using the scripting API

Pack and sign a package using the Client.Pack method in a C# script.
阅读时间1 分钟最后更新于 23 天前

Pack and sign your Unity Package Manager (UPM) package so it’s ready for distribution and compatible with Unity’s package signature ecosystem.
If you use the scripting API to process packages, you can use the
Client.Pack
method to create a signed package. For other methods, refer to Methods for signing packages.
One of
Client.Pack
method's parameters is the ID of the organization that owns the package.
Follow these steps to get the organization ID and call the
Client.Pack
method:
  1. Go to the Unity Cloud Dashboard and select the organization you want to use for signing. For information about selecting or switching organizations, refer to Switch organization.
    注意
    For large projects whose contributors span multiple organizations, be sure to select the wider organization (or company-wide organization). If that organization doesn't exist yet, refer to Considerations for companies with multiple organizations.
  2. Copy the Organization ID value. Refer to Identify the organization ID.
  1. Make sure you’re signed in to the Unity Editor as a member of the organization from the previous step.
  2. Call the Client.Pack method and include the organization ID that you copied in a previous step.

Additional resources