refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -10,18 +10,17 @@ namespace Cryville.Crtr.Browsing {
|
||||
internal static class ExtensionManager {
|
||||
static bool _init;
|
||||
static readonly Dictionary<string, List<ResourceConverter>> _converters
|
||||
= new Dictionary<string, List<ResourceConverter>>();
|
||||
= new();
|
||||
public static ISet<string> GetSupportedFormats() {
|
||||
return new HashSet<string>(_converters.Keys);
|
||||
}
|
||||
public static bool TryGetConverters(string extension, out IEnumerable<ResourceConverter> converters) {
|
||||
List<ResourceConverter> outResult;
|
||||
bool result = _converters.TryGetValue(extension, out outResult);
|
||||
bool result = _converters.TryGetValue(extension, out List<ResourceConverter> outResult);
|
||||
converters = outResult;
|
||||
return result;
|
||||
}
|
||||
static readonly Dictionary<string, string> _localRes
|
||||
= new Dictionary<string, string>();
|
||||
= new();
|
||||
public static IReadOnlyDictionary<string, string> GetLocalResourcePaths() {
|
||||
return _localRes;
|
||||
}
|
||||
@@ -62,8 +61,7 @@ namespace Cryville.Crtr.Browsing {
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
var buf = new byte[stream.Length];
|
||||
stream.Read(buf, 0, buf.Length);
|
||||
var asm = Assembly.Load(buf);
|
||||
if (asm == null) throw new TypeLoadException("Failed to load the module");
|
||||
var asm = Assembly.Load(buf) ?? throw new TypeLoadException("Failed to load the module");
|
||||
asms.Add(asm.GetName().Name);
|
||||
foreach (var type in asm.GetTypes()) {
|
||||
if (typeof(ExtensionInterface).IsAssignableFrom(type)) {
|
||||
|
Reference in New Issue
Block a user