mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal static class HandleFactory
|
||||
{
|
||||
private static readonly Dictionary<Type, Func<ProviderOperation, HandleBase>> _handleFactory = new Dictionary<Type, Func<ProviderOperation, HandleBase>>()
|
||||
{
|
||||
{ typeof(AssetHandle), op => new AssetHandle(op) },
|
||||
{ typeof(SceneHandle), op => new SceneHandle(op) },
|
||||
{ typeof(SubAssetsHandle), op => new SubAssetsHandle(op) },
|
||||
{ typeof(AllAssetsHandle), op => new AllAssetsHandle(op) },
|
||||
{ typeof(RawFileHandle), op => new RawFileHandle(op) }
|
||||
};
|
||||
|
||||
public static HandleBase CreateHandle(ProviderOperation operation, Type type)
|
||||
{
|
||||
if (_handleFactory.TryGetValue(type, out var factory) == false)
|
||||
{
|
||||
throw new NotImplementedException($"Handle type {type.FullName} is not supported.");
|
||||
}
|
||||
return factory(operation);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d6ef91e069948c48b7ca60be4c218ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user