Looking at the Stars.(简称叫我853!

ssh -T git@github.com

使用以上命令时如出现“ssh: connect to host gitub.com port 22: Connection refused”或其它错误,打开“C:\Users\你的用户名\.ssh\config”文件(如果没有则新建一个)输入以下内容

Host *
ProxyCommand "C:/你的git位置/mingw64/bin/connect.exe" -S 127.0.0.1:1080 %h %p

此处的 Host * 可用 Host github.com 代替。最后再执行以下命令测试:

ssh -T git@github.com

我不配写内容,咕了。

public static async Task ImportPackageAsync(string packagePath)
{
    TaskCompletionSource<object> taskCompletionSource = new TaskCompletionSource<object>();
    try
    {
        AssetDatabase.importPackageCancelled += OnImportPackageCancelled;
        AssetDatabase.importPackageCompleted += OnImportPackageCompleted;
        AssetDatabase.importPackageFailed += OnImportPackageFailed;
        AssetDatabase.ImportPackage(packagePath, false);

        await taskCompletionSource.Task;
    }
    catch (System.Exception exception)
    {
        Debug.LogException(exception);
    }
    finally
    {
        AssetDatabase.importPackageCancelled -= OnImportPackageCancelled;
        AssetDatabase.importPackageCompleted -= OnImportPackageCompleted;
        AssetDatabase.importPackageFailed -= OnImportPackageFailed;
    }

    void OnImportPackageCancelled(string packageName)
    {
        taskCompletionSource.SetCanceled();
    }

    void OnImportPackageCompleted(string packageName)
    {
        taskCompletionSource.SetResult(null);
    }

    void OnImportPackageFailed(string packageName, string errorMessage)
    {
        taskCompletionSource.SetException(new System.Exception(errorMessage));
    }
}

代码参考至 Github:YLahin/TequilaLegacy/YL.Wrench.Unity.Editor/UnityPackageImporter.cs

如果想要过上平平淡淡的日子,就不要给予梦想。
一旦有了梦想,就会以拼劲全力地突破平淡向梦想推进。
回忆自己以往的过去,面对当前,期望未来。