小编wea*_*ver的帖子

无法解决冲突(应用程序正在锁定文件)

我试图从另一个分支拉入我的分支,但出现合并错误。当我尝试解决它们时,我从 SourceTree 收到此错误:“无法更新一个或多个文件,请检查是否没有其他应用程序锁定您的文件”。但我确定没有其他应用程序使用我的文件,知道如何修复吗?

git conflict atlassian-sourcetree

5
推荐指数
1
解决办法
5379
查看次数

Activator.CreateInstance 返回 null

我有这么一小段代码:

public static I CreateInstance<I>(string myClassName) where I : class
{
    Debug.Log("Instance: " + (Activator.CreateInstance(null, myClassName) as I));
    return Activator.CreateInstance(null, myClassName) as I;
}

void Test(string testName)
{
    testName = "TestProvider";
    var data = CreateInstance<IProviderInitializer>(testName).GetProviderInfo();
    Debug.Log("Data: " + data);
}
Run Code Online (Sandbox Code Playgroud)

问题是我得到了 NULL Reference Exception,但我不知道为什么。

c# reflection unity-game-engine

0
推荐指数
1
解决办法
5863
查看次数