Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Resolved Code Coverage Package Version Verified not available

Discussion in 'Package Manager' started by Oribaru, Apr 14, 2022.

  1. Oribaru

    Oribaru

    Joined:
    Feb 23, 2019
    Posts:
    9
    Dear Community/Unity,

    I am using Unity 2020.3.28f1 with the Code Coverage version 1.1.1 to create a editor window package. I am checking the Code Coverage package version using the following code:

    Code (CSharp):
    1. private readonly List<PackageInfo> _packages;
    2.  
    3. public bool IsUpToDate(string packageName)
    4. {
    5.     if (!_listRequest.IsCompleted) WaitForInitialisation();
    6.     return _packages.Where(packageInfo => packageInfo.name.Equals(packageName)).Select(packageInfo => packageInfo.versions.verified.Equals(GetVersionFromPackageId(packageInfo.packageId))).FirstOrDefault();
    7. }
    8.  
    I expect this code to return the currently verified version - in my case Version 1.1.1. But somehow it returns an empty string.

    I see the version 1.1.1 when I Debug with:
     versions.all 


    Is this a bug in Unity/Package declaration or is it my fault?

    Many thanks for your help!!
    Oribaru
     
  2. Unity-Nikos

    Unity-Nikos

    Unity Technologies

    Joined:
    Sep 30, 2015
    Posts:
    70
  3. Oribaru

    Oribaru

    Joined:
    Feb 23, 2019
    Posts:
    9
    Hi Nikos,

    thanks for clarifying!

    Cheerio, Ori
     
unityunity