更新YooAsset HybridCLR

This commit is contained in:
2025-10-25 17:23:15 +08:00
parent 30d0d40a52
commit d4f18c8787
139 changed files with 685 additions and 3149 deletions

View File

@@ -1,6 +1,6 @@
{ {
"ShaderTotalCount": 19, "ShaderTotalCount": 20,
"VariantTotalCount": 40, "VariantTotalCount": 42,
"ShaderVariantInfos": [ "ShaderVariantInfos": [
{ {
"AssetPath": "Assets/Res/Main/Shader/SimpleURPToonLitOutlineExample.shader", "AssetPath": "Assets/Res/Main/Shader/SimpleURPToonLitOutlineExample.shader",
@@ -12,20 +12,17 @@
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION", "_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION"
"_SHADOWS_SOFT",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
"PassType": 0, "PassType": 0,
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS"
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -39,20 +36,17 @@
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION", "_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION"
"_SHADOWS_SOFT",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
"PassType": 13, "PassType": 13,
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS"
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -63,10 +57,23 @@
} }
] ]
}, },
{
"AssetPath": "Packages/com.unity.render-pipelines.core/Runtime/RenderPipelineResources/FallbackShader.shader",
"ShaderName": "Hidden/Core/FallbackError",
"ShaderVariantCount": 1,
"ShaderVariantElements": [
{
"PassType": 0,
"Keywords": [
""
]
}
]
},
{ {
"AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Lit.shader", "AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Lit.shader",
"ShaderName": "Universal Render Pipeline/Lit", "ShaderName": "Universal Render Pipeline/Lit",
"ShaderVariantCount": 11, "ShaderVariantCount": 12,
"ShaderVariantElements": [ "ShaderVariantElements": [
{ {
"PassType": 13, "PassType": 13,
@@ -79,12 +86,10 @@
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION", "_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION"
"_SHADOWS_SOFT",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -93,12 +98,10 @@
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_DETAIL_MULX2", "_DETAIL_MULX2",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION", "_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION"
"_SHADOWS_SOFT",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -107,12 +110,10 @@
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_EMISSION", "_EMISSION",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION", "_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION"
"_SHADOWS_SOFT",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -121,22 +122,32 @@
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_ENVIRONMENTREFLECTIONS_OFF", "_ENVIRONMENTREFLECTIONS_OFF",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION",
"_SPECULARHIGHLIGHTS_OFF"
]
},
{
"PassType": 13,
"Keywords": [
"_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS",
"_ENVIRONMENTREFLECTIONS_OFF",
"_MAIN_LIGHT_SHADOWS",
"_NORMALMAP", "_NORMALMAP",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_REFLECTION_PROBE_BOX_PROJECTION", "_REFLECTION_PROBE_BOX_PROJECTION",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION",
"_SHADOWS_SOFT", "_SPECULARHIGHLIGHTS_OFF"
"_SPECULARHIGHLIGHTS_OFF",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
"PassType": 13, "PassType": 13,
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS"
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -144,17 +155,15 @@
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_DETAIL_MULX2", "_DETAIL_MULX2",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS"
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
"PassType": 13, "PassType": 13,
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_NORMALMAP", "_NORMALMAP"
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
@@ -214,21 +223,18 @@
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHT_SHADOWS", "_ADDITIONAL_LIGHT_SHADOWS",
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_REFLECTION_PROBE_BLENDING", "_REFLECTION_PROBE_BLENDING",
"_SCREEN_SPACE_OCCLUSION", "_SCREEN_SPACE_OCCLUSION",
"_SHADOWS_SOFT", "_TERRAIN_INSTANCED_PERPIXEL_NORMAL"
"_TERRAIN_INSTANCED_PERPIXEL_NORMAL",
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {
"PassType": 13, "PassType": 13,
"Keywords": [ "Keywords": [
"_ADDITIONAL_LIGHTS", "_ADDITIONAL_LIGHTS",
"_MAIN_LIGHT_SHADOWS_CASCADE", "_MAIN_LIGHT_SHADOWS",
"_TERRAIN_INSTANCED_PERPIXEL_NORMAL", "_TERRAIN_INSTANCED_PERPIXEL_NORMAL"
"EVALUATE_SH_VERTEX"
] ]
}, },
{ {

View File

@@ -94,29 +94,28 @@ ShaderVariantCollection:
passType: 8 passType: 8
- keywords: - keywords:
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _DETAIL_MULX2 _MAIN_LIGHT_SHADOWS
_DETAIL_MULX2 _MAIN_LIGHT_SHADOWS_CASCADE _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION
_SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _EMISSION _MAIN_LIGHT_SHADOWS
_EMISSION _MAIN_LIGHT_SHADOWS_CASCADE _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION
_SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _ENVIRONMENTREFLECTIONS_OFF
_ENVIRONMENTREFLECTIONS_OFF _MAIN_LIGHT_SHADOWS_CASCADE _NORMALMAP _REFLECTION_PROBE_BLENDING _MAIN_LIGHT_SHADOWS _NORMALMAP _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION
_REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT _SCREEN_SPACE_OCCLUSION _SPECULARHIGHLIGHTS_OFF
_SPECULARHIGHLIGHTS_OFF
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _ENVIRONMENTREFLECTIONS_OFF
_MAIN_LIGHT_SHADOWS_CASCADE _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _MAIN_LIGHT_SHADOWS _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION
_SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT _SCREEN_SPACE_OCCLUSION _SPECULARHIGHLIGHTS_OFF
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _DETAIL_MULX2 _MAIN_LIGHT_SHADOWS_CASCADE - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS
_REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS_CASCADE - keywords: _ADDITIONAL_LIGHTS _DETAIL_MULX2 _MAIN_LIGHT_SHADOWS
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS_CASCADE - keywords: _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS
_NORMALMAP passType: 13
- keywords: _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS _NORMALMAP
passType: 13 passType: 13
- keywords: _DETAIL_MULX2 - keywords: _DETAIL_MULX2
passType: 13 passType: 13
@@ -136,29 +135,30 @@ ShaderVariantCollection:
passType: 8 passType: 8
- keywords: - keywords:
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS
_MAIN_LIGHT_SHADOWS_CASCADE _REFLECTION_PROBE_BLENDING _SCREEN_SPACE_OCCLUSION _REFLECTION_PROBE_BLENDING _SCREEN_SPACE_OCCLUSION _TERRAIN_INSTANCED_PERPIXEL_NORMAL
_SHADOWS_SOFT _TERRAIN_INSTANCED_PERPIXEL_NORMAL
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS_CASCADE - keywords: _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS _TERRAIN_INSTANCED_PERPIXEL_NORMAL
_TERRAIN_INSTANCED_PERPIXEL_NORMAL
passType: 13 passType: 13
- first: {fileID: 4800000, guid: 715e1d138b462a0458266dbf06a1bf71, type: 3} - first: {fileID: 4800000, guid: 715e1d138b462a0458266dbf06a1bf71, type: 3}
second: second:
variants: variants:
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS
_MAIN_LIGHT_SHADOWS_CASCADE _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION
_SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT
passType: 0 passType: 0
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS_CASCADE - keywords: _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS
passType: 0 passType: 0
- keywords: - keywords:
passType: 8 passType: 8
- keywords: - keywords:
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS - keywords: _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS
_MAIN_LIGHT_SHADOWS_CASCADE _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION
_SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT
passType: 13 passType: 13
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS_CASCADE - keywords: _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS
passType: 13 passType: 13
- first: {fileID: 4800000, guid: 36e335017ad71d54fbb10842863188ae, type: 3}
second:
variants:
- keywords:
passType: 0

View File

@@ -1,7 +1,20 @@
{ {
"ShaderTotalCount": 13, "ShaderTotalCount": 14,
"VariantTotalCount": 15, "VariantTotalCount": 16,
"ShaderVariantInfos": [ "ShaderVariantInfos": [
{
"AssetPath": "Packages/com.unity.render-pipelines.core/Runtime/RenderPipelineResources/FallbackShader.shader",
"ShaderName": "Hidden/Core/FallbackError",
"ShaderVariantCount": 1,
"ShaderVariantElements": [
{
"PassType": 0,
"Keywords": [
""
]
}
]
},
{ {
"AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Utils/CoreBlit.shader", "AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Utils/CoreBlit.shader",
"ShaderName": "Hidden/Universal/CoreBlit", "ShaderName": "Hidden/Universal/CoreBlit",

View File

@@ -77,3 +77,8 @@ ShaderVariantCollection:
passType: 0 passType: 0
- keywords: _INTERLEAVED_GRADIENT _SAMPLE_COUNT_HIGH _SOURCE_DEPTH_NORMALS - keywords: _INTERLEAVED_GRADIENT _SAMPLE_COUNT_HIGH _SOURCE_DEPTH_NORMALS
passType: 0 passType: 0
- first: {fileID: 4800000, guid: 36e335017ad71d54fbb10842863188ae, type: 3}
second:
variants:
- keywords:
passType: 0

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 73ef838ec60c36249ba05eaa3c96273e guid: cabd4a0ffe7f92341ad5799c9e49801f
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5280dfac6a481ee429c769ba5688c9d2 guid: dc91fa8da965b074eb6f844cc0084943
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -31,10 +31,10 @@ public class BuildTool
public static void ExecuteBuild(string PackageName, EBuildPipeline BuildPipeline, BuildTarget BuildTarget, EFileNameStyle fileNameStyle, EBuildinFileCopyOption buildinFileCopyOption) public static void ExecuteBuild(string PackageName, EBuildPipeline BuildPipeline, BuildTarget BuildTarget, EFileNameStyle fileNameStyle, EBuildinFileCopyOption buildinFileCopyOption)
{ {
var buildinFileCopyParams = AssetBundleBuilderSetting.GetPackageBuildinFileCopyParams(PackageName, BuildPipeline); var buildinFileCopyParams = AssetBundleBuilderSetting.GetPackageBuildinFileCopyParams(PackageName, BuildPipeline.ToString());
var compressOption = AssetBundleBuilderSetting.GetPackageCompressOption(PackageName, BuildPipeline); var compressOption = AssetBundleBuilderSetting.GetPackageCompressOption(PackageName, BuildPipeline.ToString());
var clearBuildCache = AssetBundleBuilderSetting.GetPackageClearBuildCache(PackageName, BuildPipeline); var clearBuildCache = AssetBundleBuilderSetting.GetPackageClearBuildCache(PackageName, BuildPipeline.ToString());
var useAssetDependencyDB = AssetBundleBuilderSetting.GetPackageUseAssetDependencyDB(PackageName, BuildPipeline); var useAssetDependencyDB = AssetBundleBuilderSetting.GetPackageUseAssetDependencyDB(PackageName, BuildPipeline.ToString());
var builtinShaderBundleName = GetBuiltinShaderBundleName(PackageName); var builtinShaderBundleName = GetBuiltinShaderBundleName(PackageName);
ScriptableBuildParameters buildParameters = new ScriptableBuildParameters(); ScriptableBuildParameters buildParameters = new ScriptableBuildParameters();
@@ -80,7 +80,7 @@ public class BuildTool
public static IEncryptionServices CreateEncryptionInstance(string PackageName, EBuildPipeline BuildPipeline) public static IEncryptionServices CreateEncryptionInstance(string PackageName, EBuildPipeline BuildPipeline)
{ {
var encyptionClassName = AssetBundleBuilderSetting.GetPackageEncyptionClassName(PackageName, BuildPipeline); var encyptionClassName = AssetBundleBuilderSetting.GetPackageEncyptionServicesClassName(PackageName, BuildPipeline.ToString());
var encryptionClassTypes = EditorTools.GetAssignableTypes(typeof(IEncryptionServices)); var encryptionClassTypes = EditorTools.GetAssignableTypes(typeof(IEncryptionServices));
var classType = encryptionClassTypes.Find(x => x.FullName.Equals(encyptionClassName)); var classType = encryptionClassTypes.Find(x => x.FullName.Equals(encyptionClassName));
if (classType != null) if (classType != null)

View File

@@ -26,8 +26,6 @@ public class MyNetworkManagerHUD : MonoBehaviour
public bool alwaysAutoStart = false; public bool alwaysAutoStart = false;
public NetworkDiscovery networkDiscovery; public NetworkDiscovery networkDiscovery;
readonly Dictionary<long, ServerResponse> discoveredServers = new Dictionary<long, ServerResponse>(); readonly Dictionary<long, ServerResponse> discoveredServers = new Dictionary<long, ServerResponse>();
private TouchScreenKeyboard keyboard;
private int keyboardStatus = 0;
private void Start() private void Start()
{ {

View File

@@ -113,7 +113,7 @@ internal class FsmInitializePackage : IStateNode
/// </summary> /// </summary>
public string GetHostServerURL(string packageName) public string GetHostServerURL(string packageName)
{ {
string hostServerIP = $"http://47.107.55.108:8080/{Application.productName}"; string hostServerIP = $"https://home.gtuantuan.online/{Application.productName}";
if (GameManager.Inst.ServerAddress != "" && GameManager.Inst.ServerAddress != null) if (GameManager.Inst.ServerAddress != "" && GameManager.Inst.ServerAddress != null)
hostServerIP = $"{GameManager.Inst.ServerAddress}/{Application.productName}"; hostServerIP = $"{GameManager.Inst.ServerAddress}/{Application.productName}";
string appVersion = "v1"; string appVersion = "v1";

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root Version="v2.1"> <root Version="v2025.8.28">
<Common ShowPackageView="True" ShowEditorAlias="False" UniqueBundleName="True" /> <Common ShowPackageView="True" ShowEditorAlias="False" UniqueBundleName="True" />
<Package PackageName="Preload" PackageDesc="" AutoAddressable="True" LocationToLower="False" IncludeAssetGUID="False" IgnoreRuleName="NormalIgnoreRule"> <Package PackageName="Preload" PackageDesc="" AutoAddressable="True" SupportExtensionless="True" LocationToLower="False" IncludeAssetGUID="False" IgnoreRuleName="NormalIgnoreRule">
<Group GroupActiveRule="EnableGroup" GroupName="UIPanel" GroupDesc="" AssetTags=""> <Group GroupActiveRule="EnableGroup" GroupName="UIPanel" GroupDesc="" AssetTags="">
<Collector CollectPath="Assets/Res/Preload/UIPanel" CollectGUID="e8246a56301ba1440a28777341be6bcf" CollectType="MainAssetCollector" AddressRule="AddressByFileName" PackRule="PackDirectory" FilterRule="CollectAll" UserData="" AssetTags="" /> <Collector CollectPath="Assets/Res/Preload/UIPanel" CollectGUID="e8246a56301ba1440a28777341be6bcf" CollectType="MainAssetCollector" AddressRule="AddressByFileName" PackRule="PackDirectory" FilterRule="CollectAll" UserData="" AssetTags="" />
</Group> </Group>
@@ -12,7 +12,7 @@
<Collector CollectPath="Assets/Res/Preload/ShaderVariants" CollectGUID="d768850cee5f02d498615856f1f7d3fb" CollectType="MainAssetCollector" AddressRule="AddressByFileName" PackRule="PackDirectory" FilterRule="CollectShaderVariants" UserData="" AssetTags="" /> <Collector CollectPath="Assets/Res/Preload/ShaderVariants" CollectGUID="d768850cee5f02d498615856f1f7d3fb" CollectType="MainAssetCollector" AddressRule="AddressByFileName" PackRule="PackDirectory" FilterRule="CollectShaderVariants" UserData="" AssetTags="" />
</Group> </Group>
</Package> </Package>
<Package PackageName="Main" PackageDesc="" AutoAddressable="True" LocationToLower="False" IncludeAssetGUID="False" IgnoreRuleName="NormalIgnoreRule"> <Package PackageName="Main" PackageDesc="" AutoAddressable="True" SupportExtensionless="True" LocationToLower="False" IncludeAssetGUID="False" IgnoreRuleName="NormalIgnoreRule">
<Group GroupActiveRule="EnableGroup" GroupName="MainDLL" GroupDesc="" AssetTags=""> <Group GroupActiveRule="EnableGroup" GroupName="MainDLL" GroupDesc="" AssetTags="">
<Collector CollectPath="Assets/Res/Main/HotUpdateDll" CollectGUID="686a81b39d6eced4eb8463550b3f4759" CollectType="MainAssetCollector" AddressRule="AddressByFileName" PackRule="PackDirectory" FilterRule="CollectAll" UserData="" AssetTags="" /> <Collector CollectPath="Assets/Res/Main/HotUpdateDll" CollectGUID="686a81b39d6eced4eb8463550b3f4759" CollectType="MainAssetCollector" AddressRule="AddressByFileName" PackRule="PackDirectory" FilterRule="CollectAll" UserData="" AssetTags="" />
</Group> </Group>

View File

@@ -26,7 +26,7 @@ MonoBehaviour:
m_SupportsHDR: 1 m_SupportsHDR: 1
m_HDRColorBufferPrecision: 0 m_HDRColorBufferPrecision: 0
m_MSAA: 4 m_MSAA: 4
m_RenderScale: 2 m_RenderScale: 1
m_UpscalingFilter: 0 m_UpscalingFilter: 0
m_FsrOverrideSharpness: 0 m_FsrOverrideSharpness: 0
m_FsrSharpness: 0.92 m_FsrSharpness: 0.92
@@ -45,7 +45,7 @@ MonoBehaviour:
m_AdditionalLightsShadowResolutionTierHigh: 512 m_AdditionalLightsShadowResolutionTierHigh: 512
m_ReflectionProbeBlending: 1 m_ReflectionProbeBlending: 1
m_ReflectionProbeBoxProjection: 1 m_ReflectionProbeBoxProjection: 1
m_ShadowDistance: 1 m_ShadowDistance: 50
m_ShadowCascadeCount: 4 m_ShadowCascadeCount: 4
m_Cascade2Split: 0.25 m_Cascade2Split: 0.25
m_Cascade3Split: {x: 0.1, y: 0.3} m_Cascade3Split: {x: 0.1, y: 0.3}

View File

@@ -1,11 +1,11 @@
{ {
"FileVersion": "1.0.0", "FileVersion": "1.0.0",
"PackageName": "Preload", "PackageName": "Preload",
"PackageVersion": "2025-10-23-619", "PackageVersion": "2025-10-25-1011",
"Wrappers": [ "Wrappers": [
{ {
"BundleGUID": "2e42ccf99ea94f39f58b060fa3cf244a", "BundleGUID": "e30b5f0bc472d219a39098dcdc864682",
"FileName": "preload_assets_res_preload_hotupdatedll_2e42ccf99ea94f39f58b060fa3cf244a.bundle" "FileName": "preload_assets_res_preload_hotupdatedll_e30b5f0bc472d219a39098dcdc864682.bundle"
}, },
{ {
"BundleGUID": "3af8985a0950e33249e822a39aa0ccc6", "BundleGUID": "3af8985a0950e33249e822a39aa0ccc6",
@@ -16,8 +16,8 @@
"FileName": "preload_share_assets_res_preload_uipanelart_219ff435ccd8a01117a1abb146297be0.bundle" "FileName": "preload_share_assets_res_preload_uipanelart_219ff435ccd8a01117a1abb146297be0.bundle"
}, },
{ {
"BundleGUID": "4e1243970ec9c75cdb3d1f2552618719", "BundleGUID": "70979c3eee73e29e00d15d5cae1bb87b",
"FileName": "preload_unityshaders_4e1243970ec9c75cdb3d1f2552618719.bundle" "FileName": "preload_unityshaders_70979c3eee73e29e00d15d5cae1bb87b.bundle"
} }
] ]
} }

View File

@@ -1 +1 @@
2025-10-23-619 2025-10-25-1011

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 10649d0a8a6844f468c474855f53f602 guid: a895cb26994f9c743b72bbc308a5ee83
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -0,0 +1 @@
ff51d7ec

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e2781ee36fc150f4f9d0f5ea6002be3f guid: a43b153e67810504bac9896a6fc16c11
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2caec77def88e2f45aee1d5665c10ecf guid: 1aaea0beb90b742419c5204470c6dea8
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: de5cc13b1c1b9a04d97cb4e2ac682600 guid: e885b1ee4e07aae4993c06a0d174f6f6
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5862ead0f353bb44e8a023649607f100 guid: 92c2724dd632ceb4086f6623adf2e304
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 83541de392f5489438a81cb60f751e9c guid: 4be2e9448b686254685a931e1a476439
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ccb22c5c90bfe2f43a0f83f873dd6646 guid: b1774501eb8484d47b6c9d61585b4cd4
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -0,0 +1,25 @@
using System;
using System.IO;
using UnityEditor;
using UnityEngine;
namespace YooAsset.Editor
{
internal class ClearBuildCacheWindow
{
[MenuItem("Tools/Clear Build Cache", false, 2)]
public static void OpenWindow()
{
// 清空SBP构建缓存
UnityEditor.Build.Pipeline.Utilities.BuildCache.PurgeCache(false);
// 删除AssetDependDB文件
string projectPath = YooAsset.Editor.EditorTools.GetProjectPath();
string databaseFilePath = $"{projectPath}/Library/AssetDependencyDB";
if (File.Exists(databaseFilePath))
{
File.Delete(databaseFilePath);
}
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 80ce0631d38cf74458c902fb325afb81 guid: 8bf2d0ddd780f1746b7f1c7e0f9959e0
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 879f2b393f883554899ab3345f0dc998 guid: f450f29c62aedae4390edc923f71811d
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -0,0 +1,92 @@
using System.IO;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEditor;
namespace YooAsset.Editor
{
public class CreateBuildinCatalogWindow : EditorWindow
{
static CreateBuildinCatalogWindow _thisInstance;
[MenuItem("Tools/内置清单生成工具Catalog", false, 101)]
static void ShowWindow()
{
if (_thisInstance == null)
{
_thisInstance = EditorWindow.GetWindow(typeof(CreateBuildinCatalogWindow), false, "内置清单生成工具", true) as CreateBuildinCatalogWindow;
_thisInstance.minSize = new Vector2(800, 600);
}
_thisInstance.Show();
}
private string _directoryRoot = string.Empty;
private void OnGUI()
{
GUILayout.Space(10);
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("选择内置资源目录", GUILayout.MaxWidth(150)))
{
string resultPath = EditorUtility.OpenFolderPanel("Find", "Assets/", "StreamingAssets");
if (!string.IsNullOrEmpty(resultPath))
_directoryRoot = resultPath;
}
EditorGUILayout.LabelField(_directoryRoot);
EditorGUILayout.EndHorizontal();
if (string.IsNullOrEmpty(_directoryRoot) == false)
{
if (GUILayout.Button("生成Catalog文件", GUILayout.MaxWidth(150)))
{
CreateCatalogFile(_directoryRoot);
}
}
}
private void CreateCatalogFile(string directoryRoot)
{
// 搜索所有Package目录
List<string> packageRoots = GetPackageRoots(directoryRoot);
foreach (var packageRoot in packageRoots)
{
DirectoryInfo directoryInfo = new DirectoryInfo(packageRoot);
string packageName = directoryInfo.Name;
try
{
bool result = CatalogTools.CreateCatalogFile(null, packageName, packageRoot); //TODO 自行处理解密
if (result == false)
{
Debug.LogError($"Create package {packageName} catalog file failed ! See the detail error in console !");
}
}
catch (System.Exception ex)
{
Debug.LogError($"Create package {packageName} catalog file failed ! {ex.Message}");
}
}
}
private List<string> GetPackageRoots(string rootPath)
{
// 检查目录是否存在
if (Directory.Exists(rootPath) == false)
{
throw new DirectoryNotFoundException($"目录不存在: {rootPath}");
}
// 搜索所有 .version 文件(包含子目录)
string[] versionFiles = Directory.GetFiles(
rootPath,
"*.version",
SearchOption.AllDirectories
);
// 提取文件所在目录路径并去重
return versionFiles
.Select(file => Path.GetDirectoryName(file))
.Distinct()
.ToList();
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0bdf53359f9e17b41b08982a2be2098c guid: 16ab831593388974fa7e8f8c7e8199a8
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e8f5ca9e913008d4988fe0f4a2f4a443
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
using YooAsset.Editor;
[BuildPipelineAttribute("CustomBuildPipeline")]
internal class CustomBuildPipelineViewer : BuiltinBuildPipelineViewer
{
protected override string GetDefaultPackageVersion()
{
return "v1.0.0";
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 614227bf558da7149a7eb6de7dfa1a21 guid: e721201eb2cad4e4ca207b9c99208055
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 103e9c32154c7724a85a89b54576d2c2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 73aae15a0e1aec742a7e8f05755a2013 guid: 58b8635bcecc5b44dad501fff5dbf8c1
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ff1eb84d9996ca1409e37f45617b1bdb guid: ded28d0056e4afe46a0ce446de51617b
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c0b4ccec8007a6047aade899b4b74fcf guid: 1862925d68796e84d8dd0a39a85e89df
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -106,11 +106,11 @@ namespace YooAsset.Editor
// 加载补丁清单1 // 加载补丁清单1
byte[] bytesData1 = FileUtility.ReadAllBytes(_manifestPath1); byte[] bytesData1 = FileUtility.ReadAllBytes(_manifestPath1);
PackageManifest manifest1 = ManifestTools.DeserializeFromBinary(bytesData1); PackageManifest manifest1 = ManifestTools.DeserializeFromBinary(bytesData1, null); //TODO 自行处理解密
// 加载补丁清单1 // 加载补丁清单1
byte[] bytesData2 = FileUtility.ReadAllBytes(_manifestPath2); byte[] bytesData2 = FileUtility.ReadAllBytes(_manifestPath2);
PackageManifest manifest2 = ManifestTools.DeserializeFromBinary(bytesData2); PackageManifest manifest2 = ManifestTools.DeserializeFromBinary(bytesData2, null); //TODO 自行处理解密
// 拷贝文件列表 // 拷贝文件列表
foreach (var bundle2 in manifest2.BundleList) foreach (var bundle2 in manifest2.BundleList)

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6ff3c700b7f108b48998aa1630a769e1 guid: e2beaa5e8aad3e0439f058dc9fe34be5
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: fa6624433c5d8e445b1426dcdf0763ba guid: afb453c8615ab124ebd40d8900ac3903
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -71,7 +71,7 @@ namespace YooAsset.Editor
// 加载补丁清单 // 加载补丁清单
byte[] bytesData = FileUtility.ReadAllBytes(manifestFilePath); byte[] bytesData = FileUtility.ReadAllBytes(manifestFilePath);
PackageManifest manifest = ManifestTools.DeserializeFromBinary(bytesData); PackageManifest manifest = ManifestTools.DeserializeFromBinary(bytesData, null); //TODO 自行处理解密
// 拷贝文件列表 // 拷贝文件列表
int fileCount = 0; int fileCount = 0;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 699068f8f637708409436199baa62c1f guid: 25b53e0405c55694c901623ee9cb0d1a
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 36626e333f5e25c4581bc91db0189714
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace YooAsset
{
public class PreprocessBuildCatalog : UnityEditor.Build.IPreprocessBuildWithReport
{
public int callbackOrder { get { return 0; } }
/// <summary>
/// 在构建应用程序前自动生成内置资源目录文件。
/// 原理搜索StreamingAssets目录下的所有资源文件将这些文件信息写入文件然后在运行时做查询用途。
/// </summary>
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
{
YooLogger.Log("Begin to create catalog file !");
string rootPath = YooAssetSettingsData.GetYooDefaultBuildinRoot();
DirectoryInfo rootDirectory = new DirectoryInfo(rootPath);
if (rootDirectory.Exists == false)
{
Debug.LogWarning($"Can not found StreamingAssets root directory : {rootPath}");
return;
}
// 搜索所有Package目录
DirectoryInfo[] subDirectories = rootDirectory.GetDirectories();
foreach (var subDirectory in subDirectories)
{
string packageName = subDirectory.Name;
string pacakgeDirectory = subDirectory.FullName;
try
{
bool result = CatalogTools.CreateCatalogFile(null, packageName, pacakgeDirectory); //TODO 自行处理解密
if (result == false)
{
Debug.LogError($"Create package {packageName} catalog file failed ! See the detail error in console !");
}
}
catch (System.Exception ex)
{
Debug.LogError($"Create package {packageName} catalog file failed ! {ex.Message}");
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 19997de7b89b54445961e8b973f43ab3 guid: 6b5abe115ebfe1344b674db78b2edf6c
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: dcb9955c15609744a9666bd76f6af3d9 guid: a0be37da2654700439f6ac33bcd9e2e9
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ab74d4ff4a2805147883de70a1559a0a guid: 018667dae4e4d9c4bb5cee34bae3d761
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 97098b04691f5c046ac4829f1d72f425 guid: 2727e0805ce46af45a0756651ff52023
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 21b4cc6bf4c0c064d8e2687024e24c86 guid: e1fa8fc528c12e9408f1b848e3761488
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 44454e58a49818040a1aef5799e71b30 guid: 5210230009c62ab4f8871c7961691bbe
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 70401cc80b9807e46bd8283e01b4302f guid: b74ce9bc5de5759458cc946d59ddb614
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9bff4878063eaf04dab8713e1e662ac5 guid: 2766d66d18232984aad17caf2fcd6397
ScriptedImporter: ScriptedImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6816dd00c9cfdce4d9386c0b3088b843 guid: 3e7425c4ab8481641bbcfa37e4c731b3
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5d7171aa14ba0e649900533bfeed0edb guid: 434096c030433934ab04d2da806cc1b7
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c0893ac05d109894e9acb6deeb688ee5 guid: 11b50923bc56ba049b13bede653e0432
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 03c367406c5062c41ba3290201be20c2 guid: b01030957433cdd4cb232b79fb7ed993
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@@ -1,67 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using System.IO;
using UnityEngine;
using UnityEngine.SceneManagement;
using TTSDK;
namespace YooAsset
{
internal class TTAssetBundleResult : BundleResult
{
private readonly IFileSystem _fileSystem;
private readonly PackageBundle _packageBundle;
private readonly AssetBundle _assetBundle;
public TTAssetBundleResult(IFileSystem fileSystem, PackageBundle packageBundle, AssetBundle assetBundle)
{
_fileSystem = fileSystem;
_packageBundle = packageBundle;
_assetBundle = assetBundle;
}
public override void UnloadBundleFile()
{
if (_assetBundle != null)
{
if (_packageBundle.Encrypted)
_assetBundle.Unload(true);
else
_assetBundle.TTUnload(true);
}
}
public override string GetBundleFilePath()
{
return _fileSystem.GetBundleFilePath(_packageBundle);
}
public override byte[] ReadBundleFileData()
{
return _fileSystem.ReadBundleFileData(_packageBundle);
}
public override string ReadBundleFileText()
{
return _fileSystem.ReadBundleFileText(_packageBundle);
}
public override FSLoadAssetOperation LoadAssetAsync(AssetInfo assetInfo)
{
var operation = new AssetBundleLoadAssetOperation(_packageBundle, _assetBundle, assetInfo);
return operation;
}
public override FSLoadAllAssetsOperation LoadAllAssetsAsync(AssetInfo assetInfo)
{
var operation = new AssetBundleLoadAllAssetsOperation(_packageBundle, _assetBundle, assetInfo);
return operation;
}
public override FSLoadSubAssetsOperation LoadSubAssetsAsync(AssetInfo assetInfo)
{
var operation = new AssetBundleLoadSubAssetsOperation(_packageBundle, _assetBundle, assetInfo);
return operation;
}
public override FSLoadSceneOperation LoadSceneOperation(AssetInfo assetInfo, LoadSceneParameters loadParams, bool suspendLoad)
{
var operation = new AssetBundleLoadSceneOperation(assetInfo, loadParams, suspendLoad);
return operation;
}
}
}
#endif

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8cba5e0b26df8ee40a93d697f889e33d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,101 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using UnityEngine;
using UnityEngine.Networking;
using YooAsset;
internal class TTFSDownloadFileOperation : DefaultDownloadFileOperation
{
private TiktokFileSystem _fileSystem;
private ESteps _steps = ESteps.None;
internal TTFSDownloadFileOperation(TiktokFileSystem fileSystem, PackageBundle bundle, DownloadFileOptions options) : base(bundle, options)
{
_fileSystem = fileSystem;
}
internal override void InternalStart()
{
_steps = ESteps.CreateRequest;
}
internal override void InternalUpdate()
{
// 创建下载器
if (_steps == ESteps.CreateRequest)
{
// 获取请求地址
_requestURL = GetRequestURL();
// 重置变量
ResetRequestFiled();
// 创建下载器
CreateWebRequest();
_steps = ESteps.CheckRequest;
}
// 检测下载结果
if (_steps == ESteps.CheckRequest)
{
DownloadProgress = _webRequest.downloadProgress;
DownloadedBytes = (long)_webRequest.downloadedBytes;
Progress = DownloadProgress;
if (_webRequest.isDone == false)
{
CheckRequestTimeout();
return;
}
// 检查网络错误
if (CheckRequestResult())
{
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
}
else
{
_steps = ESteps.TryAgain;
}
// 注意:最终释放请求器
DisposeWebRequest();
}
// 重新尝试下载
if (_steps == ESteps.TryAgain)
{
if (FailedTryAgain <= 0)
{
Status = EOperationStatus.Failed;
_steps = ESteps.Done;
YooLogger.Error(Error);
return;
}
_tryAgainTimer += Time.unscaledDeltaTime;
if (_tryAgainTimer > 1f)
{
FailedTryAgain--;
_steps = ESteps.CreateRequest;
YooLogger.Warning(Error);
}
}
}
private void CreateWebRequest()
{
//TODO : 抖音小游戏没有找到预下载方法
_webRequest = UnityWebRequest.Get(_requestURL);
_webRequest.disposeDownloadHandlerOnDispose = true;
_webRequest.SendWebRequest();
}
private void DisposeWebRequest()
{
if (_webRequest != null)
{
//注意引擎底层会自动调用Abort方法
_webRequest.Dispose();
_webRequest = null;
}
}
}
#endif

View File

@@ -1,20 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
internal partial class TTFSInitializeOperation : FSInitializeFileSystemOperation
{
private readonly TiktokFileSystem _fileSystem;
public TTFSInitializeOperation(TiktokFileSystem fileSystem)
{
_fileSystem = fileSystem;
}
internal override void InternalStart()
{
Status = EOperationStatus.Succeed;
}
internal override void InternalUpdate()
{
}
}
#endif

View File

@@ -1,98 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using UnityEngine;
using UnityEngine.Networking;
using YooAsset;
internal class TTFSLoadBundleOperation : FSLoadBundleOperation
{
private enum ESteps
{
None,
DownloadAssetBundle,
Done,
}
private readonly TiktokFileSystem _fileSystem;
private readonly PackageBundle _bundle;
private DownloadAssetBundleOperation _downloadAssetBundleOp;
private ESteps _steps = ESteps.None;
internal TTFSLoadBundleOperation(TiktokFileSystem fileSystem, PackageBundle bundle)
{
_fileSystem = fileSystem;
_bundle = bundle;
}
internal override void InternalStart()
{
_steps = ESteps.DownloadAssetBundle;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.DownloadAssetBundle)
{
if (_downloadAssetBundleOp == null)
{
DownloadFileOptions options = new DownloadFileOptions(int.MaxValue, 60);
options.MainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName); ;
options.FallbackURL = _fileSystem.RemoteServices.GetRemoteFallbackURL(_bundle.FileName);
if (_bundle.Encrypted)
{
_downloadAssetBundleOp = new DownloadWebEncryptAssetBundleOperation(false, _fileSystem.DecryptionServices, _bundle, options);
_downloadAssetBundleOp.StartOperation();
AddChildOperation(_downloadAssetBundleOp);
}
else
{
_downloadAssetBundleOp = new DownloadTiktokAssetBundleOperation(_bundle, options);
_downloadAssetBundleOp.StartOperation();
AddChildOperation(_downloadAssetBundleOp);
}
}
_downloadAssetBundleOp.UpdateOperation();
DownloadProgress = _downloadAssetBundleOp.DownloadProgress;
DownloadedBytes = (long)_downloadAssetBundleOp.DownloadedBytes;
Progress = DownloadProgress;
if (_downloadAssetBundleOp.IsDone == false)
return;
if (_downloadAssetBundleOp.Status == EOperationStatus.Succeed)
{
var assetBundle = _downloadAssetBundleOp.Result;
if (assetBundle == null)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = $"{nameof(DownloadAssetBundleOperation)} loaded asset bundle is null !";
}
else
{
_steps = ESteps.Done;
Result = new TTAssetBundleResult(_fileSystem, _bundle, assetBundle);
Status = EOperationStatus.Succeed;
}
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloadAssetBundleOp.Error;
}
}
}
internal override void InternalWaitForAsyncComplete()
{
if (_steps != ESteps.Done)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "WebGL platform not support sync load method !";
UnityEngine.Debug.LogError(Error);
}
}
}
#endif

View File

@@ -1,92 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
internal class TTFSLoadPackageManifestOperation : FSLoadPackageManifestOperation
{
private enum ESteps
{
None,
RequestPackageHash,
LoadPackageManifest,
Done,
}
private readonly TiktokFileSystem _fileSystem;
private readonly string _packageVersion;
private readonly int _timeout;
private RequestTiktokPackageHashOperation _requestPackageHashOp;
private LoadTiktokPackageManifestOperation _loadPackageManifestOp;
private ESteps _steps = ESteps.None;
public TTFSLoadPackageManifestOperation(TiktokFileSystem fileSystem, string packageVersion, int timeout)
{
_fileSystem = fileSystem;
_packageVersion = packageVersion;
_timeout = timeout;
}
internal override void InternalStart()
{
_steps = ESteps.RequestPackageHash;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.RequestPackageHash)
{
if (_requestPackageHashOp == null)
{
_requestPackageHashOp = new RequestTiktokPackageHashOperation(_fileSystem, _packageVersion, _timeout);
_requestPackageHashOp.StartOperation();
AddChildOperation(_requestPackageHashOp);
}
_requestPackageHashOp.UpdateOperation();
if (_requestPackageHashOp.IsDone == false)
return;
if (_requestPackageHashOp.Status == EOperationStatus.Succeed)
{
_steps = ESteps.LoadPackageManifest;
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _requestPackageHashOp.Error;
}
}
if (_steps == ESteps.LoadPackageManifest)
{
if (_loadPackageManifestOp == null)
{
string packageHash = _requestPackageHashOp.PackageHash;
_loadPackageManifestOp = new LoadTiktokPackageManifestOperation(_fileSystem, _packageVersion, packageHash, _timeout);
_loadPackageManifestOp.StartOperation();
AddChildOperation(_loadPackageManifestOp);
}
_loadPackageManifestOp.UpdateOperation();
Progress = _loadPackageManifestOp.Progress;
if (_loadPackageManifestOp.IsDone == false)
return;
if (_loadPackageManifestOp.Status == EOperationStatus.Succeed)
{
_steps = ESteps.Done;
Manifest = _loadPackageManifestOp.Manifest;
Status = EOperationStatus.Succeed;
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _loadPackageManifestOp.Error;
}
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2850c0b0e742f824f9d1f12b7d68b806
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,62 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
internal class TTFSRequestPackageVersionOperation : FSRequestPackageVersionOperation
{
private enum ESteps
{
None,
RequestPackageVersion,
Done,
}
private readonly TiktokFileSystem _fileSystem;
private readonly int _timeout;
private RequestTiktokPackageVersionOperation _requestPackageVersionOp;
private ESteps _steps = ESteps.None;
internal TTFSRequestPackageVersionOperation(TiktokFileSystem fileSystem, int timeout)
{
_fileSystem = fileSystem;
_timeout = timeout;
}
internal override void InternalStart()
{
_steps = ESteps.RequestPackageVersion;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.RequestPackageVersion)
{
if (_requestPackageVersionOp == null)
{
_requestPackageVersionOp = new RequestTiktokPackageVersionOperation(_fileSystem, _timeout);
_requestPackageVersionOp.StartOperation();
AddChildOperation(_requestPackageVersionOp);
}
_requestPackageVersionOp.UpdateOperation();
Progress = _requestPackageVersionOp.Progress;
if (_requestPackageVersionOp.IsDone == false)
return;
if (_requestPackageVersionOp.Status == EOperationStatus.Succeed)
{
_steps = ESteps.Done;
PackageVersion = _requestPackageVersionOp.PackageVersion;
Status = EOperationStatus.Succeed;
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _requestPackageVersionOp.Error;
}
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8210185faba92a3479bf6713abab1f19
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 101c97835f86e9147993961f514caf2c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,126 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using UnityEngine;
using TTSDK;
namespace YooAsset
{
internal class DownloadTiktokAssetBundleOperation : DownloadAssetBundleOperation
{
private ESteps _steps = ESteps.None;
internal DownloadTiktokAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options) : base(bundle, options)
{
}
internal override void InternalStart()
{
_steps = ESteps.CreateRequest;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
// 创建下载器
if (_steps == ESteps.CreateRequest)
{
// 获取请求地址
_requestURL = GetRequestURL();
// 重置变量
ResetRequestFiled();
// 创建下载器
CreateWebRequest();
_steps = ESteps.CheckRequest;
}
// 检测下载结果
if (_steps == ESteps.CheckRequest)
{
DownloadProgress = _webRequest.downloadProgress;
DownloadedBytes = (long)_webRequest.downloadedBytes;
Progress = DownloadProgress;
if (_webRequest.isDone == false)
{
//TODO 需要验证抖音插件请求器的下载进度
//CheckRequestTimeout();
return;
}
// 检查网络错误
if (CheckRequestResult())
{
var downloadHanlder = (DownloadHandlerTTAssetBundle)_webRequest.downloadHandler;
AssetBundle assetBundle = downloadHanlder.assetBundle;
if (assetBundle == null)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "Download handler asset bundle object is null !";
}
else
{
_steps = ESteps.Done;
Result = assetBundle;
Status = EOperationStatus.Succeed;
//TODO 需要验证抖音插件请求器的下载进度
DownloadProgress = 1f;
DownloadedBytes = Bundle.FileSize;
Progress = 1f;
}
}
else
{
_steps = ESteps.TryAgain;
}
// 注意:最终释放请求器
DisposeWebRequest();
}
// 重新尝试下载
if (_steps == ESteps.TryAgain)
{
if (FailedTryAgain <= 0)
{
Status = EOperationStatus.Failed;
_steps = ESteps.Done;
YooLogger.Error(Error);
return;
}
_tryAgainTimer += Time.unscaledDeltaTime;
if (_tryAgainTimer > 1f)
{
FailedTryAgain--;
_steps = ESteps.CreateRequest;
YooLogger.Warning(Error);
}
}
}
internal override void InternalAbort()
{
_steps = ESteps.Done;
DisposeWebRequest();
}
private void CreateWebRequest()
{
_webRequest = TTAssetBundle.GetAssetBundle(_requestURL);
_webRequest.disposeDownloadHandlerOnDispose = true;
_webRequest.SendWebRequest();
}
private void DisposeWebRequest()
{
if (_webRequest != null)
{
//注意引擎底层会自动调用Abort方法
_webRequest.Dispose();
_webRequest = null;
}
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fa5e1bc536118b14ba56f53930539e38
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,129 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
internal class LoadTiktokPackageManifestOperation : AsyncOperationBase
{
private enum ESteps
{
None,
RequestFileData,
VerifyFileData,
LoadManifest,
Done,
}
private readonly TiktokFileSystem _fileSystem;
private readonly string _packageVersion;
private readonly string _packageHash;
private readonly int _timeout;
private UnityWebDataRequestOperation _webDataRequestOp;
private DeserializeManifestOperation _deserializer;
private int _requestCount = 0;
private ESteps _steps = ESteps.None;
/// <summary>
/// 包裹清单
/// </summary>
public PackageManifest Manifest { private set; get; }
internal LoadTiktokPackageManifestOperation(TiktokFileSystem fileSystem, string packageVersion, string packageHash, int timeout)
{
_fileSystem = fileSystem;
_packageVersion = packageVersion;
_packageHash = packageHash;
_timeout = timeout;
}
internal override void InternalStart()
{
_requestCount = WebRequestCounter.GetRequestFailedCount(_fileSystem.PackageName, nameof(LoadTiktokPackageManifestOperation));
_steps = ESteps.RequestFileData;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.RequestFileData)
{
if (_webDataRequestOp == null)
{
string fileName = YooAssetSettingsData.GetManifestBinaryFileName(_fileSystem.PackageName, _packageVersion);
string url = GetRequestURL(fileName);
_webDataRequestOp = new UnityWebDataRequestOperation(url, _timeout);
_webDataRequestOp.StartOperation();
AddChildOperation(_webDataRequestOp);
}
_webDataRequestOp.UpdateOperation();
Progress = _webDataRequestOp.Progress;
if (_webDataRequestOp.IsDone == false)
return;
if (_webDataRequestOp.Status == EOperationStatus.Succeed)
{
_steps = ESteps.VerifyFileData;
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _webDataRequestOp.Error;
WebRequestCounter.RecordRequestFailed(_fileSystem.PackageName, nameof(LoadTiktokPackageManifestOperation));
}
}
if (_steps == ESteps.VerifyFileData)
{
string fileHash = HashUtility.BytesCRC32(_webDataRequestOp.Result);
if (fileHash == _packageHash)
{
_steps = ESteps.LoadManifest;
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "Failed to verify package manifest file!";
}
}
if (_steps == ESteps.LoadManifest)
{
if (_deserializer == null)
{
_deserializer = new DeserializeManifestOperation(_webDataRequestOp.Result);
_deserializer.StartOperation();
AddChildOperation(_deserializer);
}
_deserializer.UpdateOperation();
Progress = _deserializer.Progress;
if (_deserializer.IsDone == false)
return;
if (_deserializer.Status == EOperationStatus.Succeed)
{
_steps = ESteps.Done;
Manifest = _deserializer.Manifest;
Status = EOperationStatus.Succeed;
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _deserializer.Error;
}
}
}
private string GetRequestURL(string fileName)
{
// 轮流返回请求地址
if (_requestCount % 2 == 0)
return _fileSystem.RemoteServices.GetRemoteMainURL(fileName);
else
return _fileSystem.RemoteServices.GetRemoteFallbackURL(fileName);
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b648d648fa0c4e44d811b42b80891543
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,92 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
internal class RequestTiktokPackageHashOperation : AsyncOperationBase
{
private enum ESteps
{
None,
RequestPackageHash,
Done,
}
private readonly TiktokFileSystem _fileSystem;
private readonly string _packageVersion;
private readonly int _timeout;
private UnityWebTextRequestOperation _webTextRequestOp;
private int _requestCount = 0;
private ESteps _steps = ESteps.None;
/// <summary>
/// 包裹哈希值
/// </summary>
public string PackageHash { private set; get; }
public RequestTiktokPackageHashOperation(TiktokFileSystem fileSystem, string packageVersion, int timeout)
{
_fileSystem = fileSystem;
_packageVersion = packageVersion;
_timeout = timeout;
}
internal override void InternalStart()
{
_requestCount = WebRequestCounter.GetRequestFailedCount(_fileSystem.PackageName, nameof(RequestTiktokPackageHashOperation));
_steps = ESteps.RequestPackageHash;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.RequestPackageHash)
{
if (_webTextRequestOp == null)
{
string fileName = YooAssetSettingsData.GetPackageHashFileName(_fileSystem.PackageName, _packageVersion);
string url = GetRequestURL(fileName);
_webTextRequestOp = new UnityWebTextRequestOperation(url, _timeout);
_webTextRequestOp.StartOperation();
AddChildOperation(_webTextRequestOp);
}
_webTextRequestOp.UpdateOperation();
Progress = _webTextRequestOp.Progress;
if (_webTextRequestOp.IsDone == false)
return;
if (_webTextRequestOp.Status == EOperationStatus.Succeed)
{
PackageHash = _webTextRequestOp.Result;
if (string.IsNullOrEmpty(PackageHash))
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = $"Wechat package hash file content is empty !";
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
}
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _webTextRequestOp.Error;
WebRequestCounter.RecordRequestFailed(_fileSystem.PackageName, nameof(RequestTiktokPackageHashOperation));
}
}
}
private string GetRequestURL(string fileName)
{
// 轮流返回请求地址
if (_requestCount % 2 == 0)
return _fileSystem.RemoteServices.GetRemoteMainURL(fileName);
else
return _fileSystem.RemoteServices.GetRemoteFallbackURL(fileName);
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 51a0e40e248b49a4783b3dca33a23cf1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,90 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
internal class RequestTiktokPackageVersionOperation : AsyncOperationBase
{
private enum ESteps
{
None,
RequestPackageVersion,
Done,
}
private readonly TiktokFileSystem _fileSystem;
private readonly int _timeout;
private UnityWebTextRequestOperation _webTextRequestOp;
private int _requestCount = 0;
private ESteps _steps = ESteps.None;
/// <summary>
/// 包裹版本
/// </summary>
public string PackageVersion { private set; get; }
public RequestTiktokPackageVersionOperation(TiktokFileSystem fileSystem, int timeout)
{
_fileSystem = fileSystem;
_timeout = timeout;
}
internal override void InternalStart()
{
_requestCount = WebRequestCounter.GetRequestFailedCount(_fileSystem.PackageName, nameof(RequestTiktokPackageVersionOperation));
_steps = ESteps.RequestPackageVersion;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.RequestPackageVersion)
{
if (_webTextRequestOp == null)
{
string fileName = YooAssetSettingsData.GetPackageVersionFileName(_fileSystem.PackageName);
string url = GetRequestURL(fileName);
_webTextRequestOp = new UnityWebTextRequestOperation(url, _timeout);
_webTextRequestOp.StartOperation();
AddChildOperation(_webTextRequestOp);
}
_webTextRequestOp.UpdateOperation();
Progress = _webTextRequestOp.Progress;
if (_webTextRequestOp.IsDone == false)
return;
if (_webTextRequestOp.Status == EOperationStatus.Succeed)
{
PackageVersion = _webTextRequestOp.Result;
if (string.IsNullOrEmpty(PackageVersion))
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = $"Wechat package version file content is empty !";
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
}
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _webTextRequestOp.Error;
WebRequestCounter.RecordRequestFailed(_fileSystem.PackageName, nameof(RequestTiktokPackageVersionOperation));
}
}
}
private string GetRequestURL(string fileName)
{
// 轮流返回请求地址
if (_requestCount % 2 == 0)
return _fileSystem.RemoteServices.GetRemoteMainURL(fileName);
else
return _fileSystem.RemoteServices.GetRemoteFallbackURL(fileName);
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: a04c463fb00f60f499541fbb98e4fdc4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,266 +0,0 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using System.Collections.Generic;
using UnityEngine;
using YooAsset;
using TTSDK;
using System.Linq;
using System;
public static class TiktokFileSystemCreater
{
public static FileSystemParameters CreateFileSystemParameters(string packageRoot, IRemoteServices remoteServices)
{
string fileSystemClass = $"{nameof(TiktokFileSystem)},YooAsset.RuntimeExtension";
var fileSystemParams = new FileSystemParameters(fileSystemClass, packageRoot);
fileSystemParams.AddParameter(FileSystemParametersDefine.REMOTE_SERVICES, remoteServices);
return fileSystemParams;
}
public static FileSystemParameters CreateFileSystemParameters(string packageRoot, IRemoteServices remoteServices, IWebDecryptionServices decryptionServices)
{
string fileSystemClass = $"{nameof(TiktokFileSystem)},YooAsset.RuntimeExtension";
var fileSystemParams = new FileSystemParameters(fileSystemClass, packageRoot);
fileSystemParams.AddParameter(FileSystemParametersDefine.REMOTE_SERVICES, remoteServices);
fileSystemParams.AddParameter(FileSystemParametersDefine.DECRYPTION_SERVICES, decryptionServices);
return fileSystemParams;
}
}
/// <summary>
/// 抖音小游戏文件系统
/// 参考https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/guide/know
/// </summary>
internal class TiktokFileSystem : IFileSystem
{
private class WebRemoteServices : IRemoteServices
{
private readonly string _webPackageRoot;
protected readonly Dictionary<string, string> _mapping = new Dictionary<string, string>(10000);
public WebRemoteServices(string buildinPackRoot)
{
_webPackageRoot = buildinPackRoot;
}
string IRemoteServices.GetRemoteMainURL(string fileName)
{
return GetFileLoadURL(fileName);
}
string IRemoteServices.GetRemoteFallbackURL(string fileName)
{
return GetFileLoadURL(fileName);
}
private string GetFileLoadURL(string fileName)
{
if (_mapping.TryGetValue(fileName, out string url) == false)
{
string filePath = PathUtility.Combine(_webPackageRoot, fileName);
url = DownloadSystemHelper.ConvertToWWWPath(filePath);
_mapping.Add(fileName, url);
}
return url;
}
}
private readonly Dictionary<string, string> _cacheFilePathMapping = new Dictionary<string, string>(10000);
private TTFileSystemManager _fileSystemMgr;
private string _ttCacheRoot = string.Empty;
/// <summary>
/// 包裹名称
/// </summary>
public string PackageName { private set; get; }
/// <summary>
/// 文件根目录
/// </summary>
public string FileRoot
{
get
{
return _ttCacheRoot;
}
}
/// <summary>
/// 文件数量
/// </summary>
public int FileCount
{
get
{
return 0;
}
}
#region
/// <summary>
/// 自定义参数:远程服务接口
/// </summary>
public IRemoteServices RemoteServices { private set; get; } = null;
/// <summary>
/// 自定义参数:解密方法类
/// </summary>
public IWebDecryptionServices DecryptionServices { private set; get; }
#endregion
public TiktokFileSystem()
{
}
public virtual FSInitializeFileSystemOperation InitializeFileSystemAsync()
{
var operation = new TTFSInitializeOperation(this);
return operation;
}
public virtual FSLoadPackageManifestOperation LoadPackageManifestAsync(string packageVersion, int timeout)
{
var operation = new TTFSLoadPackageManifestOperation(this, packageVersion, timeout);
return operation;
}
public virtual FSRequestPackageVersionOperation RequestPackageVersionAsync(bool appendTimeTicks, int timeout)
{
var operation = new TTFSRequestPackageVersionOperation(this, timeout);
return operation;
}
public virtual FSClearCacheFilesOperation ClearCacheFilesAsync(PackageManifest manifest, ClearCacheFilesOptions options)
{
var operation = new FSClearCacheFilesCompleteOperation();
return operation;
}
public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadFileOptions options)
{
options.MainURL = RemoteServices.GetRemoteMainURL(bundle.FileName);
options.FallbackURL = RemoteServices.GetRemoteFallbackURL(bundle.FileName);
var operation = new TTFSDownloadFileOperation(this, bundle, options);
return operation;
}
public virtual FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)
{
if (bundle.BundleType == (int)EBuildBundleType.AssetBundle)
{
var operation = new TTFSLoadBundleOperation(this, bundle);
return operation;
}
else
{
string error = $"{nameof(TiktokFileSystem)} not support load bundle type : {bundle.BundleType}";
var operation = new FSLoadBundleCompleteOperation(error);
return operation;
}
}
public virtual void SetParameter(string name, object value)
{
if (name == FileSystemParametersDefine.REMOTE_SERVICES)
{
RemoteServices = (IRemoteServices)value;
}
else if (name == FileSystemParametersDefine.DECRYPTION_SERVICES)
{
DecryptionServices = (IWebDecryptionServices)value;
}
else
{
YooLogger.Warning($"Invalid parameter : {name}");
}
}
public virtual void OnCreate(string packageName, string rootDirectory)
{
PackageName = packageName;
_ttCacheRoot = rootDirectory;
if (string.IsNullOrEmpty(_ttCacheRoot))
{
throw new System.Exception("请配置抖音小游戏的缓存根目录!");
}
// 注意CDN服务未启用的情况下使用抖音WEB服务器
if (RemoteServices == null)
{
string webRoot = PathUtility.Combine(Application.streamingAssetsPath, YooAssetSettingsData.Setting.DefaultYooFolderName, packageName);
RemoteServices = new WebRemoteServices(webRoot);
}
_fileSystemMgr = TT.GetFileSystemManager();
}
public virtual void OnDestroy()
{
}
public virtual bool Belong(PackageBundle bundle)
{
return true;
}
public virtual bool Exists(PackageBundle bundle)
{
return CheckCacheFileExist(bundle);
}
public virtual bool NeedDownload(PackageBundle bundle)
{
if (Belong(bundle) == false)
return false;
return Exists(bundle) == false;
}
public virtual bool NeedUnpack(PackageBundle bundle)
{
return false;
}
public virtual bool NeedImport(PackageBundle bundle)
{
return false;
}
public virtual string GetBundleFilePath(PackageBundle bundle)
{
return GetCacheFileLoadPath(bundle);
}
public virtual byte[] ReadBundleFileData(PackageBundle bundle)
{
if (CheckCacheFileExist(bundle))
{
string filePath = GetCacheFileLoadPath(bundle);
return _fileSystemMgr.ReadFileSync(filePath);
}
else
{
return Array.Empty<byte>();
}
}
public virtual string ReadBundleFileText(PackageBundle bundle)
{
if (CheckCacheFileExist(bundle))
{
string filePath = GetCacheFileLoadPath(bundle);
return _fileSystemMgr.ReadFileSync(filePath, "utf8");
}
else
{
return string.Empty;
}
}
#region
public TTFileSystemManager GetFileSystemMgr()
{
return _fileSystemMgr;
}
public bool CheckCacheFileExist(PackageBundle bundle)
{
string url = RemoteServices.GetRemoteMainURL(bundle.FileName);
return _fileSystemMgr.IsUrlCached(url);
}
private string GetCacheFileLoadPath(PackageBundle bundle)
{
if (_cacheFilePathMapping.TryGetValue(bundle.BundleGUID, out string filePath) == false)
{
filePath = _fileSystemMgr.GetLocalCachedPathForUrl(bundle.FileName);
_cacheFilePathMapping.Add(bundle.BundleGUID, filePath);
}
return filePath;
}
#endregion
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e6b4324eddc60f045aa271bc5bb50cc9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f0165bf1a62988a439ce3a00db043620
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b4c0dec5e8fae814eb7ac0299187e8f4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,67 +0,0 @@
#if UNITY_WEBGL && WEIXINMINIGAME
using System.IO;
using UnityEngine;
using UnityEngine.SceneManagement;
using WeChatWASM;
namespace YooAsset
{
internal class WXAssetBundleResult : BundleResult
{
private readonly IFileSystem _fileSystem;
private readonly PackageBundle _packageBundle;
private readonly AssetBundle _assetBundle;
public WXAssetBundleResult(IFileSystem fileSystem, PackageBundle packageBundle, AssetBundle assetBundle)
{
_fileSystem = fileSystem;
_packageBundle = packageBundle;
_assetBundle = assetBundle;
}
public override void UnloadBundleFile()
{
if (_assetBundle != null)
{
if (_packageBundle.Encrypted)
_assetBundle.Unload(true);
else
_assetBundle.WXUnload(true);
}
}
public override string GetBundleFilePath()
{
return _fileSystem.GetBundleFilePath(_packageBundle);
}
public override byte[] ReadBundleFileData()
{
return _fileSystem.ReadBundleFileData(_packageBundle);
}
public override string ReadBundleFileText()
{
return _fileSystem.ReadBundleFileText(_packageBundle);
}
public override FSLoadAssetOperation LoadAssetAsync(AssetInfo assetInfo)
{
var operation = new AssetBundleLoadAssetOperation(_packageBundle, _assetBundle, assetInfo);
return operation;
}
public override FSLoadAllAssetsOperation LoadAllAssetsAsync(AssetInfo assetInfo)
{
var operation = new AssetBundleLoadAllAssetsOperation(_packageBundle, _assetBundle, assetInfo);
return operation;
}
public override FSLoadSubAssetsOperation LoadSubAssetsAsync(AssetInfo assetInfo)
{
var operation = new AssetBundleLoadSubAssetsOperation(_packageBundle, _assetBundle, assetInfo);
return operation;
}
public override FSLoadSceneOperation LoadSceneOperation(AssetInfo assetInfo, LoadSceneParameters loadParams, bool suspendLoad)
{
var operation = new AssetBundleLoadSceneOperation(assetInfo, loadParams, suspendLoad);
return operation;
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 750c122b5d921aa4a9c882e21982ebd5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 85ec3f4c43303f74a9b9fa14288f9201
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,57 +0,0 @@
#if UNITY_WEBGL && WEIXINMINIGAME
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using YooAsset;
using WeChatWASM;
internal class WXFSClearAllBundleFilesOperation : FSClearCacheFilesOperation
{
private enum ESteps
{
None,
ClearAllCacheFiles,
WaitResult,
Done,
}
private readonly WechatFileSystem _fileSystem;
private ESteps _steps = ESteps.None;
internal WXFSClearAllBundleFilesOperation(WechatFileSystem fileSystem)
{
_fileSystem = fileSystem;
}
internal override void InternalStart()
{
_steps = ESteps.ClearAllCacheFiles;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.ClearAllCacheFiles)
{
_steps = ESteps.WaitResult;
WX.CleanAllFileCache((bool isOk) =>
{
if (isOk)
{
YooLogger.Log("微信缓存清理成功!");
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
}
else
{
YooLogger.Log("微信缓存清理失败!");
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "微信缓存清理失败!";
}
});
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d48600eb90915544586c0108b94cfd02
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,111 +0,0 @@
#if UNITY_WEBGL && WEIXINMINIGAME
using System.Collections.Generic;
using System.IO;
using System.Linq;
using YooAsset;
using WeChatWASM;
internal class WXFSClearUnusedBundleFilesAsync : FSClearCacheFilesOperation
{
private enum ESteps
{
None,
GetUnusedCacheFiles,
WaitingSearch,
ClearUnusedCacheFiles,
Done,
}
private readonly WechatFileSystem _fileSystem;
private readonly PackageManifest _manifest;
private List<string> _unusedCacheFiles = new List<string>(1000);
private int _unusedFileTotalCount = 0;
private ESteps _steps = ESteps.None;
internal WXFSClearUnusedBundleFilesAsync(WechatFileSystem fileSystem, PackageManifest manifest)
{
_fileSystem = fileSystem;
_manifest = manifest;
}
internal override void InternalStart()
{
_steps = ESteps.GetUnusedCacheFiles;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.GetUnusedCacheFiles)
{
_steps = ESteps.WaitingSearch;
// 说明__GAME_FILE_CACHE/yoo/ 目录下包含所有的资源文件和清单文件
var fileSystemMgr = _fileSystem.GetFileSystemMgr();
var statOption = new WXStatOption();
statOption.path = _fileSystem.FileRoot;
statOption.recursive = true;
statOption.success = (WXStatResponse response) =>
{
foreach (var fileStat in response.stats)
{
// 如果是目录文件
string fileExtension = Path.GetExtension(fileStat.path);
if (string.IsNullOrEmpty(fileExtension))
continue;
// 如果是资源清单
//TODO 默认的清单文件格式
if (fileExtension == ".bytes" || fileExtension == ".hash")
continue;
// 注意:适配不同的文件命名方式!
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileStat.path);
string bundleGUID = fileNameWithoutExtension.Split('_').Last();
if (_manifest.TryGetPackageBundleByBundleGUID(bundleGUID, out PackageBundle value) == false)
{
string filePath = _fileSystem.FileRoot + fileStat.path;
if (_unusedCacheFiles.Contains(filePath) == false)
_unusedCacheFiles.Add(filePath);
}
}
_steps = ESteps.ClearUnusedCacheFiles;
_unusedFileTotalCount = _unusedCacheFiles.Count;
YooLogger.Log($"Found unused cache files count : {_unusedFileTotalCount}");
};
statOption.fail = (WXStatResponse response) =>
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = response.errMsg;
};
fileSystemMgr.Stat(statOption);
}
if (_steps == ESteps.ClearUnusedCacheFiles)
{
for (int i = _unusedCacheFiles.Count - 1; i >= 0; i--)
{
string filePath = _unusedCacheFiles[i];
_unusedCacheFiles.RemoveAt(i);
WX.RemoveFile(filePath, null);
if (OperationSystem.IsBusy)
break;
}
if (_unusedFileTotalCount == 0)
Progress = 1.0f;
else
Progress = 1.0f - (_unusedCacheFiles.Count / _unusedFileTotalCount);
if (_unusedCacheFiles.Count == 0)
{
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
}
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e4938d8a5a9d7f24db37f8df6b32501f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,110 +0,0 @@
#if UNITY_WEBGL && WEIXINMINIGAME
using UnityEngine;
using UnityEngine.Networking;
using YooAsset;
using WeChatWASM;
internal class WXFSDownloadFileOperation : DefaultDownloadFileOperation
{
private WechatFileSystem _fileSystem;
private ESteps _steps = ESteps.None;
internal WXFSDownloadFileOperation(WechatFileSystem fileSystem, PackageBundle bundle, DownloadFileOptions options) : base(bundle, options)
{
_fileSystem = fileSystem;
}
internal override void InternalStart()
{
_steps = ESteps.CreateRequest;
}
internal override void InternalUpdate()
{
// 创建下载器
if (_steps == ESteps.CreateRequest)
{
// 获取请求地址
_requestURL = GetRequestURL();
// 重置变量
ResetRequestFiled();
// 创建下载器
CreateWebRequest();
_steps = ESteps.CheckRequest;
}
// 检测下载结果
if (_steps == ESteps.CheckRequest)
{
DownloadProgress = _webRequest.downloadProgress;
DownloadedBytes = (long)_webRequest.downloadedBytes;
Progress = DownloadProgress;
if (_webRequest.isDone == false)
{
//TODO 由于微信小游戏插件的问题,暂时不能判定超时!
// Issue : https://github.com/wechat-miniprogram/minigame-unity-webgl-transform/issues/108#
//CheckRequestTimeout();
return;
}
// 检查网络错误
if (CheckRequestResult())
{
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
//TODO 解决微信小游戏插件问题
// Issue : https://github.com/wechat-miniprogram/minigame-unity-webgl-transform/issues/108#
DownloadProgress = 1f;
DownloadedBytes = Bundle.FileSize;
Progress = 1f;
}
else
{
_steps = ESteps.TryAgain;
}
// 注意:最终释放请求器
DisposeWebRequest();
}
// 重新尝试下载
if (_steps == ESteps.TryAgain)
{
if (FailedTryAgain <= 0)
{
Status = EOperationStatus.Failed;
_steps = ESteps.Done;
YooLogger.Error(Error);
return;
}
_tryAgainTimer += Time.unscaledDeltaTime;
if (_tryAgainTimer > 1f)
{
FailedTryAgain--;
_steps = ESteps.CreateRequest;
YooLogger.Warning(Error);
}
}
}
private void CreateWebRequest()
{
_webRequest = UnityWebRequest.Get(_requestURL);
_webRequest.SetRequestHeader("wechatminigame-preload", "1");
_webRequest.disposeDownloadHandlerOnDispose = true;
_webRequest.SendWebRequest();
}
private void DisposeWebRequest()
{
if (_webRequest != null)
{
//注意引擎底层会自动调用Abort方法
_webRequest.Dispose();
_webRequest = null;
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e58c7876bd106e04380cbf4c00e8d584
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,20 +0,0 @@
#if UNITY_WEBGL && WEIXINMINIGAME
using YooAsset;
internal partial class WXFSInitializeOperation : FSInitializeFileSystemOperation
{
private readonly WechatFileSystem _fileSystem;
public WXFSInitializeOperation(WechatFileSystem fileSystem)
{
_fileSystem = fileSystem;
}
internal override void InternalStart()
{
Status = EOperationStatus.Succeed;
}
internal override void InternalUpdate()
{
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: a0c5566de97a44245b840bf388cdfbe0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,96 +0,0 @@
#if UNITY_WEBGL && WEIXINMINIGAME
using YooAsset;
internal class WXFSLoadBundleOperation : FSLoadBundleOperation
{
private enum ESteps
{
None,
DownloadAssetBundle,
Done,
}
private readonly WechatFileSystem _fileSystem;
private readonly PackageBundle _bundle;
private DownloadAssetBundleOperation _downloadAssetBundleOp;
private ESteps _steps = ESteps.None;
internal WXFSLoadBundleOperation(WechatFileSystem fileSystem, PackageBundle bundle)
{
_fileSystem = fileSystem;
_bundle = bundle;
}
internal override void InternalStart()
{
_steps = ESteps.DownloadAssetBundle;
}
internal override void InternalUpdate()
{
if (_steps == ESteps.None || _steps == ESteps.Done)
return;
if (_steps == ESteps.DownloadAssetBundle)
{
if (_downloadAssetBundleOp == null)
{
DownloadFileOptions options = new DownloadFileOptions(int.MaxValue, 60);
options.MainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName); ;
options.FallbackURL = _fileSystem.RemoteServices.GetRemoteFallbackURL(_bundle.FileName);
if (_bundle.Encrypted)
{
_downloadAssetBundleOp = new DownloadWebEncryptAssetBundleOperation(false, _fileSystem.DecryptionServices, _bundle, options);
_downloadAssetBundleOp.StartOperation();
AddChildOperation(_downloadAssetBundleOp);
}
else
{
_downloadAssetBundleOp = new DownloadWechatAssetBundleOperation(_bundle, options);
_downloadAssetBundleOp.StartOperation();
AddChildOperation(_downloadAssetBundleOp);
}
}
_downloadAssetBundleOp.UpdateOperation();
DownloadProgress = _downloadAssetBundleOp.DownloadProgress;
DownloadedBytes = (long)_downloadAssetBundleOp.DownloadedBytes;
Progress = DownloadProgress;
if (_downloadAssetBundleOp.IsDone == false)
return;
if (_downloadAssetBundleOp.Status == EOperationStatus.Succeed)
{
var assetBundle = _downloadAssetBundleOp.Result;
if (assetBundle == null)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = $"{nameof(DownloadAssetBundleOperation)} loaded asset bundle is null !";
}
else
{
_steps = ESteps.Done;
Result = new WXAssetBundleResult(_fileSystem, _bundle, assetBundle);
Status = EOperationStatus.Succeed;
}
}
else
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloadAssetBundleOp.Error;
}
}
}
internal override void InternalWaitForAsyncComplete()
{
if (_steps != ESteps.Done)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "WebGL platform not support sync load method !";
UnityEngine.Debug.LogError(Error);
}
}
}
#endif

Some files were not shown because too many files have changed in this diff Show More