浏览代码

Cached the result of GetAllAssemblyTypes per domain reload

/main
Thomas Hourdel 7 年前
当前提交
ddda2ecb
共有 1 个文件被更改,包括 19 次插入12 次删除
  1. 31
      ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs

31
ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs


using System;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.Rendering;

}
}
static IEnumerable<Type> m_AssemblyTypes;
return AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(t =>
{
// Ugly hack to handle mis-versioned dlls
var innerTypes = new Type[0];
try
if (m_AssemblyTypes == null)
{
m_AssemblyTypes = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(t =>
innerTypes = t.GetTypes();
}
catch { }
return innerTypes;
});
// Ugly hack to handle mis-versioned dlls
var innerTypes = new Type[0];
try
{
innerTypes = t.GetTypes();
}
catch { }
return innerTypes;
});
}
return m_AssemblyTypes;
}
public static void Destroy(params UnityObject[] objs)

正在加载...
取消
保存