Skip to content

Automatically create a unity package using github action

Notifications You must be signed in to change notification settings

pokeum/unity-packaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Packaging

Apply automation to your project

Environment

  • Local

    OS - macOS Generic badge

  • Dockerised Unity Editor

    Use Docker

Unity license

Get Unity licenses for Personal plan.

Procedure

  1. Create a license request file ( .alf ) from the command line.

    /Applications/Unity/Hub/Editor/2022.1.12f1/Unity.app/Contents/MacOS/Unity \
    -nographics \
    -batchmode \
    -createManualActivationFile \
    -logfile
    result
    Unity Editor version:    2022.1.12f1 (916d9c03b898)
    Branch:                  2022.1/staging
    Build type:              Release
    Batch mode:              YES
    macOS version:           Version 14.2.1 (Build 23C71)
    Darwin version:          23.2.0
    Architecture:            arm64
    Running under Rosetta:   NO
    Available memory:        8192 MB
    [LicensingClient] Error: Code 10 while verifying Licensing Client signature (process Id: 854, path: "/Applications/Unity Hub.app/Contents/Frameworks/UnityLicensingClient_V1.app/Contents/MacOS/Unity.Licensing.Client")
    [Licensing::Module]  Error: LicensingClient has failed validation; ignoring
    [LicensingClient] Handshaking with LicensingClient:
        version: 1.15.0+66d4389
        Session Id: 9342ce6809954a45a76f80bc08e4135f
        Machine Id: 1tHzQC2UBVo6fy+/N3i02Etdd74=
    [Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-pokeum" (connect: 0.00s, validation: 0.02s, handshake: 0.30s)
    Entitlement-based licensing initiated
    [Licensing::Module]  Error: Access token is unavailable; failed to update
    [LicensingClient] Error: Code 200 while updating license in client (status: Licenses updated.)
    [Licensing::Module] Generating manual activation license file: /Users/pokeum/Unity_v2022.1.12f1.alf
    [LicensingClient] Successfully processed ALF generation request: /Users/pokeum/Unity_v2022.1.12f1.alf
    [Licensing::Module] Manual activation license file successfully saved.
    
  2. Use that .alf file to generate a Unity license file ( .ulf ) from Unity.

    Generate a Unity license file

  3. Use that .ulf file to activate your license from the command line.

    /Applications/Unity/Hub/Editor/2022.1.12f1/Unity.app/Contents/MacOS/Unity \
    -nographics \
    -batchmode \
    -manualLicenseFile "/Users/pokeum/Downloads/Unity_v2022.x.ulf" \
    -logfile

Unity packaging

Use the Unity Editor command line arguments to package unity assets from the command line.

/Applications/Unity/Hub/Editor/2022.1.12f1/Unity.app/Contents/MacOS/Unity \
-batchmode \
-quit \
-nographics \
-logfile \
-projectPath "/Users/pokeum/Git/pokeum/unity-packaging/myproject" \
-exportPackage "Assets/MyPackage/Include" "Assets/Scenes/IncludeScene.unity" \
"mypackage-0.0.0.unitypackage"

Note

Export package location
: /Users/pokeum/Git/pokeum/unity-packaging/myproject/mypackage-0.0.0.unitypackage
(relative to the Unity project root)

About

Automatically create a unity package using github action

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages