예제 #1
0
        private static bool WaitForRequestBase(PackageManager.Requests.Request request, string msg, int loopDelay)
        {
            var progress = 0.0f;

            while (!request.IsCompleted)
            {
                Thread.Sleep(loopDelay);
                EditorUtility.DisplayProgressBar("Unity Package Manager", msg, Mathf.Min(1.0f, progress++ / 100f));
            }
            EditorUtility.ClearProgressBar();

            return(request.Status == PackageManager.StatusCode.Success);
        }
예제 #2
0
 private static bool WaitForRequest <T>(PackageManager.Requests.Request <T> request, string msg, int loopDelay = 20)
 {
     return(WaitForRequestBase(request, msg, loopDelay) && request.Result != null);
 }