Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetAllRegisteredPackages()

Retrieves information about all packages that are currently loaded.
Read time 1 minuteLast updated 10 days ago

Definition

public static PackageInfo[] GetAllRegisteredPackages()

Returns

Type

Description

PackageInfo[]The array of PackageInfo instances describing each package.

Remarks

  • The results include all packages in the current project, regardless of the package source.
  • This method returns cached information, which might not reflect recent changes.
  • This method is more efficient than Client.List for quick package checks.
using UnityEngine;using UnityEditor.PackageManager;[ExecuteInEditMode]public class PackageManagerRegisteredExample : MonoBehaviour{ void Start() { Debug.Log("GetAllRegisteredPackages example..."); ListRegisteredPackages(); } void ListRegisteredPackages() { PackageInfo[] packages = PackageInfo.GetAllRegisteredPackages(); Debug.Log($"Found {packages.Length} registered packages:"); foreach (var package in packages) { Debug.Log($"- {package.name}" + $"\n Version: {package.version}" + $"\n Source: {package.source}"); } }}
Related information