Search Unity

Feedback Make Client request awaitable, or provide callbacks

Discussion in 'Package Manager' started by MagicDesignEmerick, Aug 5, 2019.

  1. MagicDesignEmerick

    MagicDesignEmerick

    Joined:
    Oct 4, 2017
    Posts:
    9
    Hi, I was looking for a way to update all or some packages from scripts. Looks like I'll be able to manage using a combinaison of Client.List and Client.Add (the documentation is not 100% clear on the behaviour for already installed packages btw), but I was surprised to see the lack of easy support for these request.

    Client.List returns a ListRequest, but you can't await it, and the listRequest only has a bool for completion, meaning you have to manually wait for the request to be completed to do whatever you wanted with the result of the request.
    Agreed it's not a huge issue, but it's still confusing and not really practical to use.
     
  2. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    hi @MagicDesignEmerick, thanks for the feedback, it's appreciated. We'll consider those idea for upcoming improvements.