diff --git a/Assets/Resources.meta b/Assets/Resources.meta
new file mode 100644
index 00000000..39e20f76
--- /dev/null
+++ b/Assets/Resources.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ad343207f6a994145a423b585bf47599
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/AssetLoad.meta b/Assets/Resources/AssetLoad.meta
new file mode 100644
index 00000000..e40c8ef0
--- /dev/null
+++ b/Assets/Resources/AssetLoad.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c6420e20cb89c84409df29e4b9715d9c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/AssetLoad/UILoad.prefab b/Assets/Resources/AssetLoad/UILoad.prefab
new file mode 100644
index 00000000..db7b16a9
--- /dev/null
+++ b/Assets/Resources/AssetLoad/UILoad.prefab
@@ -0,0 +1,100 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &8750341085829442500
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 6219407630702172851}
+ - component: {fileID: 3884336621553324141}
+ - component: {fileID: 6532236131487937402}
+ - component: {fileID: 6072749800057847719}
+ m_Layer: 0
+ m_Name: UIHotFix
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &6219407630702172851
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8750341085829442500}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 0, y: 0, z: 0}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0, y: 0}
+--- !u!223 &3884336621553324141
+Canvas:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8750341085829442500}
+ m_Enabled: 1
+ serializedVersion: 3
+ m_RenderMode: 0
+ m_Camera: {fileID: 0}
+ m_PlaneDistance: 100
+ m_PixelPerfect: 0
+ m_ReceivesEvents: 1
+ m_OverrideSorting: 0
+ m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
+ m_AdditionalShaderChannelsFlag: 1
+ m_SortingLayerID: 0
+ m_SortingOrder: 0
+ m_TargetDisplay: 0
+--- !u!114 &6532236131487937402
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8750341085829442500}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_UiScaleMode: 1
+ m_ReferencePixelsPerUnit: 100
+ m_ScaleFactor: 1
+ m_ReferenceResolution: {x: 1600, y: 900}
+ m_ScreenMatchMode: 0
+ m_MatchWidthOrHeight: 1
+ m_PhysicalUnit: 3
+ m_FallbackScreenDPI: 96
+ m_DefaultSpriteDPI: 96
+ m_DynamicPixelsPerUnit: 1
+--- !u!114 &6072749800057847719
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8750341085829442500}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_IgnoreReversedGraphics: 1
+ m_BlockingObjects: 0
+ m_BlockingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
diff --git a/Assets/Resources/AssetLoad/UILoad.prefab.meta b/Assets/Resources/AssetLoad/UILoad.prefab.meta
new file mode 100644
index 00000000..15e8ca8f
--- /dev/null
+++ b/Assets/Resources/AssetLoad/UILoad.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d6d710f0749bc734abe3d835ca0e56d9
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/AssetLoad/UILoadTip.prefab b/Assets/Resources/AssetLoad/UILoadTip.prefab
new file mode 100644
index 00000000..340b5c15
--- /dev/null
+++ b/Assets/Resources/AssetLoad/UILoadTip.prefab
@@ -0,0 +1,953 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &351492414620595271
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 5120598360611216442}
+ - component: {fileID: 3732377270272875816}
+ - component: {fileID: 8477119006727706704}
+ m_Layer: 5
+ m_Name: Mask
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &5120598360611216442
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 351492414620595271}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 4070374929253206932}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3732377270272875816
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 351492414620595271}
+ m_CullTransparentMesh: 0
+--- !u!114 &8477119006727706704
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 351492414620595271}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 0.19607843}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!1 &520509273288285055
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 3247927574776663183}
+ - component: {fileID: 645983327802647272}
+ - component: {fileID: 4219727438000553557}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &3247927574776663183
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 520509273288285055}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 467775921333773033}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &645983327802647272
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 520509273288285055}
+ m_CullTransparentMesh: 0
+--- !u!114 &4219727438000553557
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 520509273288285055}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: "\u53D6\u6D88"
+--- !u!1 &783755938430911476
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 467775921333773033}
+ - component: {fileID: 5824133473906924484}
+ - component: {fileID: 2073778946355818605}
+ - component: {fileID: 3131367135403148864}
+ m_Layer: 5
+ m_Name: BtnIgnore
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &467775921333773033
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 783755938430911476}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 3247927574776663183}
+ m_Father: {fileID: 928376975392745263}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 160, y: 51.622284}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &5824133473906924484
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 783755938430911476}
+ m_CullTransparentMesh: 0
+--- !u!114 &2073778946355818605
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 783755938430911476}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!114 &3131367135403148864
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 783755938430911476}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 2073778946355818605}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
+--- !u!1 &891574243056382250
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2973468776522536444}
+ - component: {fileID: 8063972175727103246}
+ - component: {fileID: 2466977151352647592}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2973468776522536444
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 891574243056382250}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 1387175525974173601}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &8063972175727103246
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 891574243056382250}
+ m_CullTransparentMesh: 0
+--- !u!114 &2466977151352647592
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 891574243056382250}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: "\u66F4\u65B0"
+--- !u!1 &1010219707791802372
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 928376975392745263}
+ - component: {fileID: 8463458875782522446}
+ m_Layer: 5
+ m_Name: Group
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &928376975392745263
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1010219707791802372}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 2745714441875214452}
+ - {fileID: 467775921333773033}
+ m_Father: {fileID: 4081528251189279610}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 0}
+ m_AnchorMax: {x: 0.5, y: 0}
+ m_AnchoredPosition: {x: 1.1, y: 63.769}
+ m_SizeDelta: {x: 780.35547, y: 89.57939}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &8463458875782522446
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1010219707791802372}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_ChildAlignment: 4
+ m_Spacing: 0
+ m_ChildForceExpandWidth: 1
+ m_ChildForceExpandHeight: 1
+ m_ChildControlWidth: 0
+ m_ChildControlHeight: 0
+ m_ChildScaleWidth: 0
+ m_ChildScaleHeight: 0
+ m_ReverseArrangement: 0
+--- !u!1 &5302583540007423649
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 9127528276671758327}
+ - component: {fileID: 6758812057621712415}
+ - component: {fileID: 1428100571973796269}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &9127528276671758327
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5302583540007423649}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 4081528251189279610}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
+ m_AnchoredPosition: {x: 3.44, y: 35.35}
+ m_SizeDelta: {x: 635.8416, y: 174.82127}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &6758812057621712415
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5302583540007423649}
+ m_CullTransparentMesh: 0
+--- !u!114 &1428100571973796269
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5302583540007423649}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.990566, g: 0.990566, b: 0.990566, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 20
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 2
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: "\u66F4\u65B0\u5185\u5BB9"
+--- !u!1 &5856746935986419628
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1387175525974173601}
+ - component: {fileID: 8764243048860429969}
+ - component: {fileID: 2753918907388885679}
+ - component: {fileID: 4052728381356402893}
+ m_Layer: 5
+ m_Name: BtnPackage
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1387175525974173601
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5856746935986419628}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 2973468776522536444}
+ m_Father: {fileID: 4081528251189279610}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
+ m_AnchoredPosition: {x: 0, y: -123}
+ m_SizeDelta: {x: 160, y: 51.622284}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &8764243048860429969
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5856746935986419628}
+ m_CullTransparentMesh: 0
+--- !u!114 &2753918907388885679
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5856746935986419628}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!114 &4052728381356402893
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5856746935986419628}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 2753918907388885679}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
+--- !u!1 &7523560891283723030
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4671620152714554425}
+ - component: {fileID: 3505031759991688881}
+ - component: {fileID: 6023906705680163797}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &4671620152714554425
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7523560891283723030}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 2745714441875214452}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3505031759991688881
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7523560891283723030}
+ m_CullTransparentMesh: 0
+--- !u!114 &6023906705680163797
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7523560891283723030}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: "\u786E\u5B9A"
+--- !u!1 &7666412045263395013
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4070374929253206932}
+ - component: {fileID: 7335129190267671948}
+ m_Layer: 5
+ m_Name: UILoadTip
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &4070374929253206932
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7666412045263395013}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 5120598360611216442}
+ - {fileID: 4081528251189279610}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &7335129190267671948
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7666412045263395013}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1d32acf4f4a006a4986b0c39320a1a99, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _btn_update: {fileID: 9100534761354987250}
+ _btn_ignore: {fileID: 3131367135403148864}
+ _btn_package: {fileID: 4052728381356402893}
+ _label_desc: {fileID: 1428100571973796269}
+ Showtype: 0
+--- !u!1 &8012535748721374403
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2745714441875214452}
+ - component: {fileID: 3790706703386386453}
+ - component: {fileID: 6090299446030196608}
+ - component: {fileID: 9100534761354987250}
+ m_Layer: 5
+ m_Name: BtnUpdate
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2745714441875214452
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8012535748721374403}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 4671620152714554425}
+ m_Father: {fileID: 928376975392745263}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 160, y: 51.622284}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3790706703386386453
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8012535748721374403}
+ m_CullTransparentMesh: 0
+--- !u!114 &6090299446030196608
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8012535748721374403}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!114 &9100534761354987250
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8012535748721374403}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 6090299446030196608}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
+--- !u!1 &9108663456504243039
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4081528251189279610}
+ - component: {fileID: 7910362769509927291}
+ - component: {fileID: 3866307299994406820}
+ m_Layer: 5
+ m_Name: BgImage
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &4081528251189279610
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9108663456504243039}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 1387175525974173601}
+ - {fileID: 9127528276671758327}
+ - {fileID: 928376975392745263}
+ m_Father: {fileID: 4070374929253206932}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
+ m_AnchoredPosition: {x: -0.000030518, y: 0.0000076294}
+ m_SizeDelta: {x: 824.3304, y: 373.5388}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &7910362769509927291
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9108663456504243039}
+ m_CullTransparentMesh: 0
+--- !u!114 &3866307299994406820
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9108663456504243039}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.16037738, g: 0.11120507, b: 0.11120507, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
diff --git a/Assets/Resources/AssetLoad/UILoadTip.prefab.meta b/Assets/Resources/AssetLoad/UILoadTip.prefab.meta
new file mode 100644
index 00000000..cafb5f6f
--- /dev/null
+++ b/Assets/Resources/AssetLoad/UILoadTip.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 617fd4393fcb12c45941d2a1850d998f
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/AssetLoad/UILoadUpdate.prefab b/Assets/Resources/AssetLoad/UILoadUpdate.prefab
new file mode 100644
index 00000000..5924519e
--- /dev/null
+++ b/Assets/Resources/AssetLoad/UILoadUpdate.prefab
@@ -0,0 +1,810 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &148945374222998995
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4652061626151979521}
+ - component: {fileID: 4022160420422240251}
+ - component: {fileID: 3123264760710792296}
+ m_Layer: 5
+ m_Name: Image
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &4652061626151979521
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 148945374222998995}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 1633508802563447727}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &4022160420422240251
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 148945374222998995}
+ m_CullTransparentMesh: 0
+--- !u!114 &3123264760710792296
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 148945374222998995}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 0.039215688}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!1 &952437499883445590
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2347891492826839465}
+ - component: {fileID: 3565553526528554398}
+ - component: {fileID: 1974897531047992226}
+ - component: {fileID: 2835083178279248017}
+ m_Layer: 5
+ m_Name: Scrollbar
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2347891492826839465
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 952437499883445590}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 947380016692030854}
+ m_Father: {fileID: 1633508802563447727}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 0}
+ m_AnchoredPosition: {x: -2.0999756, y: 81.70001}
+ m_SizeDelta: {x: -66.7251, y: 23.743}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3565553526528554398
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 952437499883445590}
+ m_CullTransparentMesh: 0
+--- !u!114 &1974897531047992226
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 952437499883445590}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!114 &2835083178279248017
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 952437499883445590}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 0.6981132, g: 0.14159843, b: 0.14159843, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 4296679187938450242}
+ m_HandleRect: {fileID: 3254196395727856927}
+ m_Direction: 0
+ m_Value: 0
+ m_Size: 0
+ m_NumberOfSteps: 0
+ m_OnValueChanged:
+ m_PersistentCalls:
+ m_Calls: []
+--- !u!1 &3947545286821712907
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1183389821019440696}
+ - component: {fileID: 5614918906260324741}
+ - component: {fileID: 8335614385525365205}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1183389821019440696
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3947545286821712907}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 4232232858152633415}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &5614918906260324741
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3947545286821712907}
+ m_CullTransparentMesh: 0
+--- !u!114 &8335614385525365205
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3947545286821712907}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: "\u6E05\u7A7A"
+--- !u!1 &3963657392457004041
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 8666815445422661327}
+ - component: {fileID: 3177628147056126464}
+ - component: {fileID: 625621492709539730}
+ m_Layer: 5
+ m_Name: Label_desc
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &8666815445422661327
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3963657392457004041}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 1633508802563447727}
+ m_RootOrder: 3
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 303, y: 34.91501}
+ m_SizeDelta: {x: 543.2495, y: 69.83}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3177628147056126464
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3963657392457004041}
+ m_CullTransparentMesh: 0
+--- !u!114 &625621492709539730
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3963657392457004041}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 0
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: "\u914D\u7F6E\u68C0\u6D4B\u4E2D"
+--- !u!1 &4459087193914342294
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4232232858152633415}
+ - component: {fileID: 5178926555052269669}
+ - component: {fileID: 6498306990646814329}
+ - component: {fileID: 8386797903619165155}
+ m_Layer: 5
+ m_Name: Btn_Clear
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &4232232858152633415
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4459087193914342294}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 1183389821019440696}
+ m_Father: {fileID: 1633508802563447727}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 1, y: 1}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: -115, y: -50}
+ m_SizeDelta: {x: 160, y: 52.299774}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &5178926555052269669
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4459087193914342294}
+ m_CullTransparentMesh: 0
+--- !u!114 &6498306990646814329
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4459087193914342294}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!114 &8386797903619165155
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4459087193914342294}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 6498306990646814329}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
+--- !u!1 &7836612998133337201
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 947380016692030854}
+ m_Layer: 5
+ m_Name: Sliding Area
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &947380016692030854
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7836612998133337201}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 3254196395727856927}
+ m_Father: {fileID: 2347891492826839465}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: -20, y: -20}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!1 &8067205018289099991
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 8143980099109665604}
+ - component: {fileID: 3256589533690080240}
+ - component: {fileID: 7408920366768410708}
+ m_Layer: 5
+ m_Name: Label_resid
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &8143980099109665604
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8067205018289099991}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 1633508802563447727}
+ m_RootOrder: 5
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 101, y: -82}
+ m_SizeDelta: {x: 160, y: 30}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3256589533690080240
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8067205018289099991}
+ m_CullTransparentMesh: 0
+--- !u!114 &7408920366768410708
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8067205018289099991}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 3
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text:
+--- !u!1 &8606204063644072871
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 3254196395727856927}
+ - component: {fileID: 7553620620009672016}
+ - component: {fileID: 4296679187938450242}
+ m_Layer: 5
+ m_Name: Handle
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &3254196395727856927
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8606204063644072871}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 947380016692030854}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 20, y: 20}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &7553620620009672016
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8606204063644072871}
+ m_CullTransparentMesh: 0
+--- !u!114 &4296679187938450242
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8606204063644072871}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!1 &9130266365217219149
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1633508802563447727}
+ - component: {fileID: 2330214789109181478}
+ m_Layer: 5
+ m_Name: UILoadUpdate
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1633508802563447727
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9130266365217219149}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 4652061626151979521}
+ - {fileID: 4232232858152633415}
+ - {fileID: 2347891492826839465}
+ - {fileID: 8666815445422661327}
+ - {fileID: 3038352660368000718}
+ - {fileID: 8143980099109665604}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &2330214789109181478
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9130266365217219149}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: f0fad7cbc10b815488c9e6ebfeccb210, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _btn_clear: {fileID: 8386797903619165155}
+ _obj_progress: {fileID: 2835083178279248017}
+ _label_desc: {fileID: 625621492709539730}
+ _label_appid: {fileID: 1355718662626521362}
+ _label_resid: {fileID: 7408920366768410708}
+--- !u!1 &9157096376857424144
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 3038352660368000718}
+ - component: {fileID: 6089926678751886717}
+ - component: {fileID: 1355718662626521362}
+ m_Layer: 5
+ m_Name: Label_appid
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &3038352660368000718
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9157096376857424144}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 1633508802563447727}
+ m_RootOrder: 4
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 100, y: -50}
+ m_SizeDelta: {x: 160, y: 30}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &6089926678751886717
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9157096376857424144}
+ m_CullTransparentMesh: 0
+--- !u!114 &1355718662626521362
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9157096376857424144}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 10
+ m_MaxSize: 40
+ m_Alignment: 3
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text:
diff --git a/Assets/Resources/AssetLoad/UILoadUpdate.prefab.meta b/Assets/Resources/AssetLoad/UILoadUpdate.prefab.meta
new file mode 100644
index 00000000..59322fae
--- /dev/null
+++ b/Assets/Resources/AssetLoad/UILoadUpdate.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 1c22fd02cc9da1040a2e71ceb8845e86
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scene/Launcher.unity b/Assets/Scene/Launcher.unity
new file mode 100644
index 00000000..42bb8cef
--- /dev/null
+++ b/Assets/Scene/Launcher.unity
@@ -0,0 +1,410 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_OcclusionBakeSettings:
+ smallestOccluder: 5
+ smallestHole: 0.25
+ backfaceThreshold: 100
+ m_SceneGUID: 00000000000000000000000000000000
+ m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 9
+ m_Fog: 0
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ m_FogMode: 3
+ m_FogDensity: 0.01
+ m_LinearFogStart: 0
+ m_LinearFogEnd: 300
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+ m_AmbientIntensity: 1
+ m_AmbientMode: 0
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+ m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
+ m_HaloStrength: 0.5
+ m_FlareStrength: 1
+ m_FlareFadeSpeed: 3
+ m_HaloTexture: {fileID: 0}
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+ m_DefaultReflectionMode: 0
+ m_DefaultReflectionResolution: 128
+ m_ReflectionBounces: 1
+ m_ReflectionIntensity: 1
+ m_CustomReflection: {fileID: 0}
+ m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
+ m_UseRadianceAmbientProbe: 0
+--- !u!157 &3
+LightmapSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 12
+ m_GIWorkflowMode: 1
+ m_GISettings:
+ serializedVersion: 2
+ m_BounceScale: 1
+ m_IndirectOutputScale: 1
+ m_AlbedoBoost: 1
+ m_EnvironmentLightingMode: 0
+ m_EnableBakedLightmaps: 1
+ m_EnableRealtimeLightmaps: 0
+ m_LightmapEditorSettings:
+ serializedVersion: 12
+ m_Resolution: 2
+ m_BakeResolution: 40
+ m_AtlasSize: 1024
+ m_AO: 0
+ m_AOMaxDistance: 1
+ m_CompAOExponent: 1
+ m_CompAOExponentDirect: 0
+ m_ExtractAmbientOcclusion: 0
+ m_Padding: 2
+ m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
+ m_TextureCompression: 1
+ m_FinalGather: 0
+ m_FinalGatherFiltering: 1
+ m_FinalGatherRayCount: 256
+ m_ReflectionCompression: 2
+ m_MixedBakeMode: 2
+ m_BakeBackend: 1
+ m_PVRSampling: 1
+ m_PVRDirectSampleCount: 32
+ m_PVRSampleCount: 512
+ m_PVRBounces: 2
+ m_PVREnvironmentSampleCount: 256
+ m_PVREnvironmentReferencePointCount: 2048
+ m_PVRFilteringMode: 1
+ m_PVRDenoiserTypeDirect: 1
+ m_PVRDenoiserTypeIndirect: 1
+ m_PVRDenoiserTypeAO: 1
+ m_PVRFilterTypeDirect: 0
+ m_PVRFilterTypeIndirect: 0
+ m_PVRFilterTypeAO: 0
+ m_PVREnvironmentMIS: 1
+ m_PVRCulling: 1
+ m_PVRFilteringGaussRadiusDirect: 1
+ m_PVRFilteringGaussRadiusIndirect: 5
+ m_PVRFilteringGaussRadiusAO: 2
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
+ m_PVRFilteringAtrousPositionSigmaAO: 1
+ m_ExportTrainingData: 0
+ m_TrainingDataDestination: TrainingData
+ m_LightProbeSampleCountMultiplier: 4
+ m_LightingDataAsset: {fileID: 0}
+ m_LightingSettings: {fileID: 0}
+--- !u!196 &4
+NavMeshSettings:
+ serializedVersion: 2
+ m_ObjectHideFlags: 0
+ m_BuildSettings:
+ serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.4
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ maxJobWorkers: 0
+ preserveTilesOutsideBounds: 0
+ debug:
+ m_Flags: 0
+ m_NavMeshData: {fileID: 0}
+--- !u!1 &1228007633
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1228007636}
+ - component: {fileID: 1228007635}
+ - component: {fileID: 1228007634}
+ m_Layer: 0
+ m_Name: Main Camera
+ m_TagString: MainCamera
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!81 &1228007634
+AudioListener:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1228007633}
+ m_Enabled: 1
+--- !u!20 &1228007635
+Camera:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1228007633}
+ m_Enabled: 1
+ serializedVersion: 2
+ m_ClearFlags: 2
+ m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
+ m_projectionMatrixMode: 1
+ m_GateFitMode: 2
+ m_FOVAxisMode: 0
+ m_SensorSize: {x: 36, y: 24}
+ m_LensShift: {x: 0, y: 0}
+ m_FocalLength: 50
+ m_NormalizedViewPortRect:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ near clip plane: 0.3
+ far clip plane: 1000
+ field of view: 60
+ orthographic: 0
+ orthographic size: 5
+ m_Depth: -1
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_RenderingPath: -1
+ m_TargetTexture: {fileID: 0}
+ m_TargetDisplay: 0
+ m_TargetEye: 3
+ m_HDR: 1
+ m_AllowMSAA: 1
+ m_AllowDynamicResolution: 0
+ m_ForceIntoRT: 0
+ m_OcclusionCulling: 1
+ m_StereoConvergence: 10
+ m_StereoSeparation: 0.022
+--- !u!4 &1228007636
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1228007633}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 1, z: -10}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1259512237
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1259512239}
+ - component: {fileID: 1259512238}
+ m_Layer: 0
+ m_Name: Directional Light
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!108 &1259512238
+Light:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1259512237}
+ m_Enabled: 1
+ serializedVersion: 10
+ m_Type: 1
+ m_Shape: 0
+ m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
+ m_Intensity: 1
+ m_Range: 10
+ m_SpotAngle: 30
+ m_InnerSpotAngle: 21.80208
+ m_CookieSize: 10
+ m_Shadows:
+ m_Type: 2
+ m_Resolution: -1
+ m_CustomResolution: -1
+ m_Strength: 1
+ m_Bias: 0.05
+ m_NormalBias: 0.4
+ m_NearPlane: 0.2
+ m_CullingMatrixOverride:
+ e00: 1
+ e01: 0
+ e02: 0
+ e03: 0
+ e10: 0
+ e11: 1
+ e12: 0
+ e13: 0
+ e20: 0
+ e21: 0
+ e22: 1
+ e23: 0
+ e30: 0
+ e31: 0
+ e32: 0
+ e33: 1
+ m_UseCullingMatrixOverride: 0
+ m_Cookie: {fileID: 0}
+ m_DrawHalo: 0
+ m_Flare: {fileID: 0}
+ m_RenderMode: 0
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_RenderingLayerMask: 1
+ m_Lightmapping: 4
+ m_LightShadowCasterMode: 0
+ m_AreaSize: {x: 1, y: 1}
+ m_BounceIntensity: 1
+ m_ColorTemperature: 6570
+ m_UseColorTemperature: 0
+ m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
+ m_UseBoundingSphereOverride: 0
+ m_UseViewFrustumForShadowCasterCull: 1
+ m_ShadowRadius: 0
+ m_ShadowAngle: 0
+--- !u!4 &1259512239
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1259512237}
+ m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
+ m_LocalPosition: {x: 0, y: 3, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
+--- !u!1 &1350514827
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1350514830}
+ - component: {fileID: 1350514829}
+ - component: {fileID: 1350514828}
+ m_Layer: 0
+ m_Name: EventSystem
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &1350514828
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1350514827}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_HorizontalAxis: Horizontal
+ m_VerticalAxis: Vertical
+ m_SubmitButton: Submit
+ m_CancelButton: Cancel
+ m_InputActionsPerSecond: 10
+ m_RepeatDelay: 0.5
+ m_ForceModuleActive: 0
+--- !u!114 &1350514829
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1350514827}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_FirstSelected: {fileID: 0}
+ m_sendNavigationEvents: 1
+ m_DragThreshold: 10
+--- !u!4 &1350514830
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1350514827}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 3
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1746242866
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1746242867}
+ - component: {fileID: 1746242868}
+ m_Layer: 0
+ m_Name: Launcher
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1746242867
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1746242866}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &1746242868
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1746242866}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: c0cf65cac27fea44bbeda946bbb14abd, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
diff --git a/Assets/Scene/Launcher.unity.meta b/Assets/Scene/Launcher.unity.meta
new file mode 100644
index 00000000..dbedc1b0
--- /dev/null
+++ b/Assets/Scene/Launcher.unity.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a3d60f4c16cf2ce4f88aa378cd0d8a0e
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Editor/UI/UIStyleSkin.guiskin b/Assets/TEngine/Editor/UI/UIStyleSkin.guiskin
new file mode 100644
index 00000000..b09f57d2
--- /dev/null
+++ b/Assets/TEngine/Editor/UI/UIStyleSkin.guiskin
@@ -0,0 +1,1428 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 1
+ m_Script: {fileID: 12001, guid: 0000000000000000e000000000000000, type: 0}
+ m_Name: UIStyleSkin
+ m_EditorClassIdentifier:
+ m_Font: {fileID: 0}
+ m_box:
+ m_Name: box
+ m_Normal:
+ m_Background: {fileID: 11001, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 6
+ m_Right: 6
+ m_Top: 6
+ m_Bottom: 6
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 1
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_button:
+ m_Name: button
+ m_Normal:
+ m_Background: {fileID: 2800000, guid: a6f057ef5d30fba4b9c4b79107a49c7a, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.8584906, g: 0.48150444, b: 0.0040494935, a: 1}
+ m_Hover:
+ m_Background: {fileID: 2800000, guid: a6f057ef5d30fba4b9c4b79107a49c7a, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 0.8705883, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 2800000, guid: a6f057ef5d30fba4b9c4b79107a49c7a, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 0.2596303, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 11005, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 11004, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 11002, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 6
+ m_Right: 6
+ m_Top: 6
+ m_Bottom: 4
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 6
+ m_Right: 6
+ m_Top: 3
+ m_Bottom: 3
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 14
+ m_FontStyle: 0
+ m_Alignment: 4
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_toggle:
+ m_Name: toggle
+ m_Normal:
+ m_Background: {fileID: 11018, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Hover:
+ m_Background: {fileID: 11014, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Active:
+ m_Background: {fileID: 11013, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 11016, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.8901961, g: 0.8901961, b: 0.8901961, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 11015, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 11017, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 14
+ m_Right: 0
+ m_Top: 14
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 15
+ m_Right: 0
+ m_Top: 3
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: -1
+ m_Right: 0
+ m_Top: -4
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_label:
+ m_Name: label
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.5188679, g: 0.31083125, b: 0.31083125, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 3
+ m_Bottom: 3
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 15
+ m_FontStyle: 0
+ m_Alignment: 3
+ m_WordWrap: 1
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_textField:
+ m_Name: textfield
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.01886791, g: 0.01886791, b: 0.01886791, a: 1}
+ m_Hover:
+ m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.01886791, g: 0.017888915, b: 0.017888915, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 3
+ m_Right: 3
+ m_Top: 3
+ m_Bottom: 3
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 3
+ m_WordWrap: 0
+ m_RichText: 0
+ m_TextClipping: 1
+ m_ImagePosition: 3
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 200
+ m_FixedHeight: 0
+ m_StretchWidth: 0
+ m_StretchHeight: 0
+ m_textArea:
+ m_Name: textarea
+ m_Normal:
+ m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1}
+ m_Hover:
+ m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 3
+ m_Right: 3
+ m_Top: 3
+ m_Bottom: 3
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 1
+ m_RichText: 0
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_window:
+ m_Name: window
+ m_Normal:
+ m_Background: {fileID: 11023, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 11022, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 8
+ m_Right: 8
+ m_Top: 18
+ m_Bottom: 8
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 10
+ m_Right: 10
+ m_Top: 20
+ m_Bottom: 10
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 1
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: -18}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_horizontalSlider:
+ m_Name: horizontalslider
+ m_Normal:
+ m_Background: {fileID: 11009, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 3
+ m_Right: 3
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: -1
+ m_Right: -1
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: -2
+ m_Bottom: -3
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 2
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 12
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_horizontalSliderThumb:
+ m_Name: horizontalsliderthumb
+ m_Normal:
+ m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 7
+ m_Right: 7
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: -1
+ m_Right: -1
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 2
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 12
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_verticalSlider:
+ m_Name: verticalslider
+ m_Normal:
+ m_Background: {fileID: 11021, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 3
+ m_Bottom: 3
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: -1
+ m_Bottom: -1
+ m_Overflow:
+ m_Left: -2
+ m_Right: -3
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 0
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 12
+ m_FixedHeight: 0
+ m_StretchWidth: 0
+ m_StretchHeight: 1
+ m_verticalSliderThumb:
+ m_Name: verticalsliderthumb
+ m_Normal:
+ m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 7
+ m_Bottom: 7
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: -1
+ m_Bottom: -1
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 12
+ m_FixedHeight: 0
+ m_StretchWidth: 0
+ m_StretchHeight: 1
+ m_horizontalScrollbar:
+ m_Name: horizontalscrollbar
+ m_Normal:
+ m_Background: {fileID: 11008, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 9
+ m_Right: 9
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 1
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 2
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 15
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_horizontalScrollbarThumb:
+ m_Name: horizontalscrollbarthumb
+ m_Normal:
+ m_Background: {fileID: 11007, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 6
+ m_Right: 6
+ m_Top: 6
+ m_Bottom: 6
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 6
+ m_Right: 6
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: -1
+ m_Bottom: 1
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 13
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_horizontalScrollbarLeftButton:
+ m_Name: horizontalscrollbarleftbutton
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_horizontalScrollbarRightButton:
+ m_Name: horizontalscrollbarrightbutton
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_verticalScrollbar:
+ m_Name: verticalscrollbar
+ m_Normal:
+ m_Background: {fileID: 11020, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 9
+ m_Bottom: 9
+ m_Margin:
+ m_Left: 1
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 1
+ m_Bottom: 1
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 15
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_verticalScrollbarThumb:
+ m_Name: verticalscrollbarthumb
+ m_Normal:
+ m_Background: {fileID: 11019, guid: 0000000000000000e000000000000000, type: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 6
+ m_Right: 6
+ m_Top: 6
+ m_Bottom: 6
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 6
+ m_Bottom: 6
+ m_Overflow:
+ m_Left: -1
+ m_Right: -1
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 2
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 15
+ m_FixedHeight: 0
+ m_StretchWidth: 0
+ m_StretchHeight: 1
+ m_verticalScrollbarUpButton:
+ m_Name: verticalscrollbarupbutton
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_verticalScrollbarDownButton:
+ m_Name: verticalscrollbardownbutton
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_ScrollView:
+ m_Name: scrollview
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 1}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 0
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
+ m_CustomStyles:
+ - m_Name: Sublabel
+ m_Normal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.24528301, g: 0.18164827, b: 0.18164827, a: 0}
+ m_Hover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 0}
+ m_Active:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 0}
+ m_Focused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 0}
+ m_OnNormal:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0.11320752, g: 0.0710217, b: 0.0710217, a: 0}
+ m_OnHover:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 0}
+ m_OnActive:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 0}
+ m_OnFocused:
+ m_Background: {fileID: 0}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 0, g: 0, b: 0, a: 0}
+ m_Border:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 30
+ m_FontStyle: 0
+ m_Alignment: 3
+ m_WordWrap: 0
+ m_RichText: 0
+ m_TextClipping: 0
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 0
+ m_StretchHeight: 0
+ m_Settings:
+ m_DoubleClickSelectsWord: 1
+ m_TripleClickSelectsLine: 1
+ m_CursorColor: {r: 1, g: 1, b: 1, a: 1}
+ m_CursorFlashSpeed: -1
+ m_SelectionColor: {r: 1, g: 0.38403907, b: 0, a: 0.7}
diff --git a/Assets/TEngine/Editor/UI/UIStyleSkin.guiskin.meta b/Assets/TEngine/Editor/UI/UIStyleSkin.guiskin.meta
new file mode 100644
index 00000000..91490a95
--- /dev/null
+++ b/Assets/TEngine/Editor/UI/UIStyleSkin.guiskin.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cb91232a4fb2efd47b8d8b4da4f22229
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Core/CoroutineUtility.cs b/Assets/TEngine/Runtime/Core/CoroutineUtility.cs
new file mode 100644
index 00000000..9602869e
--- /dev/null
+++ b/Assets/TEngine/Runtime/Core/CoroutineUtility.cs
@@ -0,0 +1,82 @@
+using System.Collections;
+using UnityEngine;
+
+namespace TEngine
+{
+ public class CoroutineUtility
+ {
+ private static GameObject _entity;
+ private static MonoBehaviour _behaviour;
+
+ ///
+ /// 开始协程
+ ///
+ /// 对应的迭代器
+ ///
+ public static Coroutine StartCoroutine(IEnumerator routine)
+ {
+ if (routine == null)
+ {
+ return null;
+ }
+
+ _MakeEntity();
+ return _behaviour.StartCoroutine(routine);
+ }
+
+ ///
+ /// 停止协程
+ ///
+ ///
+ public static void StopCoroutine(Coroutine routine)
+ {
+ if (routine == null)
+ return;
+
+ if (_entity != null)
+ {
+ _behaviour.StopCoroutine(routine);
+ routine = null;
+ }
+ }
+
+ ///
+ /// 停掉所有的协程
+ ///
+ public static void StopAllCoroutines()
+ {
+ if (_entity != null)
+ {
+ _behaviour.StopAllCoroutines();
+ }
+ }
+
+ private static void _MakeEntity()
+ {
+ if (_entity != null)
+ {
+ return;
+ }
+
+ _entity = new GameObject("__coroutine__")
+ {
+ hideFlags = HideFlags.HideAndDontSave
+ };
+ _entity.SetActive(true);
+
+#if UNITY_EDITOR
+ if (Application.isPlaying)
+#endif
+ {
+ Object.DontDestroyOnLoad(_entity);
+ }
+ UnityEngine.Assertions.Assert.IsFalse(_behaviour);
+ _behaviour = _entity.AddComponent();
+ }
+
+ private class MainBehaviour : MonoBehaviour
+ {
+
+ }
+ }
+}
diff --git a/Assets/TEngine/Runtime/Core/CoroutineUtility.cs.meta b/Assets/TEngine/Runtime/Core/CoroutineUtility.cs.meta
new file mode 100644
index 00000000..0f4321ff
--- /dev/null
+++ b/Assets/TEngine/Runtime/Core/CoroutineUtility.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6da5c0d609664a44cb9634c48ad4b269
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Core/GameConfig.cs b/Assets/TEngine/Runtime/Core/GameConfig.cs
index 86af97ed..07d03089 100644
--- a/Assets/TEngine/Runtime/Core/GameConfig.cs
+++ b/Assets/TEngine/Runtime/Core/GameConfig.cs
@@ -420,5 +420,13 @@ namespace TEngine
return path;
}
}
+
+ ///
+ /// 设置重新安装了
+ ///
+ internal void SignReInstall()
+ {
+
+ }
}
}
diff --git a/Assets/TEngine/Runtime/FileSystem/FileSystem.cs b/Assets/TEngine/Runtime/FileSystem/FileSystem.cs
index 8dfcd092..ecb66077 100644
--- a/Assets/TEngine/Runtime/FileSystem/FileSystem.cs
+++ b/Assets/TEngine/Runtime/FileSystem/FileSystem.cs
@@ -42,6 +42,13 @@ namespace TEngine
public const string AssetBundleBuildPath = BuildPath + "/AssetBundles";
private const string AssetBundleTargetPath = "{0}/AssetBundles";
public const string Md5List = "Md5List.json";
+ public const string AssetFolder = "AssetLoad";
+ //加压缩日志列表
+ public const string Md5VerifyLog = "Md5VerifyText.txt";
+
+ public const string FirstPackageName = "First.zip";
+ public const string DllScriptPkgName = "Script.bin";
+ public const string DllScriptPkgBackUpName = "ScriptBackUp.bin";
///
/// 资源更新读取根目录
///
@@ -220,5 +227,15 @@ namespace TEngine
return www.downloadHandler.text;
}
+
+ public static string OldPersistentDataPath
+ {
+ get
+ {
+ string path = Application.persistentDataPath;
+
+ return path.FixPath();
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs b/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs
new file mode 100644
index 00000000..c322499c
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs
@@ -0,0 +1,200 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using Newtonsoft.Json;
+using UnityEditor;
+using UnityEngine;
+using UnityEngine.Networking;
+using TEngine;
+
+namespace TEngine.UIEditor
+{
+ public class LoadStyle : MonoBehaviour
+ {
+ private const string ConfigPath = "UIStyle/Style.json";
+
+ public enum StyleEnum
+ {
+ Style_Default = 0, //Ĭ
+ Style_QuitApp = 1, //˳Ӧ
+ Style_RestartApp = 2, //Ӧ
+ Style_Retry = 3, //
+ Style_StartUpdate_Notice = 4,//ʾ
+ Style_DownLoadApk = 5, //صװ
+ Style_Clear = 6, //ͻ
+ Style_DownZip = 7, //ѹ
+ }
+
+ public enum BtnEnum
+ {
+ BtnOK = 0, //ȷť
+ BtnIgnore = 1,//ȡť
+ BtnOther = 2, //ť
+ }
+
+ ///
+ /// ťʽ
+ ///
+ private class StyleItem
+ {
+ public Alignment Align; //䷽ʽ
+ public bool Show; //Ƿ
+ public string Desc; //ť
+ }
+ ///
+ /// 뷽ʽ
+ ///
+ private enum Alignment
+ {
+ Left = 0,
+ Middle = 1,
+ Right = 2
+ }
+#if UNITY_EDITOR
+ private static string[] Desc = {"","˳Ӧõʽ",
+ "Ӧõʽ",
+ "Եʽ",
+ "ȸʾʽ",
+ "װصʽ",
+ "Դʽ",
+ "ѹصʽ"};
+ private static string[] Btn = { "ȷť", "ȡť", "ť" };
+ private static Dictionary> loadEditorConfig = null;
+ private static GUISkin _guiSkin;
+ private static Vector2 vecScroll = new Vector2(0, 0);
+
+ [MenuItem("TEngine/UITipʽ")]
+ private static void Open()
+ {
+ _guiSkin = AssetDatabase.LoadAssetAtPath("Assets/TEngine/Editor/UI/UIStyleSkin.guiskin");
+ var window = EditorWindow.GetWindow(typeof(CustomMessageBox), true, "UITipsʽ") as CustomMessageBox;
+ if (window == null) return;
+
+ window.minSize = new Vector2(500, 560);
+ window.maxSize = new Vector2(500, 560);
+ window.Show();
+
+ string url = $"{Application.dataPath}/TResources/{ConfigPath}";
+ if (!String.IsNullOrEmpty(url))
+ {
+ string finalPath;
+#if UNITY_ANDROID
+ if (url.StartsWith(Application.persistentDataPath))
+ url = $"file://{url}";
+#elif UNITY_IOS
+ if (url.StartsWith(Application.persistentDataPath)||url.StartsWith(Application.streamingAssetsPath))
+ url = $"file://{url}";
+#endif
+ UnityWebRequest www = UnityWebRequest.Get(url);
+ UnityWebRequestAsyncOperation request = www.SendWebRequest();
+ while (!request.isDone)
+ {
+ }
+
+ if (!String.IsNullOrEmpty(www.downloadHandler.text))
+ {
+ loadEditorConfig =
+ JsonConvert.DeserializeObject>>(
+ www.downloadHandler.text);
+ }
+
+ www.Dispose();
+ }
+ window.OnGUIFunc = () =>
+ {
+ EditorGUILayout.BeginHorizontal();
+ if (loadEditorConfig != null)
+ {
+ EditorGUILayout.BeginVertical(EditorStyles.helpBox);
+ vecScroll = GUILayout.BeginScrollView(vecScroll, false, true);
+ foreach (var item in loadEditorConfig)
+ {
+ EditorGUILayout.BeginVertical(EditorStyles.helpBox);
+ GUILayout.Label(Desc[(int)item.Key] + ":", _guiSkin.label);
+ foreach (var subitem in item.Value)
+ {
+ EditorGUILayout.BeginVertical(EditorStyles.helpBox);
+ GUILayout.Label(Btn[(int)subitem.Key]);
+ EditorGUILayout.BeginHorizontal();
+ GUILayout.Label("룺", GUILayout.Width(35));
+ subitem.Value.Align = (Alignment)EditorGUILayout.Popup((int)subitem.Value.Align, new string[] { "Left", "Middle", "Right" }, GUILayout.Width(100));
+ EditorGUILayout.EndHorizontal();
+ GUILayout.Space(2);
+ subitem.Value.Show = GUILayout.Toggle(subitem.Value.Show, "Ƿʾ");
+ GUILayout.Space(2);
+ EditorGUILayout.BeginHorizontal();
+ GUILayout.Label("", GUILayout.Width(35));
+ subitem.Value.Desc = EditorGUILayout.TextField(subitem.Value.Desc, GUILayout.Width(150));
+ EditorGUILayout.EndHorizontal();
+ EditorGUILayout.EndVertical();
+ }
+ EditorGUILayout.EndVertical();
+ GUILayout.Space(2);
+ }
+ GUILayout.EndScrollView();
+
+ if (GUILayout.Button(""))
+ {
+ try
+ {
+ string result = JsonConvert.SerializeObject(loadEditorConfig);
+ string dir = $"{Application.dataPath}/TResources/UIStyle/";
+ if (!Directory.Exists(dir))
+ {
+ Directory.CreateDirectory(dir);
+ }
+
+ File.WriteAllText(url, result);
+ Debug.Log("ɹ·" + url);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
+
+ EditorGUILayout.EndVertical();
+
+ }
+ return 0;
+ };
+ }
+ #region ༭
+ public class CustomMessageBox : EditorWindow
+ {
+ public delegate void OnWindowClose(int button, int returnValue);
+ public string Info = string.Empty;
+ public Func OnGUIFunc;
+ public OnWindowClose OnClose;
+ public string[] Buttons = null;
+ public int ReturnValue;
+ int _CloseButton = -1;
+
+ public void OnDestroy()
+ {
+ if (OnClose != null)
+ {
+ try
+ {
+ OnClose(_CloseButton, ReturnValue);
+ }
+ catch (Exception e)
+ {
+ Debug.LogException(e);
+ }
+ }
+ }
+
+ public void OnGUI()
+ {
+ if (OnGUIFunc != null)
+ {
+ ReturnValue = OnGUIFunc();
+ }
+ }
+ }
+ #endregion
+#endif
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs.meta
new file mode 100644
index 00000000..932a7b57
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e2f2a62a0258974468bfe8ab2fccd5f6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs
new file mode 100644
index 00000000..e030cc1e
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs
@@ -0,0 +1,427 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading;
+using UnityEngine;
+using UnityEngine.Networking;
+
+namespace TEngine
+{
+ public class FileunzipManager
+ {
+ private static FileunzipManager _instance;
+ #region FastUnZip
+ //快速解压的方法
+ private Thread _unpackThread;
+ private List _zipPath;
+ private string _unzipPath;
+ private readonly ulong[] _progress = { 0 };
+ private int _fileIndex;
+ private string _fileDir = "";
+ private long _currentBuffSize;
+ private int Max = 0;
+ private bool _bussiness;
+ private bool _unpackresult;
+
+ public static FileunzipManager Instance => _instance ?? (_instance = new FileunzipManager());
+ ///
+ /// 设置版本回退
+ ///
+ ///
+ public void ResetVersionCount(int count)
+ {
+ Max = count;
+ }
+
+ ///
+ /// 解压缩
+ ///
+ /// 压缩包的地址
+ /// 解压的路径
+ public void StartFastUnZip(List zippath, string dir, string unzippath)
+ {
+ _zipPath = zippath;
+ _unzipPath = unzippath;
+ _fileDir = dir;
+
+ if (_zipPath == null || zippath.Count <= 0)
+ return;
+
+ if (string.IsNullOrEmpty(_unzipPath))
+ return;
+
+ if (_unpackThread != null)
+ {
+ Finish();
+ }
+
+ _bussiness = true;
+ _progress[0] = 0;
+ _fileIndex = 0;
+ _currentBuffSize = 0;
+ _unpackThread = new Thread(FastUnPack);
+ _unpackThread.Start();
+ }
+
+ private void FastUnPack()
+ {
+ _unpackresult = true;
+ var oldersVersion = GetOldestVersion(_fileDir);
+ for (var i = 0; i < _zipPath.Count; i++)
+ {
+ if (_zipPath[i].Url == null)
+ {
+ _fileIndex++;
+ continue;
+ }
+
+ var targetPath = VersionCheck(_zipPath[_fileIndex].Url, _fileDir, oldersVersion);
+ int result = FastZip.decompress_File($"{_fileDir}/{_zipPath[_fileIndex].Url}", targetPath, null, null, _progress);
+ if (result != 1)
+ {
+ break;
+ }
+
+ if (!VerifyMd5(targetPath))
+ {
+ break;
+ }
+
+ if (!BackUpCurrentVersionDll(targetPath))
+ {
+ break;
+ }
+
+ _currentBuffSize += (long)_progress[0];
+ _fileIndex++;
+ }
+
+ _unpackresult = _fileIndex >= _zipPath.Count;
+ Finish();
+ }
+
+ ///
+ /// 备份当前版本需要的dll
+ ///
+ private bool BackUpCurrentVersionDll(string path)
+ {
+#if UNITY_EDITOR
+ return true;
+#endif
+#if ENABLE_MONO
+ var sourcePath = $"{FileSystem.ResourceRoot}/{FileSystem.DllScriptPkgName}";
+ if (!File.Exists(sourcePath))
+ {
+ TLogger.LogError($"不存在dll,path:{sourcePath}");
+ return true;
+ }
+
+ var targetDll = $"{path}/{FileSystem.DllScriptPkgName}";
+ if (sourcePath == targetDll)
+ {
+ //将母包的dll备份
+ File.Copy(sourcePath, $"{FileSystem.ResourceRoot}/{FileSystem.DllScriptPkgBackUpName}", true);
+ return true;
+ }
+
+ if (!File.Exists(targetDll))
+ {
+ if (File.Exists(sourcePath))
+ {
+ File.Copy(sourcePath, targetDll, true);
+ }
+ else
+ {
+ TLogger.LogError("FileunzipManager.BackUpCurrentVersionDll, File not exit,dllPath:" + sourcePath);
+ return false;
+ }
+ }
+ else
+ {
+ File.Copy(targetDll, sourcePath, true);
+ }
+
+ return true;
+#else
+ TLogger.LogInfo("非mono版本不需要备份");
+ return true;
+#endif
+ }
+
+ ///
+ /// 拷贝dll到内部目录
+ /// 临时方法,后面转il2cpp编译就去掉了
+ ///
+ ///
+ public void CopyMonoAssembly(string version)
+ {
+#if UNITY_EDITOR
+ return;
+#endif
+#if ENABLE_MONO
+ var source_path = GameConfig.Instance.FilePath($"{FileSystem.ResourceRoot}/{FileSystem.DllScriptPkgName}");
+ var des_path = $"{FileSystem.OldPersistentDataPath}/{FileSystem.DllScriptPkgName}";
+ TLogger.LogInfo($"FileUnZip.CopyMonoAssembly,source_path:{source_path}");
+ TLogger.LogInfo($"FileUnZip.CopyMonoAssembly,des_path:{des_path}");
+ if (File.Exists(des_path))
+ {
+ File.SetAttributes(des_path, FileAttributes.Normal);
+ }
+
+ if (File.Exists(source_path))
+ {
+ File.SetAttributes(source_path, FileAttributes.Normal);
+ File.Copy(source_path, des_path, true);
+ }
+#endif
+ }
+
+ public void BackDllInStream()
+ {
+#if UNITY_EDITOR
+ return;
+#endif
+#if ENABLE_MONO
+ //打dll备份出来,为了兼容dll更新,以防止以后又需要dll更新了
+ var sourcePath = $"{FileSystem.ResourceRoot}/{FileSystem.DllScriptPkgName}";
+ string dllInStream = $"{FileSystem.ResourceRootInStreamAsset}/{FileSystem.DllScriptPkgName}";
+ TLogger.LogInfo($"Copy dll from {dllInStream} to {sourcePath}");
+ var www = UnityWebRequest.Get(dllInStream);
+ var dh = new DownloadHandlerFile(sourcePath) { removeFileOnAbort = true };
+ www.downloadHandler = dh;
+ www.SendWebRequest();
+ while (!www.isDone)
+ {
+ if (www.isHttpError || www.isNetworkError)
+ {
+ TLogger.LogInfo("FileUnzipManager.BackDllInStream,not found dll");
+ return;
+ }
+ }
+ File.Copy(sourcePath, $"{FileSystem.ResourceRoot}/{FileSystem.DllScriptPkgBackUpName}", true);
+ File.Copy(sourcePath, $"{FileSystem.OldPersistentDataPath}/{FileSystem.DllScriptPkgName}", true);
+#endif
+ }
+
+ ///
+ /// 版本检测,低版本的资源退回到根目录下
+ ///
+ /// 版本号
+ /// 解压缩目录
+ /// 最低的版本号
+ ///
+ internal string VersionCheck(string version, string path, string oldestVersion)
+ {
+ var folder = version.Split('_');
+ if (folder.Length < 2) return path;
+
+ var versionLongCurrent = long.Parse(folder[1].Replace(".", ""));
+ var versionLongOld = long.Parse(oldestVersion.Replace(".", ""));
+
+ if (versionLongOld >= versionLongCurrent)
+ {
+ DeleteUnUsedVersion(folder[1]);
+ return path;
+ }
+
+ var newPath = $"{path}/{folder[1]}{GameConfig.SUFFIX}";
+ LoaderUtilities.MakeAllDirectory(newPath);
+
+ return newPath;
+ }
+
+ ///
+ /// 获取最低的需要保留的版本号
+ ///
+ ///
+ ///
+ internal string GetOldestVersion(string path)
+ {
+ if (path.IndexOf(FileSystem.FirstPackageName) >= 0)
+ return "0";
+
+ var dirs = GameConfig.Instance.GetExitVersions(path);
+ foreach (var item in _zipPath)
+ {
+ if (string.IsNullOrEmpty(item.Url))
+ {
+ continue;
+
+ }
+
+ var folder = item.Url.Split('_');
+ if (folder.Length < 2)
+ continue;
+
+ if (!dirs.Contains(folder[1]))
+ {
+ dirs.Add(folder[1]);
+ }
+ }
+
+ Sort(dirs);
+ var version = "0";
+ if (dirs.Count > Max)
+ {
+ int versionIndex = dirs.Count - Max - 1;
+ version = dirs[versionIndex];
+ DeleteUnUsedVersion(version);
+ }
+
+ return version;
+ }
+
+ private void Sort(List dirs)
+ {
+ dirs.Sort((a, b) =>
+ {
+ var versionLongA = long.Parse(a.Replace(".", ""));
+ var versionLongB = long.Parse(b.Replace(".", ""));
+ return versionLongB < versionLongA ? 1 : -1;
+ });
+ }
+
+ //删除不用了的版本
+ private void DeleteUnUsedVersion(string path)
+ {
+ string folder = $"{_fileDir}/{path}{GameConfig.SUFFIX}";
+ if (Directory.Exists(folder))
+ {
+ LoaderUtilities.CopyDirectory(folder, _fileDir);
+ Directory.Delete(folder, true);
+ }
+ }
+
+ ///
+ /// 返回压缩包里面的文件的总长度,字节为单位
+ ///
+ /// 压缩包的路径
+ ///
+ public UInt64 GetZipLength(string path)
+ {
+ return FastZip.getFileInfo(path);
+ }
+
+ ///
+ /// 返回进度
+ ///
+ ///
+ public long GetProgress()
+ {
+ return _currentBuffSize + (long)_progress[0];
+ }
+
+ ///
+ /// 线程是否在执行中
+ ///
+ ///
+ public bool IsRunning()
+ {
+ return _unpackThread != null && _bussiness;
+ }
+ ///
+ /// 解压缩的结果
+ ///
+ ///
+ public bool UnPackResult()
+ {
+ return _unpackresult;
+ }
+ ///
+ /// 解压缩状态
+ ///
+ ///
+ public bool IsBusiness()
+ {
+ return _bussiness;
+ }
+
+ ///
+ /// 结束线程
+ ///
+ public void Finish()
+ {
+ _bussiness = false;
+ if (_unpackThread == null) return;
+ if (!_unpackThread.IsAlive)
+ {
+ _unpackThread = null;
+ }
+ else
+ {
+ try
+ {
+ _unpackThread.Join(2000);
+ }
+ catch (Exception e)
+ {
+ TLogger.LogError($"Fileunzipmanager.Finish,{e.StackTrace}");
+ }
+ _unpackThread = null;
+ }
+ }
+ #endregion
+
+ #region 文件Md5校验
+
+ private static bool VerifyMd5(string path)
+ {
+ bool result = true;
+ try
+ {
+ string configPath = path + "/" + FileSystem.Md5List;
+ if (!File.Exists(configPath))
+ {
+ TLogger.LogError("could not find config,path:" + configPath);
+ result = false;
+ }
+ else
+ {
+ var fileList = File.ReadAllText(configPath);
+ var list = JsonUtility.FromJson>(fileList).ToList();
+
+ var logFilePath = $"{path}/{FileSystem.Md5VerifyLog}";
+ var fileStream = new FileStream(logFilePath, FileMode.OpenOrCreate);
+ var writer = new StreamWriter(fileStream);
+ foreach (var fileMd5 in list)
+ {
+ string log;
+ var tmpFile = Path.GetFullPath($"{path}/{fileMd5.fileName}");
+ if (!File.Exists(tmpFile))
+ {
+ log = $"file: {fileMd5.fileName} not exit";
+ writer.Write(log);
+ result = false;
+ continue;
+ }
+
+ string md5Raw = LoaderUtilities.GetMd5Hash(tmpFile);
+ if (!md5Raw.Equals(fileMd5.md5, StringComparison.Ordinal))
+ {
+ log = $"file: {fileMd5.fileName} \r\n Normal Md5: {md5Raw} \r\n Config Md5: {fileMd5.md5};Unpack Failed \r\n";
+ writer.Write(log);
+ result = false;
+ }
+ else
+ {
+ log = $"file: {fileMd5.fileName} \r\n Normal Md5: {md5Raw} \r\n Config Md5: {fileMd5.md5};Unpack ok \r\n";
+ writer.Write(log);
+ }
+ }
+
+ writer.Flush();
+ writer.Dispose();
+ writer.Close();
+ }
+ }
+ catch (Exception e)
+ {
+ result = false;
+ TLogger.LogError(e.ToString());
+ }
+
+ return result;
+ }
+ #endregion
+ }
+}
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs.meta
new file mode 100644
index 00000000..1fa2d6b7
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b2178f99fe2994f488ced5188bda6d0c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs
new file mode 100644
index 00000000..10c74d77
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace TEngine
+{
+ public class Launcher:MonoBehaviour
+ {
+ void Start()
+ {
+ TLogger.Instance.Active();
+ LoadMgr.Instance.StartLoadInit(LaunchSuccess);
+ }
+
+ private void LaunchSuccess()
+ {
+
+ }
+ }
+}
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs.meta
new file mode 100644
index 00000000..87951227
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c0cf65cac27fea44bbeda946bbb14abd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadMgr.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadMgr.cs
index 7dc3fc16..c6c246ad 100644
--- a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadMgr.cs
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadMgr.cs
@@ -1,12 +1,15 @@
using System;
+using System.Collections;
using System.Collections.Generic;
using System.IO;
+using TEngine.UI;
using UnityEngine;
namespace TEngine
{
public class LoadUpdateLogic
{
+
private static LoadUpdateLogic _instance;
public Action Download_Complete_Action = null;
@@ -32,7 +35,9 @@ namespace TEngine
///
public string LatestResId { get; set; }
+ private bool _loaderUpdateLaunched = false;
private Action _startGameEvent;
+ private Action _firstPackageEvent;
private int _curTryCount;
private const int MaxTryCount = 3;
private bool _connectBack;
@@ -40,6 +45,11 @@ namespace TEngine
private LoadData _currentData;
private UpdateType _currentType = UpdateType.None;
private readonly string _downloadFilePath = FileSystem.ResourceRoot + "/";
+ private Coroutine _coroutine;
+ //加载检测
+ private bool _dllLoad;
+ private Coroutine _load_data_check;
+ public DownloadImpl Downloader { get; set; }
public LoadMgr()
{
@@ -48,13 +58,32 @@ namespace TEngine
_startGameEvent = null;
}
+ public bool IsLaunched()
+ {
+ return _instance._loaderUpdateLaunched;
+ }
+
public void StartLoadInit(Action onUpdateComplete)
{
+ //热更新阶段文本初始化
+ LoadText.Instance.InitConfigData(null);
+ //热更新UI初始化
+ UILoadMgr.Initialize();
+
+ UILoadMgr.Show(UIDefine.UILoadUpdate);
+
+ if (LoadMgr.Instance.IsLaunched())
+ {
+ StartGame();
+ }
+ else
+ {
#if RELEASE_BUILD || _DEVELOPMENT_BUILD_
StartLoad(() => { FinishCallBack(onUpdateComplete); });
#else
- onUpdateComplete();
+ onUpdateComplete?.Invoke();
#endif
+ }
}
///
@@ -63,6 +92,7 @@ namespace TEngine
///
public void StartLoad(Action action)
{
+ _loaderUpdateLaunched = true;
_startGameEvent = action;
_connectBack = false;
_curTryCount = 0;
@@ -96,9 +126,30 @@ namespace TEngine
if (_curTryCount > MaxTryCount)
{
-
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Net_Error, MessageShowType.TwoButton,
+ LoadStyle.StyleEnum.Style_Retry,
+ () => {
+ _curTryCount = 0;
+ RequestVersion();
+ }, () =>
+ {
+ Application.Quit();
+ });
+ return;
}
+ UILoadMgr.Show(UIDefine.UILoadUpdate, string.Format(LoadText.Instance.Label_Load_Checking, _curTryCount));
+ if (string.IsNullOrEmpty(OnlineParamUrl))
+ {
+ TLogger.LogError("LoadMgr.RequestVersion, remote url is empty or null");
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_RemoteUrlisNull, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_QuitApp,
+ Application.Quit);
+ return;
+ }
+ TLogger.LogInfo("LoadMgr.RequestVersion, proxy:" + OnlineParamUrl);
+
+
try
{
var onlineParamStr = LoaderUtilities.HttpGet(OnlineParamUrl);
@@ -143,8 +194,180 @@ namespace TEngine
//检测一下本地是否存在资源,如果存在了就直接解压就行了,如果不存在还需要下载
_currentData.List = _CheckLocalExitResource(_currentData.List);
_currentType = _currentData.Type;
-
- //TODO
+
+ if (_currentData.List.Count <= 0)
+ {
+ DownLoadCallBack((int)DownLoadResult.AllDownLoaded, GameStatus.AssetLoad, _currentData.All);
+ _needUpdate = true;
+ return;
+ }
+ //展示更新类型
+ var exitUpdate = ShowUpdateType(_currentData);
+ if (exitUpdate)
+ {
+ _needUpdate = true;
+ }
+ else
+ {
+ StartGame();
+ }
+ }
+
+ ///
+ /// 显示更新方式
+ ///
+ ///
+ private bool ShowUpdateType(LoadData data)
+ {
+ UILoadMgr.Show(UIDefine.UILoadUpdate, LoadText.Instance.Label_Load_Checked);
+ //底包更新
+ if (data.Type == UpdateType.PackageUpdate)
+ {
+ if (true)
+ {
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Load_Package, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_DownLoadApk,
+ () => {
+ StartUpdate(data.List);
+ });
+ }
+ else
+ {
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Load_Plantform, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_DownLoadApk,
+ () =>
+ {
+ //DownLoadPackage();
+ });
+ }
+ return true;
+ }
+ //资源更新
+ else if (data.Type == UpdateType.ResourceUpdate)
+ {
+ //强制
+ if (data.Style == UpdateStyle.Froce)
+ {
+ //提示
+ if (data.Notice == UpdateNotice.Notice)
+ {
+ NetworkReachability n = Application.internetReachability;
+ string desc = LoadText.Instance.Label_Load_Force_WIFI;
+ if (n == NetworkReachability.ReachableViaCarrierDataNetwork)
+ {
+ desc = LoadText.Instance.Label_Load_Force_NO_WIFI;
+ }
+
+ long totalSize = 0;
+ foreach (var item in data.List)
+ {
+ totalSize += item.Size;
+ }
+
+ desc = string.Format(desc, LoaderUtilities.FormatData(totalSize));
+ LoaderUtilities.ShowMessageBox(desc, MessageShowType.TwoButton,
+ LoadStyle.StyleEnum.Style_StartUpdate_Notice,
+ () =>
+ {
+ StartUpdate(data.List);
+ }, () =>
+ {
+ StartGame();
+ });
+ }
+ //不提示
+ else if (data.Notice == UpdateNotice.NoNotice)
+ {
+ StartUpdate(data.List);
+ }
+ }
+ //非强制
+ else if (data.Style == UpdateStyle.Optional)
+ {
+ //提示
+ if (data.Notice == UpdateNotice.Notice)
+ {
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Load_Notice, MessageShowType.TwoButton,
+ LoadStyle.StyleEnum.Style_StartUpdate_Notice,
+ () => {
+ StartUpdate(data.List);
+ }, () => {
+ StartGame();
+ });
+ }
+ //不提示
+ else if (data.Notice == UpdateNotice.NoNotice)
+ {
+ StartUpdate(data.List);
+ }
+ }
+ else
+ TLogger.LogError("LoadMgr._CheckUpdate, style is error,code:" + data.Style);
+ return true;
+ }
+ //没有更新
+ return false;
+ }
+
+ ///
+ /// 下载结果回调
+ ///
+ ///
+ ///
+ ///
+ public void DownLoadCallBack(int result, GameStatus status, List files = null)
+ {
+ //下载完成
+ if (result == (int)DownLoadResult.AllDownLoaded)
+ {
+ if (_currentType == UpdateType.PackageUpdate)
+ {
+ if (true)
+ {
+ GameConfig.Instance.SignReInstall();
+ if (files != null)
+ {
+ //InstallApk(_downloadFilePath + files[0].Url);
+ }
+ else
+ {
+ TLogger.LogError("LoadMgr.DownLoadCallBack, data exception");
+ }
+ }
+ }
+ else
+ {
+ UnpackFiles(_currentData, FileSystem.ResourceRoot, status, _UnPackComplete, (current, total) =>
+ {
+ _UnPackCallback(current, status, total);
+ });
+ }
+ _StopLoadingCheck();
+ }
+ else
+ {
+ _StopLoadingCheck();
+ //网络发生变化,重试继续下载
+ if (result == (int)DownLoadResult.NetChanged || result == (int)DownLoadResult.HeadRequestError)
+ {
+ _RetryConnect();
+ return;
+ }
+ if (result == (int)DownLoadResult.DownLoadingError ||
+ result == (int)DownLoadResult.ReceiveNullData ||
+ result == (int)DownLoadResult.DownError ||
+ result == (int)DownLoadResult.ReceiveError ||
+ result == (int)DownLoadResult.Md5Wrong)
+ {
+ LoaderUtilities.ShowMessageBox(string.Format(LoadText.Instance.Label_Load_Error, result), MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_QuitApp,
+ () => {
+ Application.Quit();
+ });
+ }
+ }
+
+ ResetRetry();
}
///
@@ -194,7 +417,7 @@ namespace TEngine
return true;
}
- void StartGame()
+ public void StartGame()
{
if (_startGameEvent != null)
{
@@ -206,7 +429,6 @@ namespace TEngine
{
if (onlineParam == null)
{
-
return null;
}
var data = new LoadData();
@@ -262,11 +484,17 @@ namespace TEngine
#if UNITY_EDITOR_WIN || _DEVELOPMENT_BUILD_
StartGame();
#else
- //TODO
+ LoaderUtilities.ShowMessageBox("response msg error", MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_QuitApp,
+ () =>
+ {
+ Application.Quit();
+ });
#endif
return null;
default:
-
+ LoaderUtilities.ShowMessageBox("response msg error", MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_QuitApp, Application.Quit);
return null;
}
if (GameConfig.Instance.ResId == LatestResId)
@@ -337,5 +565,328 @@ namespace TEngine
return _onlineParamUrl;
}
}
+
+
+ public void StartDownLoad()
+ {
+ if (Downloader == null)
+ return;
+
+ if (Downloader.IsLoading())
+ {
+ TLogger.LogInfo("Loadermanager.StartUpdate,down loading......");
+ return;
+ }
+
+
+ if (_coroutine != null)
+ {
+ CoroutineUtility.StopCoroutine(_coroutine);
+ _coroutine = null;
+ }
+ //开始下载
+ _coroutine = CoroutineUtility.StartCoroutine(Downloader.DownLoad());
+
+ LoaderUtilities.DelayFun(() =>
+ {
+ if (_load_data_check != null)
+ {
+ CoroutineUtility.StopCoroutine(_load_data_check);
+ }
+
+ _load_data_check = CoroutineUtility.StartCoroutine(_StartLoadingCheck());
+ }, new WaitForSeconds(1));
+ }
+
+ public void StopDownLoad()
+ {
+ if (Downloader == null)
+ return;
+
+ Downloader.StopDownLoad();
+ if (_coroutine == null) return;
+ CoroutineUtility.StopCoroutine(_coroutine);
+ _coroutine = null;
+ }
+
+ private void ReleaseLoader()
+ {
+ StopDownLoad();
+ Downloader = null;
+ }
+
+ #region 数据加载检测
+ private long _currentSize;
+ private int _currentTryCount;
+ private Action _retryAction;
+ private IEnumerator _StartLoadingCheck()
+ {
+ while (Downloader.IsLoading())
+ {
+ _currentSize = Downloader.CurrentLoadSize();
+ yield return new WaitForSeconds(20);
+ long newSize = Downloader.CurrentLoadSize();
+ if (newSize - _currentSize < 1024)
+ {
+ StopDownLoad();
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_DownLoadFailed, MessageShowType.TwoButton,
+ LoadStyle.StyleEnum.Style_DownZip,
+ () =>
+ {
+ StartDownLoad();
+ }, () =>
+ {
+ Application.Quit();
+ });
+ }
+ else
+ {
+ _currentSize = Downloader.CurrentLoadSize();
+ }
+ }
+ }
+ private void _StopLoadingCheck()
+ {
+ if (_load_data_check != null)
+ {
+ CoroutineUtility.StopCoroutine(_load_data_check);
+ }
+ }
+ //尝试重连
+ private void _RetryConnect()
+ {
+ if (_retryAction == null)
+ {
+ _retryAction = () => {
+ LoaderUtilities.DelayFun(() =>
+ {
+ _currentTryCount++;
+ UILoadMgr.Show(UIDefine.UILoadUpdate, string.Format(LoadText.Instance.Label_Net_Changed, _currentTryCount));
+ StartDownLoad();
+ }, new WaitForSeconds(3));
+ };
+ }
+
+ if (_currentTryCount >= 3)
+ {
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Net_Error, MessageShowType.TwoButton,
+ LoadStyle.StyleEnum.Style_DownZip,
+ () =>
+ {
+ _currentTryCount = 0;
+ _retryAction.Invoke();
+ }, Quit);
+ }
+ else
+ {
+ _retryAction.Invoke();
+ }
+ }
+
+ private void ResetRetry()
+ {
+ _currentTryCount = 0;
+ _retryAction = null;
+ }
+
+ #endregion
+
+ ///
+ /// 开始更新资源
+ ///
+ public void StartUpdate(List list)
+ {
+ if (list == null || list.Count <= 0)
+ {
+ TLogger.LogError("Loadermanager.StartUpdate, resource list is empty");
+ return;
+ }
+ //检测内存是否充足
+ long totalSize = 0;
+ foreach (var item in list)
+ {
+ totalSize += item.Size;
+ }
+
+ if (false)
+ {
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Memory_Low_Load, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_QuitApp,
+ () => {
+ Application.Quit();
+ });
+ return;
+ }
+
+ Downloader = new DownloadImpl(list, _downloadFilePath, (result, files) =>
+ {
+ DownLoadCallBack(result, GameStatus.AssetLoad, files);
+ });
+ StartDownLoad();
+ }
+
+ ///
+ /// 加压缩进度回调
+ ///
+ ///
+ ///
+ ///
+ private void _UnPackCallback(long current, GameStatus status, long total)
+ {
+ float t;
+ if (total == 0)
+ t = 0;
+ else
+ {
+ t = (float)current / total;
+ }
+ LoadUpdateLogic.Instance._Unpacked_Progress_Action?.Invoke(t, status);
+ }
+
+ ///
+ /// 解压缩结束回调
+ ///
+ ///
+ ///
+ private void _UnPackComplete(bool result, GameStatus status)
+ {
+ if (result)
+ {
+ foreach (var item in _currentData.All)
+ {
+ if (item.Url == null)
+ {
+ continue;
+ }
+
+ LoaderUtilities.DeleteFile(FileSystem.ResourceRoot + "/" + item.Url);
+ }
+
+ try
+ {
+ if (string.IsNullOrEmpty(LatestResId))
+ {
+ LatestResId = GameConfig.Instance.ResId;
+ }
+ GameConfig.Instance.WriteVersion(LatestResId);
+ FileunzipManager.Instance.CopyMonoAssembly(LatestResId);
+ }
+ catch (Exception e)
+ {
+ TLogger.LogError(e.StackTrace);
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Load_UnPackError, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_RestartApp,
+ () =>
+ {
+ Application.Quit();
+ });
+ return;
+ }
+
+ if (status == GameStatus.AssetLoad)
+ {
+ if (_dllLoad == false)
+ {
+ StartGame();
+ }
+ else
+ {
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_RestartApp, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_RestartApp,
+ () =>
+ {
+ Quit();
+ });
+ }
+ }
+ else
+ {
+ if (_firstPackageEvent != null)
+ {
+ _firstPackageEvent.Invoke();
+ }
+ else
+ {
+ StartGame();
+ }
+ }
+ }
+ else
+ {
+ if (status == GameStatus.First)
+ {
+ LoaderUtilities.DeleteFolder(FileSystem.ResourceRoot);
+ }
+ else
+ {
+ foreach (var item in _currentData.List)
+ {
+ if (item.Url == null)
+ {
+ continue;
+ }
+ LoaderUtilities.DeleteFile(FileSystem.ResourceRoot + "/" + item.Url);
+ }
+ }
+
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Load_UnPackError, MessageShowType.OneButton,
+ LoadStyle.StyleEnum.Style_QuitApp,
+ () => {
+ Application.Quit();
+ });
+ }
+ }
+
+ ///
+ /// 解压包
+ ///
+ /// 文件地址
+ /// 解压目录
+ ///
+ /// 解压结果回调
+ /// 解压进度回调
+ public void UnpackFiles(LoadData file, string dir, GameStatus status, Action callback, Action progress)
+ {
+ if (!Directory.Exists(dir))
+ Directory.CreateDirectory(dir);
+
+ long totalFilesize = 0;
+ _dllLoad = false;
+ foreach (var item in file.All)
+ {
+ if (_dllLoad == false)
+ {
+ _dllLoad = FastZip.entryExists($"{dir}/{item.Url}", FileSystem.DllScriptPkgName);
+ }
+ totalFilesize += item.Size;
+ }
+
+
+ FileunzipManager.Instance.StartFastUnZip(file.All, dir, dir);
+ CoroutineUtility.StartCoroutine(UpdateProgress(totalFilesize, status, callback, progress));
+ }
+
+ public IEnumerator UpdateProgress(long size, GameStatus status, Action callback, Action progress)
+ {
+ long currentProgress;
+ while (FileunzipManager.Instance.IsRunning())
+ {
+ currentProgress = FileunzipManager.Instance.GetProgress();
+ progress.Invoke(currentProgress, size);
+ yield return null;
+ }
+ currentProgress = FileunzipManager.Instance.GetProgress();
+ progress.Invoke(currentProgress, size);
+ yield return null;
+ yield return null;
+ yield return null;
+ callback?.Invoke(FileunzipManager.Instance.UnPackResult(), status);
+ }
+
+
+ internal void Quit()
+ {
+ Application.Quit();
+ }
}
}
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoaderUtilities.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/LoaderUtilities.cs
index 1515525f..d3e5fbdf 100644
--- a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoaderUtilities.cs
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/LoaderUtilities.cs
@@ -8,6 +8,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using TEngine.UI;
using UnityEngine;
namespace TEngine
@@ -15,25 +16,6 @@ namespace TEngine
public class LoaderUtilities
{
- ///
- /// 删除文件
- ///
- /// 文件路径
- public static void DeleteFile(string filePath)
- {
- try
- {
- if (File.Exists(filePath))
- {
- File.Delete(filePath);
- }
- }
- catch (Exception e)
- {
- TLogger.LogError(e.ToString());
- }
- }
-
///
/// 获取文件的md5码
///
@@ -389,5 +371,188 @@ namespace TEngine
string retString = reader.ReadToEnd();
return retString;
}
+
+ ///
+ /// 删除文件夹
+ ///
+ ///
+ public static void DeleteFolder(string dir)
+ {
+ try
+ {
+ if (!Directory.Exists(dir))
+ return;
+
+ foreach (string d in Directory.GetFileSystemEntries(dir))
+ {
+ if (File.Exists(d))
+ {
+ FileInfo fi = new FileInfo(d);
+ if (fi.Attributes.ToString().IndexOf("ReadOnly") != -1)
+ {
+ fi.Attributes = FileAttributes.Normal;
+ }
+ LoaderUtilities.DeleteFile(d);//直接删除其中的文件
+ }
+ else
+ {
+ DirectoryInfo d1 = new DirectoryInfo(d);
+ if (d1.GetFiles().Length != 0)
+ {
+ DeleteFolder(d1.FullName);////递归删除子文件夹
+ }
+ Directory.Delete(d, true);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TLogger.LogError(e.StackTrace.ToString());
+ throw;
+ }
+ }
+
+ ///
+ /// 删除文件
+ ///
+ /// 文件路径
+ public static void DeleteFile(string filePath)
+ {
+ try
+ {
+ if (File.Exists(filePath))
+ {
+ File.Delete(filePath);
+ }
+ }
+ catch (Exception e)
+ {
+ TLogger.LogError(e.ToString());
+ }
+ }
+
+ ///
+ /// 显示提示框,目前最多支持三个按钮
+ ///
+ /// 描述
+ /// 类型(MessageShowType)
+ /// 点击事件
+ /// 取消事件
+ /// 更新事件
+ public static void ShowMessageBox(string desc, MessageShowType showtype = MessageShowType.OneButton,
+ LoadStyle.StyleEnum style = LoadStyle.StyleEnum.Style_Default,
+ Action OnOk = null,
+ Action OnCancle = null,
+ Action OnPackage = null)
+ {
+ UILoadMgr.Show(UIDefine.UILoadTip, desc);
+ var ui = UILoadMgr.GetActiveUI(UIDefine.UILoadTip) as UILoadTip;
+ if (ui == null) return;
+ ui.OnOk = OnOk;
+ ui.OnCancle = OnCancle;
+ ui.Showtype = showtype;
+ ui.OnEnter(desc);
+
+ var ls = ui.GetComponent();
+ if (ls)
+ {
+ ls.SetStyle(style);
+ }
+ }
+
+ ///
+ /// 拷贝文件夹
+ ///
+ /// 原目录地址
+ /// 目标目录地址
+ public static void CopyDirectory(string srcPath, string destPath)
+ {
+ try
+ {
+
+ if (string.IsNullOrEmpty(srcPath) || !Directory.Exists(srcPath))
+ {
+ Debug.LogError("不存在的原目录地址:" + srcPath);
+ return;
+ }
+
+ if (!Directory.Exists(destPath))
+ Directory.CreateDirectory(destPath);
+
+ var dir = new DirectoryInfo(srcPath);
+ var fileinfo = dir.GetFileSystemInfos();
+ foreach (var i in fileinfo)
+ {
+ string sub_name = i.Name;
+ if (i is DirectoryInfo)
+ {
+ if (!Directory.Exists($"{destPath}/{sub_name}"))
+ {
+ Directory.CreateDirectory($"{destPath}/{sub_name}");
+ }
+ CopyDirectory(i.FullName, $"{destPath}/{sub_name}");
+ }
+ else
+ {
+ File.Copy(i.FullName, $"{destPath}/{sub_name}", true);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TLogger.LogError(e.ToString());
+ throw;
+ }
+ }
+
+ private static readonly char[] DirectorySeperators =
+ {
+ Path.DirectorySeparatorChar,
+ Path.AltDirectorySeparatorChar,
+ };
+
+ ///
+ /// 创建文件夹
+ ///
+ /// 目标目录地址
+ ///
+ public static void MakeAllDirectory(string path, bool is_last_file = true)
+ {
+ try
+ {
+ if (is_last_file)
+ {
+ path = Path.GetDirectoryName(path);
+ }
+ if (path == null)
+ return;
+
+ var pathFragments = path.Split(DirectorySeperators);
+ if (pathFragments.Length <= 0)
+ return;
+
+ path = pathFragments[0];
+ if (path != string.Empty && !Directory.Exists(path))
+ Directory.CreateDirectory(path);
+
+ for (var i = 1; i < pathFragments.Length; i++)
+ {
+ path += Path.DirectorySeparatorChar;
+
+ string pathFragment = pathFragments[i];
+ if (string.IsNullOrEmpty(pathFragment))
+ continue;
+
+ path += pathFragment;
+ if (!Directory.Exists(path))
+ Directory.CreateDirectory(path);
+ }
+ }
+ catch (Exception e)
+ {
+ TLogger.LogError(e.ToString());
+ throw;
+ }
+ }
}
}
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI.meta
new file mode 100644
index 00000000..f3146c47
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 191f77f88aadf9f41b1a380e343727dc
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadStyle.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadStyle.cs
new file mode 100644
index 00000000..d1fa7be9
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadStyle.cs
@@ -0,0 +1,181 @@
+using System;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+using UnityEngine;
+using UnityEngine.Networking;
+using UnityEngine.UI;
+
+namespace TEngine.UI
+{
+ public class LoadStyle : MonoBehaviour
+ {
+ public Button _btn_ignore;
+ public Button _btn_update;
+ public Button _btn_package;
+
+ public Text _label_ignore;
+ public Text _label_update;
+ public Text _label_package;
+ private Dictionary> loadConfig;
+
+ private const string ConfigPath = "RawBytes/UIStyle/Style.json";
+
+ public enum StyleEnum
+ {
+ Style_Default = 0,//Ĭ
+ Style_QuitApp = 1,//˳Ӧ
+ Style_RestartApp = 2,//Ӧ
+ Style_Retry = 3,//
+ Style_StartUpdate_Notice = 4,//ʾ
+ Style_DownLoadApk = 5,//صװ
+ Style_Clear = 6,//ͻ
+ Style_DownZip = 7,//ѹ
+ }
+
+ public enum BtnEnum
+ {
+ BtnOK = 0, //ȷť
+ BtnIgnore = 1,//ȡť
+ BtnOther = 2, //ť
+ }
+
+ ///
+ /// ťʽ
+ ///
+ private class StyleItem
+ {
+ public Alignment Align;//䷽ʽ
+ public bool Show;//Ƿ
+ public string Desc;//ť
+ }
+ ///
+ /// 뷽ʽ
+ ///
+ private enum Alignment
+ {
+ Left = 0,
+ Middle = 1,
+ Right = 2
+ }
+
+ private void Awake()
+ {
+ //ðťĬ
+ _label_ignore.text = LoadText.Instance.Label_Btn_Ignore;
+ _label_update.text = LoadText.Instance.Label_Btn_Update;
+ _label_package.text = LoadText.Instance.Label_Btn_Package;
+
+ InitConfig();
+ }
+
+ private void InitConfig()
+ {
+ string url = ResMgr.GetRawBytesFullPath(ConfigPath);
+ if (!String.IsNullOrEmpty(url))
+ {
+ string finalPath = SetFilePath(url);
+ InitConfigDic(finalPath);
+ }
+ }
+
+ #region ʼļ
+ private string SetFilePath(string path)
+ {
+#if UNITY_ANDROID
+ if (path.StartsWith(Application.persistentDataPath))
+ path = $"file://{path}";
+#elif UNITY_IOS
+ if (path.StartsWith(Application.persistentDataPath)||path.StartsWith(Application.streamingAssetsPath))
+ path = $"file://{path}";
+#endif
+ return path;
+ }
+
+ private void InitConfigDic(string path)
+ {
+ UnityWebRequest www = UnityWebRequest.Get(path);
+ UnityWebRequestAsyncOperation request = www.SendWebRequest();
+ while (!request.isDone)
+ {
+ }
+
+ if (!String.IsNullOrEmpty(www.downloadHandler.text))
+ {
+ loadConfig = JsonConvert.DeserializeObject>>(www.downloadHandler.text);
+ }
+ www.Dispose();
+ }
+ #endregion
+ ///
+ /// ʽ
+ ///
+ /// ʽӦid
+ public void SetStyle(StyleEnum type)
+ {
+ //ĬʽɶҲ
+ if (type == StyleEnum.Style_Default)
+ return;
+
+ if (loadConfig == null)
+ {
+ TLogger.LogInfo("LoadConfig is null");
+ return;
+ }
+
+ var style = loadConfig[type];
+ if (style == null)
+ {
+ TLogger.LogError($"LoadConfig, Can not find type:{type},please check it");
+ return;
+ }
+ SetButtonStyle(style);
+ }
+
+ ///
+ /// ðť,Ƿ
+ ///
+ private void SetButtonStyle(Dictionary list)
+ {
+ foreach (var item in list)
+ {
+ switch (item.Key)
+ {
+ case BtnEnum.BtnOK:
+ _label_update.text = item.Value.Desc;
+ _btn_update.gameObject.SetActive(item.Value.Show);
+ SetButtonPos(item.Value.Align, _btn_update.transform);
+ break;
+ case BtnEnum.BtnIgnore:
+ _label_ignore.text = item.Value.Desc;
+ _btn_ignore.gameObject.SetActive(item.Value.Show);
+ SetButtonPos(item.Value.Align, _btn_ignore.transform);
+ break;
+ case BtnEnum.BtnOther:
+ _label_package.text = item.Value.Desc;
+ _btn_package.gameObject.SetActive(item.Value.Show);
+ SetButtonPos(item.Value.Align, _btn_package.transform);
+ break;
+ }
+ }
+ }
+
+ ///
+ /// ðťλ
+ ///
+ private void SetButtonPos(Alignment align, Transform item)
+ {
+ switch (align)
+ {
+ case Alignment.Left:
+ item.SetSiblingIndex(0);
+ break;
+ case Alignment.Middle:
+ item.SetSiblingIndex(1);
+ break;
+ case Alignment.Right:
+ item.SetSiblingIndex(2);
+ break;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadStyle.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadStyle.cs.meta
new file mode 100644
index 00000000..417ff59b
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadStyle.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c56a1db52fd64134881893a68f6e1371
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadText.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadText.cs
new file mode 100644
index 00000000..d0ef23e5
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadText.cs
@@ -0,0 +1,131 @@
+using UnityEngine;
+
+namespace TEngine.UI
+{
+ public class TextMode
+ {
+ public string Label_Load_Progress = "正在下载资源文件,请耐心等待\n当前下载速度:{0}/s 资源文件大小:{1}";
+ public string Label_Load_FirstUnpack = "首次进入游戏,正在初始化游戏资源...(此过程不消耗网络流量)";
+ public string Label_Load_Unpacking = "正在更新本地资源版本,请耐心等待...(此过程不消耗网络流量)";
+ public string Label_Load_Checking = "检测版本文件{0}...";
+ public string Label_Load_Checked = "最新版本检测完成";
+ public string Label_Load_Package = "当前使用的版本过低,请下载安装最新版本";
+ public string Label_Load_Plantform = "当前使用的版本过低,请前往应用商店安装最新版本";
+ public string Label_Load_Notice = "检测到可选资源更新,推荐完成更新提升游戏体验";
+ public string Label_Load_Force = "检测到版本更新,取消更新将导致无法进入游戏";
+ public string Label_Load_Force_WIFI =
+ "检测到有新的游戏内容需要更新,更新包大小{0}, 取消更新将导致无法进入游戏,您当前已为wifi网络,请开始更新";
+ public string Label_Load_Force_NO_WIFI =
+ "检测到有新的游戏内容需要更新,更新包大小{0}, 取消更新将导致无法进入游戏,请开始更新";
+ public string Label_Load_Error = "更新参数错误{0},请点击确定重新启动游戏";
+ public string Label_Load_FirstEntrerGame_Error = "首次进入游戏资源异常";
+ public string Label_Load_UnpackComplete = "正在加载最新资源文件...(此过程不消耗网络流量)";
+ public string Label_Load_UnPackError = "资源解压失败,请点击确定重新启动游戏";
+ public string Label_Load_Load_Progress = "正在载入...{0}%";
+ public string Label_Load_Download_Progress = "正在下载...{0}%";
+ public string Label_Load_Init = "初始化...";
+ public string Label_Net_UnReachable = "当前网络不可用,请检查本地网络设置";
+ public string Label_Net_ReachableViaCarrierDataNetwork = "当前是移动网络,是否继续下载";
+ public string Label_Net_Error = "网络异常,请重试";
+ public string Label_Net_Changed = "网络切换,正在尝试重连,{0}次";
+ public string Label_Data_Empty = "数据异常";
+ public string Label_Memory_Low = "初始化资源加载失败,请检查本地内存是否充足";
+ public string Label_Memory_Low_Load = "内存是否充足,无法更新";
+ public string Label_Memory_UnZip_Low = "内存不足,无法解压";
+ public string Label_App_id = "游戏版本号:{0}";
+ public string Label_Res_id = "资源版本号:{0}";
+ public string Label_Clear_Comfirm = "是否清理本地资源?(清理完成后会关闭游戏且重新下载最新资源)";
+ public string Label_RestartApp = "本次更新需要重启应用,请点击确定重新启动游戏";
+ public string Label_DownLoadFailed = "网络太慢,是否继续下载";
+ public string Label_ClearConfig = "清除环境配置,需要重启应用";
+ public string Label_RegionInfoIllegal = "区服信息为空";
+ public string Label_RemoteUrlisNull = "热更新服地址为空";
+ public string Label_FirstPackageNotFound = "首包资源加载失败";
+ public string Label_RequestReginInfo = "正在请求区服信息{0}次";
+ public string Label_RequestTimeOut = "请求区服信息超时,是否重试?";
+ public string Label_Region_ArgumentError = "参数错误";
+ public string Label_Region_IndexOutOfRange = "索引越界";
+ public string Label_Region_NonConfigApplication = "未配置此应用";
+ public string Label_Region_SystemError = "系统异常";
+ public string Label_PreventionOfAddiction = "著作人权:深圳市TEngine有限公司 软著登记号:2022SR0000000\n抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。适度游戏益脑," +
+ "沉迷游戏伤身。合理安排时间,享受健康生活。";
+ public string Label_Btn_Update = "确定";
+ public string Label_Btn_Ignore = "取消";
+ public string Label_Btn_Package = "更新";
+
+ public string Label_Dlc_ConfigVerificateStage = "配置校验中...";
+ public string Label_Dlc_ConfigLoadingStage = "下载配置中...";
+ public string Label_Dlc_AssetsLoading = "下载资源中...";
+ public string Label_Dlc_LoadingFinish = "下载结束";
+
+ public string Label_Dlc_Load_Force_WIFI =
+ "检测到有新的游戏内容需要更新, 取消更新将导致无法进入游戏,您当前已为wifi网络,请开始更新";
+ public string Label_Dlc_Load_Force_NO_WIFI =
+ "检测到有新的游戏内容需要更新, 取消更新将导致无法进入游戏,请开始更新";
+ }
+
+ public class LoadText: TextMode
+ {
+ private static LoadText _instance;
+
+ public static LoadText Instance {
+ get { return _instance ?? (_instance = new LoadText()); }
+ }
+
+ internal void InitConfigData(TextAsset asset)
+ {
+ if (asset == null)
+ return;
+
+ TextMode loadConfig = JsonUtility.FromJson(asset.text);
+ if (loadConfig != null)
+ {
+ Label_Load_Progress = loadConfig.Label_Load_Progress;
+ Label_Load_FirstUnpack = loadConfig.Label_Load_FirstUnpack;
+ Label_Load_Unpacking = loadConfig.Label_Load_Unpacking;
+ Label_Load_Checking = loadConfig.Label_Load_Checking;
+ Label_Load_Checked = loadConfig.Label_Load_Checked;
+ Label_Load_Package = loadConfig.Label_Load_Package;
+ Label_Load_Plantform = loadConfig.Label_Load_Plantform;
+ Label_Load_Notice = loadConfig.Label_Load_Notice;
+ Label_Load_Force = loadConfig.Label_Load_Force;
+ Label_Load_Force_WIFI = loadConfig.Label_Load_Force_WIFI;
+ Label_Load_Force_NO_WIFI = loadConfig.Label_Load_Force_NO_WIFI;
+ Label_Load_Error = loadConfig.Label_Load_Error;
+ Label_Load_FirstEntrerGame_Error = loadConfig.Label_Load_FirstEntrerGame_Error;
+ Label_Load_UnpackComplete = loadConfig.Label_Load_UnpackComplete;
+ Label_Load_UnPackError = loadConfig.Label_Load_UnPackError;
+ Label_Load_Load_Progress = loadConfig.Label_Load_Load_Progress;
+ Label_Load_Download_Progress = loadConfig.Label_Load_Download_Progress;
+ Label_Load_Init = loadConfig.Label_Load_Init;
+ Label_Net_UnReachable = loadConfig.Label_Net_UnReachable;
+ Label_Net_Error = loadConfig.Label_Net_Error;
+ Label_Net_Changed = loadConfig.Label_Net_Changed;
+ Label_Data_Empty = loadConfig.Label_Data_Empty;
+ Label_Memory_Low = loadConfig.Label_Memory_Low;
+ Label_Memory_Low_Load = loadConfig.Label_Memory_Low_Load;
+ Label_Memory_UnZip_Low = loadConfig.Label_Memory_UnZip_Low;
+ Label_App_id = loadConfig.Label_App_id;
+ Label_Res_id = loadConfig.Label_Res_id;
+ Label_Clear_Comfirm = loadConfig.Label_Clear_Comfirm;
+ Label_RestartApp = loadConfig.Label_RestartApp;
+ Label_DownLoadFailed = loadConfig.Label_DownLoadFailed;
+ Label_ClearConfig = loadConfig.Label_ClearConfig;
+ Label_PreventionOfAddiction = loadConfig.Label_PreventionOfAddiction;
+ Label_RegionInfoIllegal = loadConfig.Label_RegionInfoIllegal;
+ Label_RemoteUrlisNull = loadConfig.Label_RemoteUrlisNull;
+ Label_FirstPackageNotFound = loadConfig.Label_FirstPackageNotFound;
+ Label_RequestReginInfo = loadConfig.Label_RequestReginInfo;
+ Label_Net_ReachableViaCarrierDataNetwork = loadConfig.Label_Net_ReachableViaCarrierDataNetwork;
+ Label_RequestTimeOut = loadConfig.Label_RequestTimeOut;
+ Label_Region_ArgumentError = loadConfig.Label_Region_ArgumentError;
+ Label_Region_IndexOutOfRange = loadConfig.Label_Region_IndexOutOfRange;
+ Label_Region_NonConfigApplication = loadConfig.Label_Region_NonConfigApplication;
+ Label_Region_SystemError = loadConfig.Label_Region_SystemError;
+ Label_Btn_Ignore = loadConfig.Label_Btn_Ignore;
+ Label_Btn_Package = loadConfig.Label_Btn_Package;
+ Label_Btn_Update = loadConfig.Label_Btn_Update;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadText.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadText.cs.meta
new file mode 100644
index 00000000..7405cb41
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadText.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 26b25172848a83441b2cfadd771152ea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadUpdateLogic.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadUpdateLogic.cs
new file mode 100644
index 00000000..207568f8
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadUpdateLogic.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace TEngine.UI
+{
+ public class LoadUpdateLogic
+ {
+ private static LoadUpdateLogic _instance;
+
+ public Action Download_Complete_Action = null;
+ public Action Down_Progress_Action = null;
+ public Action _Unpacked_Complete_Action = null;
+ public Action _Unpacked_Progress_Action = null;
+
+ public static LoadUpdateLogic Instance
+ {
+ get
+ {
+ if (_instance == null)
+ _instance = new LoadUpdateLogic();
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadUpdateLogic.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadUpdateLogic.cs.meta
new file mode 100644
index 00000000..163ddc12
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/LoadUpdateLogic.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4c7fe9e5620ac5d4bae49fbd58746210
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIBase.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIBase.cs
new file mode 100644
index 00000000..c90acb73
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIBase.cs
@@ -0,0 +1,14 @@
+using UnityEngine;
+using UnityEditor;
+
+namespace TEngine.UI
+{
+ public class UIBase : MonoBehaviour
+ {
+ protected object Param;
+ virtual public void OnEnter(object param)
+ {
+ Param = param;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIBase.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIBase.cs.meta
new file mode 100644
index 00000000..aea111c9
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIBase.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b150d874e1db306419683d8fb8f50af4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIDefine.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIDefine.cs
new file mode 100644
index 00000000..e6958c4c
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIDefine.cs
@@ -0,0 +1,33 @@
+using System.Collections.Generic;
+
+namespace TEngine.UI
+{
+ public class UIDefine
+ {
+ public static readonly string UILoadUpdate = "UILoadUpdate";
+ public static readonly string UILoadTip = "UILoadTip";
+
+ ///
+ /// 注册ui
+ ///
+ ///
+ public static void RegisitUI(Dictionary list)
+ {
+ if (list == null)
+ {
+ TLogger.LogError("[UIManager]list is null");
+ return;
+ }
+
+ if (!list.ContainsKey(UILoadUpdate))
+ {
+ list.Add(UILoadUpdate, $"{FileSystem.AssetFolder}/{UILoadUpdate}");
+ }
+
+ if (!list.ContainsKey(UILoadTip))
+ {
+ list.Add(UILoadTip, $"{FileSystem.AssetFolder}/{UILoadTip}");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIDefine.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIDefine.cs.meta
new file mode 100644
index 00000000..eaca476f
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UIDefine.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8b4a6ad67f754024987f55526fa21034
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadMgr.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadMgr.cs
new file mode 100644
index 00000000..7366d31b
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadMgr.cs
@@ -0,0 +1,145 @@
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace TEngine.UI
+{
+ public static class UILoadMgr
+ {
+ private static GameObject _uiLoad;
+ private static Dictionary _uiList = new Dictionary();
+ private static readonly Dictionary _uiMap = new Dictionary();
+ ///
+ /// 初始化根节点
+ ///
+ public static void Initialize()
+ {
+ _uiLoad = GameObject.Find(FileSystem.AssetFolder);
+ if (_uiLoad == null)
+ {
+ var obj = Resources.Load($"{FileSystem.AssetFolder}/UILoad");
+ if (obj == null)
+ {
+ TLogger.LogError("Failed to load UILoad. Please check the resource path");
+ return;
+ }
+ _uiLoad = Object.Instantiate(obj) as GameObject;
+ if (_uiLoad != null)
+ {
+ _uiLoad.name = FileSystem.AssetFolder;
+ _uiLoad.transform.SetAsLastSibling();
+ }
+ else
+ {
+ TLogger.LogError($"{FileSystem.AssetFolder} object Instantiate Failed");
+ return;
+ }
+ }
+ RegisitUI();
+ }
+
+ public static void RegisitUI()
+ {
+ UIDefine.RegisitUI(_uiList);
+ }
+
+ ///
+ /// show ui
+ ///
+ /// 对应的ui
+ /// 参数
+ public static void Show(string uiinfo,object param = null)
+ {
+ if (string.IsNullOrEmpty(uiinfo))
+ return;
+
+ if (!_uiList.ContainsKey(uiinfo))
+ {
+ TLogger.LogError($"not define ui:{uiinfo}");
+ return;
+ }
+
+ GameObject ui = null;
+ if (!_uiMap.ContainsKey(uiinfo))
+ {
+ Object obj = Resources.Load(_uiList[uiinfo]);
+ if (obj != null)
+ {
+ ui = Object.Instantiate(obj) as GameObject;
+ if (ui != null)
+ {
+ ui.transform.SetParent(_uiLoad.transform);
+ ui.transform.localScale = Vector3.one;
+ ui.transform.localPosition = Vector3.zero;
+ RectTransform rect = ui.GetComponent();
+ rect.sizeDelta = Vector2.zero;
+ }
+ }
+
+ UIBase compenent = ui.GetComponent();
+ if (compenent != null)
+ {
+ _uiMap.Add(uiinfo, compenent);
+ }
+ }
+ _uiMap[uiinfo].gameObject.SetActive(true);
+ if (param != null)
+ {
+ UIBase compenent = _uiMap[uiinfo].GetComponent();
+ if (compenent != null)
+ {
+ compenent.OnEnter(param);
+ }
+ }
+ }
+ ///
+ /// 隐藏ui对象
+ ///
+ /// 对应的ui
+ public static void Hide(string uiinfo)
+ {
+ if (string.IsNullOrEmpty(uiinfo))
+ {
+ return;
+ }
+
+ if (!_uiMap.ContainsKey(uiinfo))
+ {
+ return;
+ }
+
+ _uiMap[uiinfo].gameObject.SetActive(false);
+ Object.DestroyImmediate(_uiMap[uiinfo].gameObject);
+ _uiMap.Remove(uiinfo);
+ }
+
+ ///
+ /// 获取显示的ui对象
+ ///
+ ///
+ ///
+ public static UIBase GetActiveUI(string ui)
+ {
+ return _uiMap.ContainsKey(ui) ? _uiMap[ui] : null;
+ }
+
+ ///
+ /// 隐藏ui管理器
+ ///
+ public static void HideAll()
+ {
+ foreach (var item in _uiMap)
+ {
+ if (item.Value && item.Value.gameObject)
+ {
+ item.Value.gameObject.SetActive(false);
+ }
+ }
+ _uiMap.Clear();
+
+ if (_uiLoad != null)
+ {
+ Object.Destroy(_uiLoad);
+ }
+ }
+ }
+}
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadMgr.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadMgr.cs.meta
new file mode 100644
index 00000000..43159d9b
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadMgr.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6381a0f5db6b61948a8fcb8176d8019b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadTip.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadTip.cs
new file mode 100644
index 00000000..f0c02d53
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadTip.cs
@@ -0,0 +1,99 @@
+using UnityEngine;
+using UnityEngine.UI;
+using System;
+
+namespace TEngine.UI
+{
+ public enum MessageShowType
+ {
+ None = 0,
+ OneButton = 1,
+ TwoButton = 2,
+ ThreeButton = 3,
+ }
+ public class UILoadTip : UIBase
+ {
+ public Button _btn_update;
+ public Button _btn_ignore;
+ public Button _btn_package;
+ public Text _label_desc;
+
+ public Action OnOk;
+ public Action OnCancle;
+ public MessageShowType Showtype = MessageShowType.None;
+
+ void Start()
+ {
+ EventTriggerListener.Get(_btn_update.gameObject).OnClick = _OnGameUpdate;
+ EventTriggerListener.Get(_btn_ignore.gameObject).OnClick = _OnGameIgnor;
+ EventTriggerListener.Get(_btn_package.gameObject).OnClick = _OnInvoke;
+ }
+
+ public override void OnEnter(object data)
+ {
+ _btn_ignore.gameObject.SetActive(false);
+ _btn_package.gameObject.SetActive(false);
+ _btn_update.gameObject.SetActive(false);
+ switch (Showtype)
+ {
+ case MessageShowType.OneButton:
+ _btn_update.gameObject.SetActive(true);
+ break;
+ case MessageShowType.TwoButton:
+ _btn_update.gameObject.SetActive(true);
+ _btn_ignore.gameObject.SetActive(true);
+ break;
+ case MessageShowType.ThreeButton:
+ _btn_ignore.gameObject.SetActive(true);
+ _btn_package.gameObject.SetActive(true);
+ _btn_package.gameObject.SetActive(true);
+ break;
+ }
+ _label_desc.text = data.ToString();
+ }
+
+ private void _OnGameUpdate(GameObject obj)
+ {
+ if (OnOk == null)
+ {
+ _label_desc.text = "该按钮不应该存在";
+ }
+ else
+ {
+ OnOk();
+ _OnClose();
+ }
+ }
+
+ private void _OnGameIgnor(GameObject obj)
+ {
+ if (OnCancle == null)
+ {
+ _label_desc.text = "该按钮不应该存在";
+ }
+ else
+ {
+ OnCancle();
+ _OnClose();
+ }
+ }
+
+ private void _OnInvoke(GameObject obj)
+ {
+ if (OnOk == null)
+ {
+ _label_desc.text = "该按钮不应该存在";
+ }
+ else
+ {
+ OnOk();
+ _OnClose();
+ }
+ }
+
+ private void _OnClose()
+ {
+ UILoadMgr.Hide(UIDefine.UILoadTip);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadTip.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadTip.cs.meta
new file mode 100644
index 00000000..ccd35092
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadTip.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1d32acf4f4a006a4986b0c39320a1a99
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadUpdate.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadUpdate.cs
new file mode 100644
index 00000000..96688da1
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadUpdate.cs
@@ -0,0 +1,156 @@
+using System.IO;
+using TEngine;
+using UnityEngine;
+using UnityEngine.PlayerLoop;
+using UnityEngine.UI;
+
+namespace TEngine.UI
+{
+ public class UILoadUpdate : UIBase
+ {
+#pragma warning disable 649
+ [SerializeField]
+ public Button _btn_clear;
+ [SerializeField]
+ public Scrollbar _obj_progress;
+ [SerializeField]
+ public Text _label_desc;
+ [SerializeField]
+ public Text _label_appid;
+ [SerializeField]
+ public Text _label_resid;
+#pragma warning restore 649
+
+ public virtual void Start()
+ {
+ EventTriggerListener.Get(_btn_clear.gameObject).OnClick = OnClear;
+ _btn_clear.gameObject.SetActive(true);
+ }
+
+ public virtual void OnEnable()
+ {
+ LoadUpdateLogic.Instance.Download_Complete_Action += DownLoad_Complete_Action;
+ LoadUpdateLogic.Instance.Down_Progress_Action += DownLoad_Progress_Action;
+ LoadUpdateLogic.Instance._Unpacked_Complete_Action += Unpacked_Complete_Action;
+ LoadUpdateLogic.Instance._Unpacked_Progress_Action += Unpacked_Progress_Action;
+ RefreshVersion();
+ }
+
+ public override void OnEnter(object param)
+ {
+ base.OnEnter(param);
+ _label_desc.text = param.ToString();
+ RefreshVersion();
+ }
+
+ public virtual void Update()
+ {
+
+ }
+
+ private void RefreshVersion()
+ {
+ _label_appid.text = string.Format(LoadText.Instance.Label_App_id, GameConfig.Instance.GameBundleVersion);
+ _label_resid.text = string.Format(LoadText.Instance.Label_Res_id, GameConfig.Instance.ResId);
+ }
+
+ public virtual void OnContinue(GameObject obj)
+ {
+ LoadMgr.Instance.StartDownLoad();
+ }
+
+ public virtual void OnStop(GameObject obj)
+ {
+ LoadMgr.Instance.StopDownLoad();
+ }
+
+ ///
+ /// 清空本地缓存
+ ///
+ ///
+ public virtual void OnClear(GameObject obj)
+ {
+ OnStop(null);
+ LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_Clear_Comfirm, MessageShowType.TwoButton,
+ LoadStyle.StyleEnum.Style_Clear,
+ () =>
+ {
+ LoaderUtilities.DeleteFolder(FileSystem.ResourceRoot);
+ Application.Quit();
+ },()=> {
+ OnContinue(null);
+ });
+ }
+
+ ///
+ /// 下载进度完成
+ ///
+ ///
+ public virtual void DownLoad_Complete_Action(int type)
+ {
+
+ }
+ ///
+ /// 下载进度更新
+ ///
+ ///
+ public virtual void DownLoad_Progress_Action(long size)
+ {
+ if (LoadMgr.Instance.Downloader != null)
+ {
+ _obj_progress.gameObject.SetActive(true);
+ _label_desc.text = string.Format(LoadText.Instance.Label_Load_Progress, LoaderUtilities.FormatData(LoadMgr.Instance.Downloader.Speed), LoaderUtilities.FormatData(LoadMgr.Instance.Downloader.FileSize));
+ float pro = (float)(LoadMgr.Instance.Downloader.DownLoadSize + size) / LoadMgr.Instance.Downloader.FileSize;
+ _obj_progress.size = pro;
+ }
+ }
+
+ ///
+ /// 解压缩完成回调
+ ///
+ ///
+ ///
+ public virtual void Unpacked_Complete_Action(bool type,GameStatus status)
+ {
+ _obj_progress.gameObject.SetActive(true);
+ _label_desc.text = LoadText.Instance.Label_Load_UnpackComplete;
+ if (status == GameStatus.AssetLoad)
+ {
+ LoadMgr.Instance.StartGame();
+ }
+ else
+ {
+ TLogger.LogError("error emnu type");
+ }
+ }
+
+ ///
+ /// 解压缩进度更新
+ ///
+ ///
+ ///
+ public virtual void Unpacked_Progress_Action(float progress,GameStatus status)
+ {
+ _obj_progress.gameObject.SetActive(true);
+ if (status == GameStatus.First)
+ {
+ _label_desc.text = LoadText.Instance.Label_Load_FirstUnpack;
+ }
+ else
+ {
+ _label_desc.text = LoadText.Instance.Label_Load_Unpacking;
+ }
+ _obj_progress.size = progress;
+ }
+
+ public virtual void OnDisable()
+ {
+ OnStop(null);
+ LoadUpdateLogic.Instance.Download_Complete_Action -= DownLoad_Complete_Action;
+ LoadUpdateLogic.Instance.Down_Progress_Action -= DownLoad_Progress_Action;
+ LoadUpdateLogic.Instance._Unpacked_Complete_Action -= Unpacked_Complete_Action;
+ LoadUpdateLogic.Instance._Unpacked_Progress_Action -= Unpacked_Progress_Action;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadUpdate.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadUpdate.cs.meta
new file mode 100644
index 00000000..a94f5deb
--- /dev/null
+++ b/Assets/TEngine/Runtime/HotUpdate/Runtime/UI/UILoadUpdate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f0fad7cbc10b815488c9e6ebfeccb210
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins.meta b/Assets/TEngine/Runtime/Plugins.meta
new file mode 100644
index 00000000..a9e9da38
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 295231c456308a3489cdced651aca93f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip.meta b/Assets/TEngine/Runtime/Plugins/FastZip.meta
new file mode 100644
index 00000000..beda5bcd
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7f982917076a87a479ae4841d2594028
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android.meta
new file mode 100644
index 00000000..9f03e67d
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: b56f8e932ff91f14295ddf698182a370
+folderAsset: yes
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs.meta
new file mode 100644
index 00000000..25b7f240
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 87cbb430f94b48d4ab644e722a322048
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a.meta
new file mode 100644
index 00000000..311089d2
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e05c782dc204e684aae3f33a6374df84
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so
new file mode 100644
index 00000000..89262f93
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so.meta
new file mode 100644
index 00000000..84268d50
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so.meta
@@ -0,0 +1,91 @@
+fileFormatVersion: 2
+guid: e157dfd997d54274a9af3a43fcc05c0a
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARM64
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a.meta
new file mode 100644
index 00000000..3cee7469
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 38863d726795ebb42bc114993d8cad38
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so
new file mode 100644
index 00000000..3e3cb2b9
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so.meta
new file mode 100644
index 00000000..7b8f8061
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: e0ac0d8b209d6de42a752b9e7880bb4c
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86.meta
new file mode 100644
index 00000000..c5b87e9a
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 363f2b1493186de48becf1eed604a2d8
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86/libzipw.so b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86/libzipw.so
new file mode 100644
index 00000000..f3249a8a
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86/libzipw.so differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86/libzipw.so.meta b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86/libzipw.so.meta
new file mode 100644
index 00000000..1c85da82
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/Android/libs/x86/libzipw.so.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 6f5e23db3d9df934c833d3710f7b60f0
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/FastZip.cs b/Assets/TEngine/Runtime/Plugins/FastZip/FastZip.cs
new file mode 100644
index 00000000..fd6627c4
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/FastZip.cs
@@ -0,0 +1,3935 @@
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using System.Text;
+using UnityEngine;
+
+public class FastZip
+{
+#if !UNITY_WEBPLAYER || UNITY_EDITOR
+
+
+#if (UNITY_IPHONE || UNITY_IOS || UNITY_TVOS || UNITY_WEBGL) && !UNITY_EDITOR
+#if (UNITY_IPHONE || UNITY_IOS) && !UNITY_WEBGL && !UNITY_TVOS
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zsetPermissions(string filePath, string _user, string _group, string _other);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipCD(int levelOfCompression, string zipArchive, string inFilePath, string fileName, string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2, int diskSize, IntPtr bprog);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipEX(string zipArchive, string outPath, IntPtr progress, IntPtr FileBuffer, int fileBufferLength, IntPtr proc, [MarshalAs(UnmanagedType.LPStr)] string password);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipEntry(string zipArchive, string arc_filename, string outpath, IntPtr FileBuffer,int fileBufferLength, IntPtr proc, [MarshalAs(UnmanagedType.LPStr)] string password);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern bool zipBuf2File(int levelOfCompression, string zipArchive, string arc_filename, IntPtr buffer, int bufferSize, string comment,[MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipDeleteFile(string zipArchive, string arc_filename, string tempArchive);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipCDList(int levelOfCompression, string zipArchive, IntPtr filename, int arrayLength, IntPtr prog, IntPtr filenameForced, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2, int diskSize, IntPtr bprog);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int gzip_File(string inFile, string outFile, int level, IntPtr progress, bool addHeader);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int ungzip_File(string inFile, string outFile, IntPtr progress);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int readTarA(string zipArchive, IntPtr total);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr readTar(string zipArchive, int size, IntPtr unc);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int createTar(string outFile, IntPtr filePath, IntPtr filename, int arrayLength, IntPtr prog, IntPtr bprog);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int extractTar(string inFile, string outDir, string entry, IntPtr prog, IntPtr bprog, bool fullPaths);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int bz2(bool decompress, int level, string inFile, string outFile, IntPtr byteProgress);
+#endif
+
+#if (UNITY_IPHONE || UNITY_IOS || UNITY_TVOS || UNITY_WEBGL)
+
+ // Send cancel signal to the following operations:
+ // - compress a single file
+ // - compress directory or list of files
+ // - extract a single file to the file system
+ // - extract a zip to the file system.
+ // - entry2Buffer
+ //
+ // This function is useful when the zip operation is executed in a Thread.
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void setCancel();
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern void releaseBuffer(IntPtr buffer);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr zipCompressBuffer(IntPtr source, int sourceLen, int levelOfCompression, ref int v);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr zipDecompressBuffer(IntPtr source, int sourceLen, ref int v);
+
+ //gzip section
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ internal static extern int zipGzip(IntPtr source, int sourceLen, IntPtr outBuffer, int levelOfCompression, bool addHeader, bool addFooter);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ internal static extern int zipUnGzip(IntPtr source, int sourceLen, IntPtr outBuffer, int outLen, bool hasHeader, bool hasFooter);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ internal static extern int zipUnGzip2(IntPtr source, int sourceLen, IntPtr outBuffer, int outLen);
+ //
+
+ //inMemory section
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int freeMemStruct(IntPtr buffer);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr zipCDMem(IntPtr info, IntPtr pnt, int levelOfCompression, IntPtr source, int sourceLen, string fileName, string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr initMemStruct();
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr initFileStruct();
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int freeMemZ(IntPtr pointer);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int freeFileZ(IntPtr pointer);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr zipCDMemStart(IntPtr info, IntPtr pnt, IntPtr fileStruct, IntPtr memStruct);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipCDMemAdd(IntPtr zf, int levelOfCompression, IntPtr source, int sourceLen, string fileName, string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr zipCDMemClose(IntPtr zf, IntPtr memStruct, IntPtr info, int err);
+ //
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern uint getEntryDateTime(string zipArchive, string arc_filename, IntPtr FileBuffer,int fileBufferLength);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipGetTotalFiles(string zipArchive, IntPtr FileBuffer, int fileBufferLength);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipGetTotalEntries(string zipArchive, IntPtr FileBuffer, int fileBufferLength);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipGetInfoA(string zipArchive, IntPtr total, IntPtr FileBuffer, int fileBufferLength);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr zipGetInfo(string zipArchive, int size, IntPtr unc, IntPtr comp, IntPtr offs, IntPtr FileBuffer, int fileBufferLength);
+
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern bool zipEntryExists(string zipArchive, string entry, IntPtr FileBuffer, int fileBufferLength);
+
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern bool zipValidateFile(string zip_Archive, IntPtr FileBuffer, int fileBufferLength);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern ulong zipGetEntrySize(string zipArchive, string entry, IntPtr FileBuffer, int fileBufferLength);
+ [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+ private static extern int zipEntry2Buffer(string zipArchive, string entry, IntPtr buffer, int bufferSize, IntPtr FileBuffer, int fileBufferLength, [MarshalAs(UnmanagedType.LPStr)] string password);
+#endif
+#endif
+
+#if UNITY_5_4_OR_NEWER
+#if (UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_WEBGL) && !UNITY_EDITOR || UNITY_EDITOR_LINUX
+ private const string libname = "zipw";
+#elif UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
+ private const string libname = "libzipw";
+#endif
+#else
+#if (UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_WEBGL) && !UNITY_EDITOR
+ private const string libname = "zipw";
+#endif
+#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
+ private const string libname = "libzipw";
+#endif
+#endif
+
+#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX
+
+#if ((!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR)
+
+#if (UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX || UNITY_ANDROID || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX) && !UNITY_EDITOR_WIN
+ [DllImport(libname, EntryPoint = "zsetPermissions"
+#if (UNITY_ANDROID && !UNITY_EDITOR)
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int zsetPermissions(string filePath, string _user, string _group, string _other);
+#endif
+
+
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ // CP_ACP = 0
+ // CP_OEMCP/UNICODE = 1
+ // CP_UTF8 = 65001 (default)
+ // CP_WINUNICODE = 1200
+ // https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
+
+ [DllImport(libname, EntryPoint = "setTarEncoding"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP)
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ , CharSet = CharSet.Auto)]
+ public static extern bool setTarEncoding(uint encoding);
+
+#endif
+
+
+ [DllImport(libname, EntryPoint = "zipValidateFile"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern bool zipValidateFile(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, IntPtr FileBuffer, int fileBufferLength);
+
+ [DllImport(libname, EntryPoint = "zipGetTotalFiles"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipGetTotalFiles(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, IntPtr FileBuffer, int fileBufferLength);
+
+
+ [DllImport(libname, EntryPoint = "zipGetTotalEntries"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipGetTotalEntries(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, IntPtr FileBuffer, int fileBufferLength);
+
+
+ [DllImport(libname, EntryPoint = "zipGetInfoA"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipGetInfoA(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, IntPtr total, IntPtr FileBuffer, int fileBufferLength);
+
+
+ [DllImport(libname, EntryPoint = "zipGetInfo"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern IntPtr zipGetInfo(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, int size, IntPtr unc, IntPtr comp, IntPtr offs, IntPtr FileBuffer, int fileBufferLength);
+
+
+ [DllImport(libname, EntryPoint = "releaseBuffer"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern void releaseBuffer(IntPtr buffer);
+
+
+ [DllImport(libname, EntryPoint = "zipGetEntrySize"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern ulong zipGetEntrySize(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string entry, IntPtr FileBuffer, int fileBufferLength);
+
+ [DllImport(libname, EntryPoint = "zipEntryExists"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern bool zipEntryExists(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string entry, IntPtr FileBuffer, int fileBufferLength);
+
+ [DllImport(libname, EntryPoint = "zipCD"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipCD(
+ int levelOfCompression,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+# endif
+ string inFilePath,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string fileName,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2, int diskSize, IntPtr bprog
+ );
+
+ [DllImport(libname, EntryPoint = "zipCDList"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipCDList(
+ int levelOfCompression,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, IntPtr filename, int arrayLength, IntPtr prog, IntPtr filenameForced,
+ [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2, int diskSize, IntPtr bprog
+ );
+
+ [DllImport(libname, EntryPoint = "zipBuf2File"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern bool zipBuf2File(int levelOfCompression,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+# endif
+ string arc_filename, IntPtr buffer, int bufferSize,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2
+ );
+
+ [DllImport(libname, EntryPoint = "zipDeleteFile"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipDeleteFile(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string arc_filename,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string tempArchive);
+
+
+ [DllImport(libname, EntryPoint = "zipEntry2Buffer"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipEntry2Buffer(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string entry, IntPtr buffer, int bufferSize, IntPtr FileBuffer, int fileBufferLength,
+ [MarshalAs(UnmanagedType.LPStr)] string password);
+
+ [DllImport(libname, EntryPoint = "zipCompressBuffer"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern IntPtr zipCompressBuffer(IntPtr source, int sourceLen, int levelOfCompression, ref int v);
+
+ [DllImport(libname, EntryPoint = "zipDecompressBuffer"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern IntPtr zipDecompressBuffer(IntPtr source, int sourceLen, ref int v);
+
+ [DllImport(libname, EntryPoint = "zipEX"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipEX(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outPath, IntPtr progress, IntPtr FileBuffer, int fileBufferLength, IntPtr proc,
+ [MarshalAs(UnmanagedType.LPStr)] string password);
+
+
+ [DllImport(libname, EntryPoint = "zipEntry"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipEntry(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string arc_filename,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outpath, IntPtr FileBuffer, int fileBufferLength, IntPtr proc,
+ [MarshalAs(UnmanagedType.LPStr)] string password);
+
+
+ [DllImport(libname, EntryPoint = "getEntryDateTime"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern uint getEntryDateTime(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string arc_filename, IntPtr FileBuffer, int fileBufferLength);
+
+ //inMemory section
+ [DllImport(libname, EntryPoint = "freeMemStruct"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int freeMemStruct(IntPtr buffer);
+
+ [DllImport(libname, EntryPoint = "zipCDMem"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern IntPtr zipCDMem(IntPtr info, IntPtr pnt, int levelOfCompression, IntPtr source,
+ int sourceLen,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string fileName,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2
+ );
+
+
+ [DllImport(libname, EntryPoint = "initMemStruct"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern IntPtr initMemStruct();
+
+ [DllImport(libname, EntryPoint = "initFileStruct"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern IntPtr initFileStruct();
+
+
+ [DllImport(libname, EntryPoint = "freeMemZ"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int freeMemZ(IntPtr pointer);
+
+ [DllImport(libname, EntryPoint = "freeFileZ"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int freeFileZ(IntPtr pointer);
+
+
+ [DllImport(libname, EntryPoint = "zipCDMemStart"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern IntPtr zipCDMemStart(IntPtr info, IntPtr pnt, IntPtr fileStruct, IntPtr memStruct);
+
+
+ [DllImport(libname, EntryPoint = "zipCDMemAdd"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int zipCDMemAdd(IntPtr zf, int levelOfCompression, IntPtr source, int sourceLen,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string fileName,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string comment, [MarshalAs(UnmanagedType.LPStr)] string password, bool useBz2
+ );
+
+ [DllImport(libname, EntryPoint = "zipCDMemClose"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern IntPtr zipCDMemClose(IntPtr zf, IntPtr memStruct, IntPtr info, int err);
+
+
+ //gzip section
+ [DllImport(libname, EntryPoint = "zipGzip"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int zipGzip(IntPtr source, int sourceLen, IntPtr outBuffer, int levelOfCompression,
+ bool addHeader, bool addFooter);
+
+
+ [DllImport(libname, EntryPoint = "zipUnGzip"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int zipUnGzip(IntPtr source, int sourceLen, IntPtr outBuffer, int outLen, bool hasHeader,
+ bool hasFooter);
+
+ [DllImport(libname, EntryPoint = "zipUnGzip2"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int zipUnGzip2(IntPtr source, int sourceLen, IntPtr outBuffer, int outLen);
+
+ [DllImport(libname, EntryPoint = "gzip_File"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int gzip_File(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string inFile,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outFile, int level, IntPtr progress, bool addHeader);
+
+ [DllImport(libname, EntryPoint = "ungzip_File"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ internal static extern int ungzip_File(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string inFile,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outFile, IntPtr progress);
+
+ // Send cancel signal to the following operations:
+ // - compress a single file
+ // - compress directory or list of files
+ // - extract a single file to the file system
+ // - extract a zip to the file system.
+ // - entry2Buffer
+ //
+ // This function is useful when the zip operation is executed in a Thread.
+ [DllImport(libname, EntryPoint = "setCancel"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+ )]
+ public static extern void setCancel();
+
+
+ [DllImport(libname, EntryPoint = "readTarA"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Ansi
+#endif
+ )]
+ internal static extern int readTarA(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, IntPtr total);
+
+
+ [DllImport(libname, EntryPoint = "readTar"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Ansi
+#endif
+ )]
+ internal static extern IntPtr readTar(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string zipArchive, int size, IntPtr unc);
+
+
+ [DllImport(libname, EntryPoint = "createTar"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Ansi
+#endif
+ )]
+ internal static extern int createTar(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outFile, IntPtr filePath, IntPtr filename, int arrayLength, IntPtr prog, IntPtr bprog
+ );
+
+ //int extractTar(char* inFile, char* outDir)
+ [DllImport(libname, EntryPoint = "extractTar"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Ansi
+#endif
+ )]
+ internal static extern int extractTar(
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string inFile,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outDir,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string entry, IntPtr prog, IntPtr bprog, bool fullPaths
+ );
+
+
+ [DllImport(libname, EntryPoint = "bz2"
+#if (UNITY_STANDALONE_WIN && ENABLE_IL2CPP) || UNITY_ANDROID
+ , CallingConvention = CallingConvention.Cdecl
+#endif
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ , CharSet = CharSet.Auto
+#endif
+ )]
+ internal static extern int bz2(bool decompress, int level,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string inFile,
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
+ [MarshalAs(UnmanagedType.LPWStr)]
+#endif
+ string outFile, IntPtr byteProgress
+ );
+
+#endif
+#endif
+
+
+ internal static GCHandle gcA(object o)
+ {
+ return GCHandle.Alloc(o, GCHandleType.Pinned);
+ }
+
+
+ // A function that returns the total number of files in a zip archive (files only, no folders).
+ //
+ // zipArchive : the zip to be checked
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ //
+ // ERROR CODES
+ // : -1 = failed to access zip archive
+ // : any number>0 = the number of files in the zip archive
+ //
+ public static int getTotalFiles(string zipArchive, byte[] FileBuffer = null)
+ {
+ int res = 0;
+
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipGetTotalFiles(null, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+
+ fbuf.Free();
+ return res;
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipGetTotalFiles(@zipArchive, IntPtr.Zero, 0);
+#endif
+
+ return res;
+ }
+
+ // A function that will return the total entries in a zip arcive. (files + folders)
+ //
+ // zipArchive : the zip to be checked
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ //
+ // ERROR CODES
+ // : -2 = failed to access zip archive
+ // : any number>0 = the number of entries in the zip archive
+ //
+ public static int getTotalEntries(string zipArchive, byte[] FileBuffer = null)
+ {
+ int res = 0;
+
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipGetTotalEntries(null, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+
+ fbuf.Free();
+ return res;
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipGetTotalEntries(@zipArchive, IntPtr.Zero, 0);
+#endif
+
+ return res;
+ }
+
+
+ // Lists get filled with filenames (including path if the file is in a folder) and uncompressed file sizes
+ // Call getFileInfo(string zipArchive, string path) to get them filled. After that you can iterate through them to get the info you want.
+ public static List ninfo = new List(); //filenames
+ public static List uinfo = new List(); //uncompressed file sizes
+ public static List cinfo = new List(); //compressed file sizes
+
+ // Local offset file header. (usefull when the STORE method is used to grab a file from the zip.)
+ // For archives with the STORE method you should add + 30 bytes + name.length extra offset.
+ public static List localOffset = new List();
+
+ public static int zipFiles, zipFolders; // global integers that store the number of files and folders in a zip file.
+
+ // Global value of the compressed size of all the files in a zip archive. (gets updated when calling getFileinfo).
+ public static ulong totalCompressedSize;
+
+ // Global value of the uncompressed size of all the files in a zip archive. (gets updated when calling getFileinfo).
+ public static ulong totalUncompressedSize;
+
+ // This function returns the index of an entry assuming the getFileInfo function was called prior on a zip file.
+ //
+ // entry: the entry for which we want to get the index.
+ // Returns -1 if no entry was found in the List.
+ public static int getEntryIndex(string entry)
+ {
+ if (ninfo == null || ninfo.Count == 0) return -1;
+
+ int index = -1;
+ for (int i = 0; i < ninfo.Count; i++)
+ {
+ if (entry == ninfo[i])
+ {
+ index = i;
+ break;
+ }
+ }
+
+ return index;
+ }
+
+ // This function fills the Lists with the filenames and file sizes that are in the zip file
+ // Returns : the total size of uncompressed bytes of the files in the zip archive
+ //
+ // zipArchive : the full path to the archive, including the archives name. (/myPath/myArchive.zip)
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ //
+ // ERROR CODES : 0 = Input file not found or Could not get info
+ //
+ public static UInt64 getFileInfo(string zipArchive, byte[] FileBuffer = null)
+ {
+ ninfo.Clear();
+ uinfo.Clear();
+ cinfo.Clear();
+ localOffset.Clear();
+ zipFiles = 0;
+ zipFolders = 0;
+ totalCompressedSize = 0;
+ totalUncompressedSize = 0;
+
+ int res = 0;
+
+ int[] tt = new int[1];
+ var tb = gcA(tt);
+
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipGetInfoA(null, tb.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipGetInfoA(@zipArchive, tb.AddrOfPinnedObject(), IntPtr.Zero, 0);
+#endif
+ }
+
+ tb.Free();
+
+ if (res <= 0) return 0;
+
+ IntPtr uni = IntPtr.Zero;
+
+ UInt64[] unc = new UInt64[tt[0]];
+ UInt64[] comp = new UInt64[tt[0]];
+ UInt64[] offs = new UInt64[tt[0]];
+
+ var uncb = gcA(unc);
+ var compb = gcA(comp);
+ var offsb = gcA(offs);
+
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ uni = zipGetInfo(null, res, uncb.AddrOfPinnedObject(), compb.AddrOfPinnedObject(),
+ offsb.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ uni = zipGetInfo(@zipArchive, res, uncb.AddrOfPinnedObject(), compb.AddrOfPinnedObject(),
+ offsb.AddrOfPinnedObject(), IntPtr.Zero, 0);
+#endif
+ }
+
+ if (uni == IntPtr.Zero)
+ {
+ uncb.Free();
+ compb.Free();
+ offsb.Free();
+ return 0;
+ }
+
+ string str = Marshal.PtrToStringAuto(uni);
+ StringReader r = new StringReader(str);
+ string line;
+ UInt64 sum = 0;
+
+ for (int i = 0; i < tt[0]; i++)
+ {
+ if ((line = r.ReadLine()) != null) ninfo.Add(line);
+ if (unc != null)
+ {
+ uinfo.Add(unc[i]);
+ sum += unc[i];
+ if (unc[i] > 0) zipFiles++;
+ else zipFolders++;
+ }
+
+ if (comp != null)
+ {
+ cinfo.Add(comp[i]);
+ totalCompressedSize += comp[i];
+ }
+
+ if (offs != null) localOffset.Add(offs[i]);
+ }
+
+ r.Close();
+ r.Dispose();
+ uncb.Free();
+ compb.Free();
+ offsb.Free();
+ releaseBuffer(uni);
+ tt = null;
+ unc = null;
+ comp = null;
+ offs = null;
+
+ totalUncompressedSize = sum;
+ return sum;
+ }
+
+
+ // A function that returns the uncompressed size of a file in a zip archive.
+ //
+ // zipArchive : the zip archive to get the info from.
+ // entry : the entry for which we want to know it uncompressed size.
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ //
+ public static ulong getEntrySize(string zipArchive, string entry, byte[] FileBuffer = null)
+ {
+ ulong res = 0;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipGetEntrySize(null, entry, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+
+ fbuf.Free();
+ return res;
+ }
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipGetEntrySize(@zipArchive, entry, IntPtr.Zero, 0);
+#endif
+ return res;
+ }
+
+
+ // A function that tells if an entry in zip archive exists.
+ //
+ // Returns true or false.
+ //
+ // zipArchive : the zip archive to get the info from.
+ // entry : the entry for which we want to know if it exists.
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ //
+ public static bool entryExists(string zipArchive, string entry, byte[] FileBuffer = null)
+ {
+ bool res = false;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipEntryExists(null, entry, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+
+ fbuf.Free();
+ return res;
+ }
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipEntryExists(@zipArchive, entry, IntPtr.Zero, 0);
+#endif
+ return res;
+ }
+
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+
+ // A function that compresses a byte buffer and writes it to a zip file. I you set the append flag to true, the output will get appended to an existing zip archive.
+ //
+ // levelOfCompression : (0-9) recommended 9 for maximum. (0 = Store method.)
+ // zipArchive : the full path to the zip archive to be created or append to.
+ // arc_filename : the name of the file that will be written to the archive.
+ // buffer : the buffer that will be compressed and will be put in the zip archive.
+ // append : set to true if you want the output to be appended to an existing zip archive.
+ // comment : an optional comment for this entry.
+ // password : an optional password to encrypt this entry.
+ // useBz2 : set to true if you want bz2 compression instead of zlib. (not available for MacOS/iOS/tvOS)
+ //
+ // ERROR CODES : true = success
+ // : false = failed
+ //
+ public static bool buffer2File(int levelOfCompression, string zipArchive, string arc_filename, byte[] buffer,
+ bool append = false, string comment = null, string password = null, bool useBz2 = false
+ )
+ {
+ if (!append)
+ {
+ if (File.Exists(@zipArchive)) File.Delete(@zipArchive);
+ }
+
+ var sbuf = gcA(buffer);
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 9) levelOfCompression = 9;
+ if (password == "") password = null;
+ if (comment == "") comment = null;
+ bool res = zipBuf2File(levelOfCompression, @zipArchive, arc_filename, sbuf.AddrOfPinnedObject(), buffer.Length,
+ comment, password, useBz2);
+ sbuf.Free();
+ return res;
+ }
+
+
+ // A function that deletes a file in a zip archive. It creates a temp file where the compressed data of the old archive is copied except the one that needs to be deleted.
+ // After that the old zip archive is deleted and the temp file gets renamed to the original zip archive.
+ // You can delete directories too if they are empty.
+ //
+ // zipArchive : the full path to the zip archive
+ // arc_filename : the name of the file that will be deleted.
+ //
+ // ERROR CODES : 1 = success
+ // : -1 = failed to open zip
+ // : -2 = failed to locate the archive to be deleted in the zip file
+ // : -3 = error copying compressed data from original zip
+ // : -4 = failed to create temp zip file.
+ //
+ public static int delete_entry(string zipArchive, string arc_filename)
+ {
+ string tmp = @zipArchive + ".tmp";
+ int res = zipDeleteFile(@zipArchive, @arc_filename, tmp);
+
+ if (res > 0)
+ {
+ File.Delete(@zipArchive);
+ File.Move(tmp, @zipArchive);
+ }
+ else
+ {
+ if (File.Exists(tmp)) File.Delete(tmp);
+ }
+
+ return res;
+ }
+
+
+ // A function that replaces an entry in a zip archive with a file that lies in a path. The original name of the archive will be used.
+ //
+ // zipArchive : the full path to the zip archive
+ // arc_filename : the name of the file that will be replaced.
+ // newFilePath : a path to the file that will replace the original entry.
+ // level: : the level of compression of the new entry. (0 = Store method.)
+ // comment : add a comment for the file in the zip file header.
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ //
+ // ERROR CODES
+ // : -1 = could not create or append
+ // : -2 = error during operation
+ // : -3 = failed to delete original entry
+ //
+
+ public static int replace_entry(string zipArchive, string arc_filename, string newFilePath, int level = 9,
+ string comment = null, string password = null, bool useBz2 = false)
+ {
+ int res = delete_entry(@zipArchive, @arc_filename);
+ if (res < 0) return -3;
+ if (password == "") password = null;
+ if (comment == "") comment = null;
+ return zipCD(level, @zipArchive, newFilePath, @arc_filename, comment, password, useBz2, 0, IntPtr.Zero);
+ }
+
+ // A function that replaces an entry in a zip archive with a buffer. The original name of the archive will be used.
+ //
+ // zipArchive : the full path to the zip archive
+ // arc_filename : the name of the file that will be replaced.
+ // newFileBuffer : a byte buffer that will replace the original entry.
+ // level: : the level of compression of the new entry. (0 = Store method.)
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ //
+ // ERROR CODES
+ // : 1 = success
+ // : -5 = failed to delete the original file
+ // : -6 = failed to append the buffer to the zip
+
+ public static int replace_entry(string zipArchive, string arc_filename, byte[] newFileBuffer, int level = 9,
+ string password = null, bool useBz2 = false)
+ {
+ int res = delete_entry(@zipArchive, @arc_filename);
+ if (res < 0) return -5;
+
+ if (buffer2File(level, @zipArchive, @arc_filename, newFileBuffer, true, null, password, useBz2)) return 1;
+ else return -6;
+ }
+
+
+ // A function that will extract only the specified file that resides in a zip archive.
+ //
+ // zipArchive : the full path to the zip archive from which we want to extract the specific file.
+ // arc_filename : the specific file we want to extract. (If the file resides in a directory, the directory path should be included. like dir1/dir2/myfile.bin)
+ // : --> on some zip files the internal dir structure uses \\ instead of / characters for directories separators. In that case use the appropriate
+ // : --> chars that will allow the file to be extracted.
+ // outpath : the full path to where the file should be extracted + the desired name for it.
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ // proc: : a single item ulong array that gets updated with the progress of the decompression in bytes.
+ // (100% is reached when the decompressed size of the file is reached.)
+ // password : if needed, the password to decrypt the entry.
+ //
+ // ERROR CODES : -1 = extraction failed
+ // : -2 = could not initialize zip archive.
+ // : -3 = could not locate entry
+ // : -4 = could not get entry info
+ // : -5 = password error
+ // : 1 = success
+ //
+ public static int extract_entry(string zipArchive, string arc_filename, string outpath, byte[] FileBuffer = null,
+ ulong[] proc = null, string password = null)
+ {
+ if (!Directory.Exists(Path.GetDirectoryName(outpath))) return -1;
+
+ int res = -1;
+ if (proc == null) proc = new ulong[1];
+ var pbuf = gcA(proc);
+
+#if (UNITY_IPHONE || UNITY_IOS || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR || UNITY_STANDALONE_WIN)
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+
+ if (proc != null)
+ res = zipEntry(null, arc_filename, @outpath, fbuf.AddrOfPinnedObject(), FileBuffer.Length,
+ pbuf.AddrOfPinnedObject(), password);
+ else
+ res = zipEntry(null, arc_filename, @outpath, fbuf.AddrOfPinnedObject(), FileBuffer.Length, IntPtr.Zero,
+ password);
+
+ fbuf.Free();
+ pbuf.Free();
+ return res;
+ }
+#endif
+
+ if (proc != null)
+ res = zipEntry(@zipArchive, arc_filename, @outpath, IntPtr.Zero, 0, pbuf.AddrOfPinnedObject(), password);
+ else res = zipEntry(@zipArchive, arc_filename, @outpath, IntPtr.Zero, 0, IntPtr.Zero, password);
+ pbuf.Free();
+ return res;
+ }
+
+
+ // A function that decompresses a zip file. If the zip contains directories, they will be created.
+ //
+ // zipArchive : the full path to the zip archive that will be decompressed.
+ // outPath : the directory in which the zip contents will be extracted. If null the same path as the zip's path will be used.
+ // progress : a single item integer array that gets updated with the number of files decompressed. To use it in realtime, call
+ // : this function in a separate thread. Usefull for broad progress. Otherwise use the proc variable below.
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ // proc: : a single item ulong array that gets updated with the progress of the decompression in bytes.
+ // (100% is reached when the decompressed size of the files is reached.)
+ // password : if needed, the password to decrypt the archive.
+ //
+ // ERROR CODES
+ // : -1 = could not initialize zip archive.
+ // : -2 = failed extraction
+ // : 1 = success
+ //
+ public static int decompress_File(string zipArchive, string outPath = null, int[] progress = null,
+ byte[] FileBuffer = null, ulong[] proc = null, string password = null)
+ {
+ // if outPath == null use the same path as the zips's path.
+ if (outPath == null) outPath = Path.GetDirectoryName(zipArchive);
+
+ // make a check if the last '/' exists at the end of the exctractionPath and add it if it is missing
+ if (outPath.Substring(outPath.Length - 1, 1) != "/")
+ {
+ outPath += "/";
+ }
+
+ int res;
+ var ibuf = gcA(progress);
+ if (proc == null) proc = new ulong[1];
+ var pbuf = gcA(proc);
+
+#if (UNITY_IPHONE || UNITY_IOS || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR || UNITY_STANDALONE_WIN)
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+
+ if (proc != null)
+ res = zipEX(null, @outPath, ibuf.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length,
+ pbuf.AddrOfPinnedObject(), password);
+ else
+ res = zipEX(null, @outPath, ibuf.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length,
+ IntPtr.Zero, password);
+
+ fbuf.Free();
+ ibuf.Free();
+ pbuf.Free();
+ return res;
+ }
+#endif
+
+ if (proc != null)
+ res = zipEX(@zipArchive, @outPath, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0, pbuf.AddrOfPinnedObject(),
+ password);
+ else res = zipEX(@zipArchive, @outPath, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0, IntPtr.Zero, password);
+ ibuf.Free();
+ pbuf.Free();
+ return res;
+ }
+
+
+ // A function that compresses a file to a zip file. If the flag append is set to true then it will get appended to an existing zip file.
+ //
+ // levelOfCompression : (0-9) recommended 9 for maximum (0 = Store method.)
+ // zipArchive : the full path to the zip archive that will be created
+ // inFilePath : the full path to the file that should be compressed and added to the zip file.
+ // append : set to true if you want the input file to get appended to an existing zip file. (if the zip file does not exist it will be created.)
+ // filename : if you want the name of your file to be different then the one it has, set it here. If you add a folder structure to it,
+ // like (dir1/dir2/myfile.bin) the directories will be created in the zip file.
+ // comment : add a comment for the file in the zip file header.
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ // disksize : if a disksize is used > 0 then the zip archive will be split to the assigned disksize (in bytes).
+ // byteProgress : this variable is a single ulong array that keeps track of all the uncompressed bytes that have been processed. (set to 0 after finish).
+ // : To get a progress of the compression, store the sum of the files that will get zipped and compare it to byteProgress.
+ // ERROR CODES
+ // : 1 = success
+ // : -1 = could not create or append
+ // : -2 = error during operation
+ //
+ public static int compress_File(int levelOfCompression, string zipArchive, string inFilePath, bool append = false,
+ string fileName = "", string comment = null, string password = null, bool useBz2 = false, int diskSize = 0,
+ ulong[] byteProgress = null)
+ {
+ if (!File.Exists(@inFilePath)) return -10;
+ if (!append)
+ {
+ if (File.Exists(@zipArchive)) File.Delete(@zipArchive);
+ }
+
+ if (fileName == null || fileName == "") fileName = Path.GetFileName(@inFilePath);
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 9) levelOfCompression = 9;
+ if (password == "") password = null;
+ if (comment == "") comment = null;
+
+ int res = 0;
+ if (byteProgress == null)
+ res = zipCD(levelOfCompression, @zipArchive, @inFilePath, fileName, comment, password, useBz2, diskSize,
+ IntPtr.Zero);
+ else
+ {
+ var prog = gcA(byteProgress);
+ res = zipCD(levelOfCompression, @zipArchive, @inFilePath, fileName, comment, password, useBz2, diskSize,
+ prog.AddrOfPinnedObject());
+ prog.Free();
+ }
+
+ return res;
+ }
+
+ // A function that compresses a list of files to a zip file. Use this function to compress multiple files fast instead of appending to existing files with the compress_File function.
+ //
+ // levelOfCompression : (0-9) recommended 9 for maximum (0 = Store method.)
+ // zipArchive : the full path to the zip archive that will be created.
+ // inFilePath[] : an array of the full paths to the files that should be compressed and added to the zip file.
+ // progress : this var will increment until the number of the input files and this are equal.
+ // append : set to true if you want the input files to get appended to an existing zip file. (if the zip file does not exist it will be created.)
+ // filename[] : if you want the names of your files to be different then the one they have, set it here. If you add a folder structure to it,
+ // like (dir1/dir2/myfile.bin) the directories will be created in the zip file.
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ // diskSize : if a disksize is used > 0 then the zip archive will be split to the assigned disksize (in bytes).
+ // byteProgress : this variable is a single ulong array that keeps track of all the uncompressed bytes that have been processed. (set to 0 after finish).
+ // : To get a progress of the compression, store the sum of the files that will get zipped and compare it to byteProgress.
+ // ERROR CODES
+ // : 1 = success
+ // : -1 = could not create or append
+ // : -2 = error during operation
+ //
+ public static int compress_File_List(int levelOfCompression, string zipArchive, string[] inFilePath,
+ int[] progress = null, bool append = false, string[] fileName = null, string password = null,
+ bool useBz2 = false, int diskSize = 0, ulong[] byteProgress = null)
+ {
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 9) levelOfCompression = 9;
+ if (password == "") password = null;
+ if (!append)
+ {
+ if (File.Exists(@zipArchive)) File.Delete(@zipArchive);
+ }
+
+ if (inFilePath == null) return -3;
+
+ if (fileName != null && fileName.Length != inFilePath.Length) return -4;
+
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ if (!File.Exists(inFilePath[i])) return -10;
+ }
+
+ IntPtr[] fp = new IntPtr[inFilePath.Length];
+ IntPtr[] np = new IntPtr[inFilePath.Length];
+
+ int res = 0;
+
+ fillPointers(zipArchive, fileName, inFilePath, ref fp, ref np);
+
+ if (byteProgress == null) byteProgress = new ulong[1];
+ if (progress == null) progress = new int[1];
+
+ var faBuf = gcA(fp);
+ var naBuf = gcA(np);
+ var prog = gcA(progress);
+ var bProg = gcA(byteProgress);
+
+ res = zipCDList(levelOfCompression, @zipArchive, faBuf.AddrOfPinnedObject(), inFilePath.Length,
+ prog.AddrOfPinnedObject(), naBuf.AddrOfPinnedObject(), password, useBz2, diskSize,
+ bProg.AddrOfPinnedObject());
+
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ Marshal.FreeCoTaskMem(fp[i]);
+ Marshal.FreeCoTaskMem(np[i]);
+ }
+
+ faBuf.Free();
+ fp = null;
+ naBuf.Free();
+ np = null;
+
+ prog.Free();
+ bProg.Free();
+
+
+ return res;
+ }
+
+
+ // Compress a directory with all its files and subfolders to a zip file. This function is way faster when adding manually multiple files to a zip with the compress_File function.
+ //
+ // sourceDir : the directory you want to compress
+ // levelOfCompression : the level of compression (0-9). (0 = Store method.)
+ // zipArchive : the full path+name to the zip file to be created. If null the directory + ".zip" will be used.
+ // includeRoot : set to true if you want the root folder of the directory to be included in the zip archive. Otherwise leave it to false.
+ // progress : provide a single item integer array to write the current index of the files getting compressed.
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ // disksize : if a disksize is used > 0 then the zip archive will be split to the assigned disksize (in bytes).
+ // append : set to true if you want the input files to get appended to an existing zip file. (if the zip file does not exist it will be created.)
+ // byteProgress : this variable is a single ulong array that keeps track of all the uncompressed bytes that have been processed. (set to 0 after finish).
+ // : To get a progress of the compression, store the sum of the files that will get zipped and compare it to byteProgress.
+ //
+ // If you want to get the progress of compression, call the getAllFiles function to get the total number of files
+ // in a directory and its subdirectories. The compressDir when called from a separate thread will update the progress[0] provided parameter.
+ // Divide this with the total number of files (as floats) and you have the % of the procedure.
+ //
+ // ERROR CODES
+ // : 1 = success
+ // : -1 = could not create or append
+ // : -2 = error during operation
+ //
+
+ public static int compressDir(string sourceDir, int levelOfCompression, string zipArchive = null,
+ bool includeRoot = false, int[] progress = null, string password = null, bool useBz2 = false, int diskSize = 0,
+ bool append = false, ulong[] byteProgress = null)
+ {
+ if (!Directory.Exists(sourceDir)) return 0;
+
+ string fdir = @sourceDir.Replace("\\", "/");
+ if (sourceDir.Substring(sourceDir.Length - 1) != "/") fdir += "/";
+
+ if (zipArchive == null) zipArchive = sourceDir.Substring(0, sourceDir.Length - 1) + ".zip";
+
+ int totalFiles = getAllFiles(fdir);
+ if (totalFiles == 0) return 0;
+
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 9) levelOfCompression = 9;
+
+ int res = 0;
+
+ if (Directory.Exists(fdir))
+ {
+ List inFilePath = new List();
+ List fileName = new List();
+
+ fillLists(fdir, includeRoot, ref inFilePath, ref fileName);
+
+ res = compress_File_List(levelOfCompression, zipArchive, inFilePath.ToArray(), progress, append,
+ fileName.ToArray(), password, useBz2, diskSize, byteProgress);
+
+ inFilePath.Clear();
+ inFilePath = null;
+ fileName.Clear();
+ fileName = null;
+ }
+
+ return res;
+ }
+
+
+ private static void fillPointers(string outFile, string[] fileName, string[] inFilePath, ref IntPtr[] fp,
+ ref IntPtr[] np)
+ {
+ string[] fna = null;
+ string path = Path.GetDirectoryName(@outFile);
+
+ if (fileName == null)
+ {
+ fna = new string[inFilePath.Length];
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ fna[i] = inFilePath[i].Replace(path, "");
+ }
+ }
+ else
+ {
+ fna = fileName;
+ }
+
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ if (fna[i] == null) fna[i] = inFilePath[i].Replace(path, "");
+ }
+
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ inFilePath[i] = inFilePath[i].Replace("\\", "/");
+ fna[i] = fna[i].Replace("\\", "/");
+
+ fp[i] = Marshal.StringToCoTaskMemAuto(inFilePath[i]);
+ np[i] = Marshal.StringToCoTaskMemAuto(fna[i]);
+ }
+
+ path = null;
+ }
+
+ private static void fillLists(string fdir, bool includeRoot, ref List inFilePath, ref List fileName)
+ {
+ string[] ss = fdir.Split('/');
+ string rdir = ss[ss.Length - 1];
+ string root = rdir;
+
+ if (ss.Length > 1 && includeRoot) root = rdir = ss[ss.Length - 2] + "/";
+
+ foreach (string f in Directory.GetFiles(fdir, "*", SearchOption.AllDirectories))
+ {
+ string s = f.Replace(fdir, rdir).Replace("\\", "/").Replace("//", "/");
+ if (!includeRoot)
+ {
+ s = s.Substring(root.Length);
+ if (s.Substring(0, 1) == "/") s = s.Substring(1, s.Length - 1);
+ }
+
+ inFilePath.Add(f);
+ fileName.Add(s);
+ }
+ }
+
+ // Use this function to get the total files of a directory and its subdirectories.
+ public static int getAllFiles(string dir)
+ {
+ string[] filePaths = Directory.GetFiles(@dir, "*", SearchOption.AllDirectories);
+ int res = filePaths.Length;
+ filePaths = null;
+ return res;
+ }
+
+ // Use this function to get the size of a file in the file system.
+ public static long getFileSize(string file)
+ {
+ FileInfo fi = new FileInfo(file);
+ if (fi.Exists) return fi.Length;
+ else return 0;
+ }
+
+ // Use this function to get the size of the files in a directory.
+ public static ulong getDirSize(string dir)
+ {
+ string[] filePaths = Directory.GetFiles(@dir, "*", SearchOption.AllDirectories);
+ ulong size = 0;
+ for (int i = 0; i < filePaths.Length; i++)
+ {
+ FileInfo fi = new FileInfo(filePaths[i]);
+ if (fi.Exists) size += (ulong) fi.Length;
+ }
+
+ return size;
+ }
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // TAR SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+ // Untar a .tar archive
+ //
+ // inFile : the full path to the tar archive.
+ // outPath : the path where the extraction will take place. If null, the same path as the one of the inFile will be used.
+ // progress : a single item integer array that will get updated with the number of the entries that get extracted. Use in a Thread for real time report.
+ // byteProgress : a single item ulong array that will get updated with the bytes that have been extracted so far. Use in a Thread for real time report.
+ //
+ // Error codes : -1 could not find input file.
+ // : -3 could not write output file.
+ // : -8 canceled
+ // : 1 Success
+
+ public static int tarExtract(string inFile, string outPath = null, int[] progress = null,
+ ulong[] byteProgress = null)
+ {
+ if (outPath == null) outPath = Path.GetDirectoryName(inFile);
+ if (outPath.Substring(outPath.Length - 1, 1) != "/")
+ {
+ outPath += "/";
+ }
+
+ var prog = gcA(progress);
+ var bProg = gcA(byteProgress);
+
+ int res = 0;
+
+ res = extractTar(inFile, outPath, null, prog.AddrOfPinnedObject(), bProg.AddrOfPinnedObject(), true);
+
+ prog.Free();
+ bProg.Free();
+
+ return res;
+ }
+
+ // Extract an entry from a tar archive
+ //
+ // inFile : the full path to our tar archive
+ // entry : the entry we want to extract. (If the file resides in a directory, the directory path should be included. like dir1/dir2/myfile.bin)
+ // outPath : the path in which want to extract our entry. If null the same path as the inFile will be used.
+ // fullPaths : if the entry resides in a directory, use this flag to create the directory structure or not.
+ // ! If it is set to false, you can use an absolute path in the outPath parameter to extract with a different filename !
+ // byteProgress : a sigle item ulong array that will get updated with the bytes of the extraction progress. Use in a Thread for real time report.
+ //
+ // Error codes : -1 could not find input file.
+ // : -3 could not write output file.
+ // : -5 could not find entry
+ // : -8 canceled
+ // : 1 Success
+
+ public static int tarExtractEntry(string inFile, string entry, string outPath = null, bool fullPaths = true,
+ ulong[] byteProgress = null)
+ {
+ if (outPath == null) outPath = Path.GetDirectoryName(inFile);
+ if (fullPaths && outPath.Substring(outPath.Length - 1, 1) != "/")
+ {
+ outPath += "/";
+ }
+
+ if (fullPaths && File.Exists(outPath))
+ {
+ Debug.Log("There is a file with the same name in the path!");
+ return -7;
+ }
+
+ if (!fullPaths && Directory.Exists(outPath))
+ {
+ Debug.Log("There is a directory with the same name in the path!");
+ return -8;
+ }
+
+ var bProg = gcA(byteProgress);
+ int res = 0;
+
+ res = extractTar(inFile, outPath, entry, IntPtr.Zero, bProg.AddrOfPinnedObject(), fullPaths);
+
+ bProg.Free();
+
+ return res;
+ }
+
+ // Create a tar file out of a directory containing files.
+ //
+ // sourceDir : the directory that contains our files
+ // outFile : the full path to the tar archive that will be created. If null the same name as the sourceDir will be used.
+ // includeRoot : if the root directory should be included in the filenames.
+ // progress : a single item integer array that will increment with each file added to the tar archive. Use in a Thread for real time report.
+ // byteProgress : a sigle item ulong array that will get updated with the bytes that get added to the tar archive. Call the function in a thread to get real time progress.
+ //
+ // Error codes : -1 could not write output file.
+ // : -3 could not find input file.
+ // : -8 canceled
+ // : 1 Success
+ // : 0 no files found in Dir.
+
+ public static int tarDir(string sourceDir, string outFile = null, bool includeRoot = false, int[] progress = null,
+ ulong[] byteProgress = null)
+ {
+ if (!Directory.Exists(sourceDir)) return 0;
+
+ string fdir = @sourceDir.Replace("\\", "/");
+ if (sourceDir.Substring(sourceDir.Length - 1) != "/") fdir += "/";
+
+ if (outFile == null) outFile = sourceDir.Substring(0, sourceDir.Length - 1) + ".tar";
+
+ int totalFiles = getAllFiles(fdir);
+ if (totalFiles == 0) return 0;
+
+ int res = 0;
+
+ if (Directory.Exists(fdir))
+ {
+ List inFilePath = new List();
+ List fileName = new List();
+
+ fillLists(fdir, includeRoot, ref inFilePath, ref fileName);
+
+ res = tarList(outFile, inFilePath.ToArray(), fileName.ToArray(), progress, byteProgress);
+
+ inFilePath.Clear();
+ inFilePath = null;
+ fileName.Clear();
+ fileName = null;
+ }
+
+ return res;
+ }
+
+ // This function creates a tar archive from a list of file paths provided.
+ //
+ // outFile : the full path to the tar archive that will be created.
+ // inFilePath[] : an array of the full paths to the files that should be added to the tar archive.
+ // fileName[] : if you want the names of your files to be different then the one they have, set it here.
+ // progress : this var will increment until the number of the input files and this are equal. Use in a Thread for real time report.
+ // byteProgress : this variable is a single ulong array that keeps track of all the bytes that have been processed. Use in a Thread for real time report.
+ //
+ //
+ // Error codes : -1 could not write output file.
+ // : -3 could not find input file.
+ // : -4 input files number different than filenames number
+ // : -8 canceled
+ // : -10 an input file was not found.
+ // : 1 Success
+
+ public static int tarList(string outFile, string[] inFilePath, string[] fileName = null, int[] progress = null,
+ ulong[] byteProgress = null)
+ {
+ if (inFilePath == null) return -3;
+
+ if (fileName != null && fileName.Length != inFilePath.Length) return -4;
+
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ if (!File.Exists(inFilePath[i])) return -10;
+ }
+
+ if (File.Exists(@outFile)) File.Delete(@outFile);
+
+ int res = 0;
+
+ IntPtr[] fp = new IntPtr[inFilePath.Length];
+ IntPtr[] np = new IntPtr[inFilePath.Length];
+
+ fillPointers(outFile, fileName, inFilePath, ref fp, ref np);
+
+ var faBuf = gcA(fp);
+ var naBuf = gcA(np);
+ var prog = gcA(progress);
+ var bProg = gcA(byteProgress);
+
+ res = createTar(@outFile, faBuf.AddrOfPinnedObject(), naBuf.AddrOfPinnedObject(), inFilePath.Length,
+ prog.AddrOfPinnedObject(), bProg.AddrOfPinnedObject());
+
+ for (int i = 0; i < inFilePath.Length; i++)
+ {
+ Marshal.FreeCoTaskMem(fp[i]);
+ Marshal.FreeCoTaskMem(np[i]);
+ }
+
+ faBuf.Free();
+ fp = null;
+ naBuf.Free();
+ np = null;
+
+ prog.Free();
+ bProg.Free();
+
+ return res;
+ }
+
+
+ // This function fills the same Lists as the getFileInfo for zip, with the filenames and file sizes that are in the tar file.
+ // Returns : the total size of uncompressed bytes of the files in the tar archive
+ //
+ // tarArchive : the full path to the archive, including the archives name. (/myPath/myArchive.tar)
+ //
+ // ERROR CODES : 0 = Input file not found or Could not get info.
+ //
+ public static UInt64 getTarInfo(string tarArchive)
+ {
+ ninfo.Clear();
+ uinfo.Clear();
+ cinfo.Clear();
+ localOffset.Clear();
+ zipFiles = 0;
+ zipFolders = 0;
+ totalCompressedSize = 0;
+ totalUncompressedSize = 0;
+
+ int res = 0;
+ int[] tt = new int[1];
+ var tb = gcA(tt);
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = readTarA(@tarArchive, tb.AddrOfPinnedObject());
+#endif
+
+ tb.Free();
+
+ if (res <= 0) return 0;
+
+ IntPtr uni = IntPtr.Zero;
+ UInt64[] unc = new UInt64[tt[0]];
+ var uncb = gcA(unc);
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ uni = readTar(@tarArchive, res, uncb.AddrOfPinnedObject());
+#endif
+
+ if (uni == IntPtr.Zero)
+ {
+ uncb.Free();
+ return 0;
+ }
+
+ string str = Marshal.PtrToStringAuto(uni);
+ StringReader r = new StringReader(str);
+ string line;
+ UInt64 sum = 0;
+
+ for (int i = 0; i < tt[0]; i++)
+ {
+ if ((line = r.ReadLine()) != null) ninfo.Add(line);
+ if (unc != null)
+ {
+ uinfo.Add(unc[i]);
+ sum += unc[i];
+ if (unc[i] > 0) zipFiles++;
+ else zipFolders++;
+ }
+ }
+
+ r.Close();
+ r.Dispose();
+ uncb.Free();
+ releaseBuffer(uni);
+ tt = null;
+ unc = null;
+
+ totalUncompressedSize = sum;
+ return sum;
+ }
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // END TAR SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+#endif
+
+ // get the DateTime of an entry in a zip archive
+ //
+ // zipArchive : the full path to the zip archive from which we want to extract the specific file.
+ // entry : the specific entry we want to get the DateTime of. (If the entry resides in a directory, the directory path should be included. like dir1/dir2/myfile.bin)
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the zipArchive path.
+ //
+ // Returns the date and time of the entry in DateTime format.
+ //
+ // ERROR CODES
+ // : 0 = Cannot open zip Archive
+ // : 1 = entry not found
+ // : 2 = error reading entry
+ //
+ public static DateTime entryDateTime(string zipArchive, string entry, byte[] FileBuffer = null)
+ {
+ uint dosDateTime = 0;
+
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ dosDateTime = getEntryDateTime(null, entry, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ dosDateTime = getEntryDateTime(zipArchive, entry, IntPtr.Zero, 0);
+#endif
+ }
+
+ var date = (dosDateTime & 0xFFFF0000) >> 16;
+ var time = (dosDateTime & 0x0000FFFF);
+
+ var year = (date >> 9) + 1980;
+ var month = (date & 0x01e0) >> 5;
+ var day = date & 0x1F;
+ var hour = time >> 11;
+ var minute = (time & 0x07e0) >> 5;
+ var second = (time & 0x1F) * 2;
+
+ if (dosDateTime == 0 || dosDateTime == 1 || dosDateTime == 2)
+ {
+ Debug.Log("Error in getting DateTime: " + dosDateTime);
+ return DateTime.Now;
+ }
+
+ return new DateTime((int) year, (int) month, (int) day, (int) hour, (int) minute, (int) second);
+ }
+
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // In Memory Functions
+ //---------------------------------------------------------------------------------------------------------------------------
+
+ // The inMemory class the holds the pointer to our in memory zip archive.
+ // Use the size() function to get the size of the memory it occupies.
+ // The getZipBuffer() function returns a new byte[] buffer that contains the inmemory zip.
+ //
+ public class inMemory
+ {
+ public IntPtr pointer = IntPtr.Zero;
+ public IntPtr zf = IntPtr.Zero;
+ public IntPtr memStruct = IntPtr.Zero;
+ public IntPtr fileStruct = IntPtr.Zero;
+
+ public int[] info = new int[3];
+
+ public int lastResult = 0;
+
+ // A bool that tells if an inMemory zip archive is open or closed. (Used with the low level functions only.)
+ public bool isClosed = true;
+
+ public int size()
+ {
+ return info[0];
+ }
+
+ public byte[] getZipBuffer()
+ {
+ if (pointer != IntPtr.Zero && info[0] > 0)
+ {
+ byte[] p = new byte[info[0]];
+ Marshal.Copy(pointer, p, 0, info[0]);
+ return p;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+
+ // Use this function to free the pointer and the object of the inMemory zip archive.
+ // It is important to call this function after you don't need the in memory zip any more!
+ //
+ public static void free_inmemory(inMemory t)
+ {
+ if (t.info == null)
+ {
+ Debug.Log("inMemory object is null");
+ return;
+ }
+
+ if (freeMemStruct(t.pointer) != 1) Debug.Log("In memory pointer was not freed");
+ t.info = null;
+ if (t.memStruct != IntPtr.Zero && freeMemZ(t.memStruct) != 1) Debug.Log("MemStruct was not freed");
+ if (t.fileStruct != IntPtr.Zero && freeFileZ(t.fileStruct) != 1) Debug.Log("FileStruct was not freed");
+ t = null;
+ }
+
+
+ // Low level inMemory functions ----------------------------------------------------------------------------------------------------
+
+ // A function that creates an inMemory zip archive
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file. You can call this function again for more buffers with the same
+ // : inMemory object and the next buffers will get appended to the in memory zip.
+ //
+ // Returns true on success.
+ public static bool inMemoryZipStart(inMemory t)
+ {
+ if (t.info == null)
+ {
+ Debug.Log("inMemory object is null");
+ return false;
+ }
+
+ if (t.fileStruct == IntPtr.Zero) t.fileStruct = initFileStruct();
+ if (t.memStruct == IntPtr.Zero) t.memStruct = initMemStruct();
+ if (!t.isClosed) inMemoryZipClose(t);
+
+ var inf = gcA(t.info);
+
+ t.zf = zipCDMemStart(inf.AddrOfPinnedObject(), t.pointer, t.fileStruct, t.memStruct);
+
+ inf.Free();
+ t.isClosed = false;
+
+ if (t.zf != IntPtr.Zero) return true;
+ else return false;
+ }
+
+ // A function that adds a buffer as a zip entry in an opened inMemory zip archive with the inMemoryZipStart function.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ // levelOfCompression : (0-9) recommended 9 for maximum (0 = Store method.)
+ // buffer : The byte[] buffer that should be added to the zip.
+ // filename : The name of the file added. If you add a folder structure to it,
+ // like (dir1/dir2/myfile.bin) the directories will be created in the zip file.
+ // comment : add a comment for the file in the zip file header.
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ //
+ // Returns 0 on success.
+ public static int inMemoryZipAdd(inMemory t, int levelOfCompression, byte[] buffer, string fileName,
+ string comment = null, string password = null, bool useBz2 = false)
+ {
+ if (t.info == null)
+ {
+ Debug.Log("inMemory object is null");
+ return -1;
+ }
+
+ if (t.isClosed)
+ {
+ Debug.Log("Can't add entry. inMemory zip is closed.");
+ return -2;
+ }
+
+ if (password == "") password = null;
+ if (comment == "") comment = null;
+ if (fileName == null) fileName = "";
+
+ var fbuf = gcA(buffer);
+
+ int res = zipCDMemAdd(t.zf, levelOfCompression, fbuf.AddrOfPinnedObject(), buffer.Length, fileName, comment,
+ password, useBz2);
+
+ fbuf.Free();
+ t.lastResult = res;
+
+ return res;
+ }
+
+ // A function to close the inMemory zip archive that has been created with the inMemoryZipStart function.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ //
+ // If t.lastResult is different then 0 a null pointer will get returned.
+ //
+ public static IntPtr inMemoryZipClose(inMemory t)
+ {
+ if (t.info == null)
+ {
+ Debug.Log("inMemory object is null");
+ return IntPtr.Zero;
+ }
+
+ if (t.isClosed)
+ {
+ Debug.Log("Can't close zip. inMemory zip is closed.");
+ return t.pointer;
+ }
+
+ var inf = gcA(t.info);
+
+ t.pointer = zipCDMemClose(t.zf, t.memStruct, inf.AddrOfPinnedObject(), t.lastResult);
+
+ inf.Free();
+ t.isClosed = true;
+
+ return t.pointer;
+ }
+
+ // End low level inMemory functions ------------------------------------------------------------------------------------------------
+
+
+ // A function that compresses a buffer to an inMemory zip file. Appending using this function can be slow. Use the low level functions for way faster proccessing.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file. You can call this function again for more buffers with the same
+ // : inMemory object and the next buffers will get appended to the in memory zip.
+ // levelOfCompression : (0-9) recommended 9 for maximum (0 = Store method.)
+ // buffer : The byte[] buffer that should be added to the zip.
+ // filename : The name of the file added. If you add a folder structure to it,
+ // like (dir1/dir2/myfile.bin) the directories will be created in the zip file.
+ // comment : add a comment for the file in the zip file header.
+ // password : set the password to protect this file.
+ // useBz2 : use the bz2 compression algorithm. If false the zlib deflate algorithm will be used. (not available for MacOS/iOS/tvOS)
+ //
+ /// Although the inMemory t.pointer gets internally updated, the function returns an IntPtr of the inMemory zip file buffer.
+ /// So to check if the operation was successful, check if the pointer returned is a non IntPtr.Zero pointer.
+ public static IntPtr compress_Buf2Mem(inMemory t, int levelOfCompression, byte[] buffer, string fileName,
+ string comment = null, string password = null, bool useBz2 = false)
+ {
+ if (t.info == null)
+ {
+ Debug.Log("inMemory object is null");
+ return IntPtr.Zero;
+ }
+
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 9) levelOfCompression = 9;
+ if (password == "") password = null;
+ if (comment == "") comment = null;
+ if (fileName == null) fileName = "";
+
+ if (buffer == null || buffer.Length == 0)
+ {
+ Debug.Log("Buffer was null or zero size !");
+ return t.pointer;
+ }
+
+ var fbuf = gcA(buffer);
+ var inf = gcA(t.info);
+
+ t.pointer = zipCDMem(inf.AddrOfPinnedObject(), t.pointer, levelOfCompression, fbuf.AddrOfPinnedObject(),
+ buffer.Length, fileName, comment, password, useBz2);
+
+ fbuf.Free();
+ inf.Free();
+
+ return t.pointer;
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ // A function that decompresses a zip file from an inMemory pointer. If the zip contains directories, they will be created.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ // outPath : the directory in which the zip contents will be extracted.
+ // progress : a single item integer array that increments with the archives that have been extracted. To use it in realtime, call
+ // : this function in a separate thread.
+ // proc: : a single item ulong array that gets updated with the progress of the decompression in bytes.
+ // (100% is reached when the compressed size of the file is reached.)
+ // password : if needed, the password to decrypt the archive.
+ //
+ // ERROR CODES
+ // : -1 = could not initialize zip archive.
+ // : -2 = failed extraction
+ // : 1 = success
+ //
+ public static int decompress_Mem2File(inMemory t, string outPath, int[] progress = null, ulong[] proc = null,
+ string password = null)
+ {
+ if (t.info == null)
+ {
+ Debug.Log("inMemory object is null");
+ return -1;
+ }
+
+ //make a check if the last '/' exists at the end of the exctractionPath and add it if it is missing
+ if (outPath.Substring(outPath.Length - 1, 1) != "/")
+ {
+ outPath += "/";
+ }
+
+ int res = 0;
+ var ibuf = gcA(progress);
+ if (progress == null) progress = new int[1];
+ if (proc == null) proc = new ulong[1];
+ var pbuf = gcA(proc);
+
+ if (t != null)
+ {
+ if (proc != null)
+ res = zipEX(null, @outPath, ibuf.AddrOfPinnedObject(), t.pointer, t.info[0], pbuf.AddrOfPinnedObject(),
+ password);
+ else res = zipEX(null, @outPath, ibuf.AddrOfPinnedObject(), t.pointer, t.info[0], IntPtr.Zero, password);
+
+ ibuf.Free();
+ pbuf.Free();
+ return res;
+ }
+ else return 0;
+ }
+#endif
+
+ // A function that will decompress a file from an inmemory zip file pointer directly in a provided byte buffer.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ // entry : the file we want to extract to a buffer. (If the file resides in a directory, the directory should be included.)
+ // buffer : a referenced byte buffer that will be resized and will be filled with the extraction data.
+ // password : If the archive is encrypted use a password.
+ //
+ // ERROR CODES : 1 = success
+ // : -2 = could not find/open zip file
+ // : -3 = could not locate entry
+ // : -4 = could not get entry info
+ // : -5 = password error
+ // : -18 = the entry has no size
+ // : -104 = internal memory error
+ //
+ public static int entry2BufferMem(inMemory t, string entry, ref byte[] buffer, string password = null)
+ {
+ if (t.info == null) return -2;
+
+ int siz = 0;
+ if (password == "") password = null;
+ if (t != null) siz = (int) zipGetEntrySize(null, entry, t.pointer, t.info[0]);
+
+ if (siz <= 0) return -18;
+ if (buffer == null) buffer = new byte[0];
+ Array.Resize(ref buffer, (int) siz);
+ var sbuf = gcA(buffer);
+
+ int res = 0;
+ if (t != null)
+ res = zipEntry2Buffer(null, entry, sbuf.AddrOfPinnedObject(), (int) siz, t.pointer, t.info[0], password);
+ sbuf.Free();
+
+ return res;
+ }
+
+ // A function that will decompress a file from an inmemory zip file pointer to a new created and returned byte buffer.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ // entry : the file we want to extract to a buffer. (If the file resides in a directory, the directory should be included.
+ // password : If the archive is encrypted use a password.
+ //
+ // ERROR CODES : non-null = success
+ // : null = failed
+ //
+ public static byte[] entry2BufferMem(inMemory t, string entry, string password = null)
+ {
+ if (t.info == null) return null;
+ int siz = 0;
+ if (password == "") password = null;
+ if (t != null) siz = (int) zipGetEntrySize(null, entry, t.pointer, t.info[0]);
+
+ if (siz <= 0) return null;
+ byte[] buffer = new byte[siz];
+ var sbuf = gcA(buffer);
+
+ int res = 0;
+ if (t != null)
+ res = zipEntry2Buffer(null, entry, sbuf.AddrOfPinnedObject(), (int) siz, t.pointer, t.info[0], password);
+
+ sbuf.Free();
+
+ if (res != 1) return null;
+ else return buffer;
+ }
+
+
+ // A function that will decompress a file from an inmemory zip file pointer directly to a provided fixed size byte buffer.
+ //
+ // Returns the uncompressed size of the entry.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ // entry : the file we want to extract to a buffer. (If the file resides in a directory, the directory should be included.)
+ // buffer : a referenced fixed size byte buffer that will be filled with the extraction data. It should be large enough to store the data.
+ // password : if the archive is encrypted use a password.
+ //
+ // ERROR CODES : 1 = success
+ // : -2 = could not find/open zip archive
+ // : -3 = could not locate entry
+ // : -4 = could not get entry info
+ // : -5 = password error
+ // : -18 = the entry has no size
+ // : -19 = the fixed size buffer is not big enough to store the uncompressed data
+ // : -104 = internal memory error
+ //
+ public static int entry2FixedBufferMem(inMemory t, string entry, ref byte[] fixedBuffer, string password = null)
+ {
+ if (t.info == null) return -2;
+ int siz = 0;
+ if (password == "") password = null;
+ if (t != null) siz = (int) zipGetEntrySize(null, entry, t.pointer, t.info[0]);
+
+ if (siz <= 0) return -18;
+
+ if (fixedBuffer.Length < (int) siz) return -19;
+
+ var sbuf = gcA(fixedBuffer);
+
+ int res = 0;
+ if (t != null)
+ res = zipEntry2Buffer(null, entry, sbuf.AddrOfPinnedObject(), siz, t.pointer, t.info[0], password);
+
+ sbuf.Free();
+
+ if (res != 1) return res;
+
+ return siz;
+ }
+
+ // This function fills the Lists with the filenames and file sizes that are in the inMemory zip file.
+ // Returns : the total size of uncompressed bytes of the files in the zip archive.
+ //
+ // t : the inMemory class that holds the pointer to our inMemory zip file.
+ //
+ // ERROR CODES : 0 = Input file not found or Could not get info
+ //
+ public static UInt64 getFileInfoMem(inMemory t)
+ {
+ if (t.info == null) return 0;
+ ninfo.Clear();
+ uinfo.Clear();
+ cinfo.Clear();
+ localOffset.Clear();
+ zipFiles = 0;
+ zipFolders = 0;
+ totalCompressedSize = 0;
+ totalUncompressedSize = 0;
+
+ int res = 0;
+ int[] tt = new int[1];
+ var tb = gcA(tt);
+
+ if (t != null) res = zipGetInfoA(null, tb.AddrOfPinnedObject(), t.pointer, t.info[0]);
+ tb.Free();
+
+ if (res <= 0) return 0;
+
+ IntPtr uni = IntPtr.Zero;
+
+ UInt64[] unc = new UInt64[tt[0]];
+ UInt64[] comp = new UInt64[tt[0]];
+ UInt64[] offs = new UInt64[tt[0]];
+
+ var uncb = gcA(unc);
+ var compb = gcA(comp);
+ var offsb = gcA(offs);
+
+ if (t != null)
+ uni = zipGetInfo(null, res, uncb.AddrOfPinnedObject(), compb.AddrOfPinnedObject(),
+ offsb.AddrOfPinnedObject(), t.pointer, t.info[0]);
+
+ if (uni == IntPtr.Zero)
+ {
+ uncb.Free();
+ compb.Free();
+ offsb.Free();
+ return 0;
+ }
+
+ string str = Marshal.PtrToStringAuto(uni);
+ StringReader r = new StringReader(str);
+
+ string line;
+ UInt64 sum = 0;
+
+ for (int i = 0; i < tt[0]; i++)
+ {
+ if ((line = r.ReadLine()) != null) ninfo.Add(line);
+ if (unc != null)
+ {
+ uinfo.Add(unc[i]);
+ sum += unc[i];
+ if (unc[i] > 0) zipFiles++;
+ else zipFolders++;
+ }
+
+ if (comp != null)
+ {
+ cinfo.Add(comp[i]);
+ totalCompressedSize += comp[i];
+ }
+
+ if (offs != null) localOffset.Add(offs[i]);
+ }
+
+ r.Close();
+ r.Dispose();
+ uncb.Free();
+ compb.Free();
+ offsb.Free();
+ releaseBuffer(uni);
+ tt = null;
+ unc = null;
+ comp = null;
+ offs = null;
+
+ totalUncompressedSize = sum;
+
+ return sum;
+ }
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // End in Memory Functions
+ //---------------------------------------------------------------------------------------------------------------------------
+
+
+ // A function that will decompress a file in a zip archive directly to a provided byte buffer.
+ //
+ // zipArchive : the full path to the zip archive from which a specific file will be extracted to a byte buffer.
+ // entry : the file we want to extract to a buffer. (If the file resides in a directory, the directory should be included.)
+ // buffer : a referenced byte buffer that will be resized and will be filled with the extraction data.
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ // password : If the archive is encrypted use a password.
+ //
+ // ERROR CODES : 1 = success
+ // : -2 = could not find/open zip archive
+ // : -3 = could not locate entry
+ // : -4 = could not get entry info
+ // : -5 = password error
+ // : -18 = the entry has no size
+ // : -104 = internal memory error
+ //
+ public static int entry2Buffer(string zipArchive, string entry, ref byte[] buffer, byte[] FileBuffer = null,
+ string password = null)
+ {
+ int siz = 0;
+ if (password == "") password = null;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ siz = (int) zipGetEntrySize(null, entry, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ siz = (int) zipGetEntrySize(@zipArchive, entry, IntPtr.Zero, 0);
+#endif
+ }
+
+ if (siz <= 0) return -18;
+
+ Array.Resize(ref buffer, siz);
+
+ var sbuf = gcA(buffer);
+
+ int res = 0;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipEntry2Buffer(null, entry, sbuf.AddrOfPinnedObject(), siz, fbuf.AddrOfPinnedObject(),
+ FileBuffer.Length, password);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipEntry2Buffer(@zipArchive, entry, sbuf.AddrOfPinnedObject(), siz, IntPtr.Zero, 0, password);
+#endif
+ }
+
+ sbuf.Free();
+
+ return res;
+ }
+
+ // A function that will decompress a file in a zip archive directly to a provided fixed size byte buffer.
+ //
+ // Returns the uncompressed size of the entry.
+ //
+ // zipArchive : the full path to the zip archive from which a specific file will be extracted to a byte buffer.
+ // entry : the file we want to extract to a buffer. (If the file resides in a directory, the directory should be included.)
+ // buffer : a referenced fixed size byte buffer that will be filled with the extraction data. It should be large enough to store the data.
+ // FileBuffer : a buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ // password : if the archive is encrypted use a password.
+ //
+ // ERROR CODES : 1 = success
+ // : -2 = could not find/open zip archive
+ // : -3 = could not locate entry
+ // : -4 = could not get entry info
+ // : -5 = password error
+ // : -18 = the entry has no size
+ // : -19 = the fixed size buffer is not big enough to store the uncompressed data
+ // : -104 = internal memory error
+ //
+ public static int entry2FixedBuffer(string zipArchive, string entry, ref byte[] fixedBuffer,
+ byte[] FileBuffer = null, string password = null)
+ {
+ int siz = 0;
+ if (password == "") password = null;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ siz = (int) zipGetEntrySize(null, entry, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ siz = (int) zipGetEntrySize(@zipArchive, entry, IntPtr.Zero, 0);
+#endif
+ }
+
+ if (siz <= 0) return -18;
+
+ if (fixedBuffer.Length < siz) return -19;
+
+ var sbuf = gcA(fixedBuffer);
+
+ int res = 0;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipEntry2Buffer(null, entry, sbuf.AddrOfPinnedObject(), siz, fbuf.AddrOfPinnedObject(),
+ FileBuffer.Length, password);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipEntry2Buffer(@zipArchive, entry, sbuf.AddrOfPinnedObject(), siz, IntPtr.Zero, 0, password);
+#endif
+ }
+
+ sbuf.Free();
+
+ if (res != 1) return res;
+
+ return siz;
+ }
+
+
+ // A function that will decompress a file in a zip archive to a new created and returned byte buffer.
+ //
+ // zipArchive : the full path to the zip archive from which a specific file will be extracted to a byte buffer.
+ // entry : the file we want to extract to a buffer. (If the file resides in a directory, the directory should be included.
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ // password : If the archive is encrypted use a password.
+ //
+ // ERROR CODES : non-null = success
+ // : null = failed
+ //
+ public static byte[] entry2Buffer(string zipArchive, string entry, byte[] FileBuffer = null, string password = null)
+ {
+ int siz = 0;
+ if (password == "") password = null;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ siz = (int) zipGetEntrySize(null, entry, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ siz = (int) zipGetEntrySize(@zipArchive, entry, IntPtr.Zero, 0);
+#endif
+ }
+
+ if (siz <= 0) return null;
+
+ byte[] buffer = new byte[siz];
+
+ var sbuf = gcA(buffer);
+
+ int res = 0;
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipEntry2Buffer(null, entry, sbuf.AddrOfPinnedObject(), siz, fbuf.AddrOfPinnedObject(),
+ FileBuffer.Length, password);
+ fbuf.Free();
+ }
+ else
+ {
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipEntry2Buffer(@zipArchive, entry, sbuf.AddrOfPinnedObject(), siz, IntPtr.Zero, 0, password);
+#endif
+ }
+
+ sbuf.Free();
+ if (res != 1) return null;
+ else return buffer;
+ }
+
+
+ // A function that will validate a zip archive.
+ //
+ // zipArchive : the zip to be checked
+ // FileBuffer : A buffer that holds a zip file. When assigned the function will read from this buffer and will ignore the filePath.
+ // ERROR CODES
+ //
+ // : true. The archive is ok.
+ // : false. The archive could not be validated.
+ //
+ public static bool validateFile(string zipArchive, byte[] FileBuffer = null)
+ {
+ bool res = false;
+
+ if (FileBuffer != null)
+ {
+ var fbuf = gcA(FileBuffer);
+ res = zipValidateFile(null, fbuf.AddrOfPinnedObject(), FileBuffer.Length);
+ fbuf.Free();
+ return res;
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ res = zipValidateFile(@zipArchive, IntPtr.Zero, 0);
+#endif
+
+ return res;
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------------------
+ //
+ // Hidden/merged zip and zipInfo functions
+ //
+ // ---------------------------------------------------------------------------------------------------------------------------------
+
+ // a struct to store zip entry information
+ public struct zipInfo
+ {
+ public short VersionMadeBy;
+ public short MinimumVersionToExtract;
+ public short BitFlag;
+ public short CompressionMethod;
+ public short FileLastModificationTime;
+ public short FileLastModificationDate;
+ public int CRC;
+ public int CompressedSize;
+ public int UncompressedSize;
+ public short DiskNumberWhereFileStarts;
+ public short InternalFileAttributes;
+ public int ExternalFileAttributes;
+ public int RelativeOffsetOfLocalFileHeader;
+ public int AbsoluteOffsetOfLocalFileHeaderStore;
+ public string filename;
+ public string extraField;
+ public string fileComment;
+ };
+
+ // a list that will be filled with info of all the zip archive entries.
+ public static List zinfo;
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ // This function is used to get extended info of the entries in a zip archive in the file system.
+ // Use this as an alternative function to get zip info with more information about entries.
+ // For now it does not work with zip64.
+ // Returns true on success.
+ public static bool getZipInfo(string fileName)
+ {
+ if (!File.Exists(fileName))
+ {
+ Debug.Log("File not found: " + fileName);
+ return false;
+ }
+
+ int pos = 0, size = 0;
+
+ using (var file = File.OpenRead(fileName))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ if (findPK(reader))
+ {
+ int entryCount = findEnd(reader, ref pos, ref size);
+ if (entryCount > 0)
+ {
+ getCentralDir(reader, entryCount);
+ return true;
+ }
+ else
+ {
+ Debug.Log("No Entries in zip");
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ // Get position, size and/or entry info of a zip archive in the file system.
+ // This function is mainly useful to discover a zip archive hidden or merged in another bigger archive.
+ // filename: the path to the archive.
+ // ref pos: the position in bytes of the zip archive.
+ // ref size: the size of the zip archive.
+ // If getCentralDirectory is set to true it will fill the zinfo List with extended entry information.
+ // For now it does not work with zip64.
+ // Returns true on success.
+ public static bool getZipInfoMerged(string fileName, ref int pos, ref int size, bool getCentralDirectory = false)
+ {
+ if (!File.Exists(fileName))
+ {
+ Debug.Log("File not found: " + fileName);
+ return false;
+ }
+
+ using (var file = File.OpenRead(fileName))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ if (findPK(reader))
+ {
+ int entryCount = findEnd(reader, ref pos, ref size);
+ if (entryCount > 0)
+ {
+ if (getCentralDirectory) getCentralDir(reader, entryCount);
+ return true;
+ }
+ else
+ {
+ Debug.Log("No Entries in zip");
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+#endif
+
+ // Get position, size and/or entry info of a zip archive in a buffer.
+ // This function is mainly useful to discover a zip archive hidden or merged in another bigger buffer.
+ // buffer: the buffer where the merged zip archive resides.
+ // ref pos: the position in bytes of the zip archive.
+ // ref size: the size of the zip archive.
+ // If getCentralDirectory is set to true it will fill the zinfo List with extended entry information.
+ // For now it does not work with zip64.
+ // Returns true on success.
+ public static bool getZipInfoMerged(byte[] buffer, ref int pos, ref int size, bool getCentralDirectory = false)
+ {
+ if (buffer == null)
+ {
+ Debug.Log("Buffer is null");
+ return false;
+ }
+
+ using (var file = new MemoryStream(buffer))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ if (findPK(reader))
+ {
+ int entryCount = findEnd(reader, ref pos, ref size);
+ if (entryCount > 0)
+ {
+ if (getCentralDirectory) getCentralDir(reader, entryCount);
+ return true;
+ }
+ else
+ {
+ Debug.Log("No Entries in zip");
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ // This function is used to get extended info of the entries in a zip archive in a buffer.
+ // buffer: the buffer where the merged zip archive resides.
+ // For now it does not work with zip64.
+ // Returns true on success.
+ public static bool getZipInfoMerged(byte[] buffer)
+ {
+ if (buffer == null)
+ {
+ Debug.Log("Buffer is null");
+ return false;
+ }
+
+ int pos = 0, size = 0;
+
+ using (var file = new MemoryStream(buffer))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ if (findPK(reader))
+ {
+ int entryCount = findEnd(reader, ref pos, ref size);
+ if (entryCount > 0)
+ {
+ getCentralDir(reader, entryCount);
+ return true;
+ }
+ else
+ {
+ Debug.Log("No Entries in zip");
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ // Find Central directory position
+ private static bool findPK(BinaryReader reader)
+ {
+ var p = reader.ReadByte();
+ bool res = false;
+ int i = 0;
+
+ while (reader.BaseStream.Position < reader.BaseStream.Length - 3)
+ {
+ i++;
+
+ if (p == 0x50)
+ {
+ if (reader.ReadByte() == 0x4b && reader.ReadByte() == 0x05 && reader.ReadByte() == 0x06)
+ {
+ reader.BaseStream.Seek(reader.BaseStream.Position - 4, 0);
+ res = true;
+ break;
+ }
+ else
+ {
+ reader.BaseStream.Seek(i, 0);
+ }
+ }
+
+ p = reader.ReadByte();
+ }
+
+ return res;
+ }
+
+ // Read central directory basics and find position and size of the zip archive in stream. Returns entry count.
+ private static int findEnd(BinaryReader reader, ref int pos, ref int size)
+ {
+ long origin = reader.BaseStream.Position;
+
+ int result = 0;
+ while (result == 0 && reader.BaseStream.Position < reader.BaseStream.Length)
+ {
+ var b = reader.ReadByte();
+
+ while (b != 0x50)
+ {
+ if (reader.BaseStream.Position < reader.BaseStream.Length)
+ b = reader.ReadByte();
+ else
+ break;
+ }
+
+ if (reader.BaseStream.Position >= reader.BaseStream.Length) break;
+
+ if (reader.ReadByte() == 0x4b && reader.ReadByte() == 0x05 && reader.ReadByte() == 0x06)
+ {
+ /*int diskNumber =*/
+ reader.ReadInt16();
+ /*int centralDirectoryStartDiskNumber =*/
+ reader.ReadInt16();
+ /*int centralDirectoryCount =*/
+ reader.ReadInt16();
+ int centralDirectoryTotal = reader.ReadInt16();
+ result = centralDirectoryTotal;
+ int centralDirectorySize = reader.ReadInt32();
+ int centralDirectoryOffset = reader.ReadInt32();
+
+ int commentLength = reader.ReadInt16();
+
+ reader.ReadBytes(commentLength);
+ //string comment = Encoding.UTF8.GetString(reader.ReadBytes(commentLength));
+
+ pos = (int) reader.BaseStream.Position - (centralDirectoryOffset + centralDirectorySize + 22);
+ size = (int) reader.BaseStream.Position - pos;
+
+ reader.BaseStream.Seek(pos + centralDirectoryOffset, 0);
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ // Read info for each entry in the zip archive and store it in zinfo List.
+ private static void getCentralDir(BinaryReader reader, int count)
+ {
+ if (zinfo != null && zinfo.Count > 0) zinfo.Clear();
+
+ zinfo = new List();
+
+ for (int i = 0; i < count; i++)
+ {
+ var magic = reader.ReadInt32();
+
+ if (magic == 0x02014b50)
+ {
+ zipInfo z = new zipInfo();
+
+ z.VersionMadeBy = reader.ReadInt16();
+ z.MinimumVersionToExtract = reader.ReadInt16();
+ z.BitFlag = reader.ReadInt16();
+ z.CompressionMethod = reader.ReadInt16();
+ z.FileLastModificationTime = reader.ReadInt16();
+ z.FileLastModificationDate = reader.ReadInt16();
+ z.CRC = reader.ReadInt32();
+ z.CompressedSize = reader.ReadInt32();
+ z.UncompressedSize = reader.ReadInt32();
+ short fileNameLength = reader.ReadInt16();
+ short extraFieldLength = reader.ReadInt16();
+ short fileCommentLength = reader.ReadInt16();
+ z.DiskNumberWhereFileStarts = reader.ReadInt16();
+ z.InternalFileAttributes = reader.ReadInt16();
+ z.ExternalFileAttributes = reader.ReadInt32();
+ z.RelativeOffsetOfLocalFileHeader = reader.ReadInt32();
+ z.filename = Encoding.UTF8.GetString(reader.ReadBytes(fileNameLength));
+ z.AbsoluteOffsetOfLocalFileHeaderStore = z.RelativeOffsetOfLocalFileHeader + 30 + z.filename.Length;
+ var extra = reader.ReadBytes(extraFieldLength);
+ z.extraField = Encoding.ASCII.GetString(extra);
+ z.fileComment = Encoding.UTF8.GetString(reader.ReadBytes(fileCommentLength));
+
+ zinfo.Add(z);
+ }
+ }
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ // Get the merged zip archive in a file system archive as a byte buffer and provide postion and size.
+ // filePath: the path to the archive.
+ // ref position: the position in bytes of the zip archive.
+ // ref size: the size of the zip archive.
+ public static byte[] getMergedZip(string filePath, ref int position, ref int siz)
+ {
+ int pos = 0, size = 0;
+ if (!File.Exists(filePath)) return null;
+
+ getZipInfoMerged(filePath, ref pos, ref size);
+
+ position = pos;
+ siz = size;
+ if (size == 0) return null;
+
+ byte[] tempBuffer = new byte[size];
+
+ using (var file = File.OpenRead(filePath))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ reader.BaseStream.Seek(pos, SeekOrigin.Begin);
+ reader.Read(tempBuffer, 0, size);
+ }
+ }
+
+ return tempBuffer;
+ }
+
+ // Get the merged zip archive in a file system archive as a byte buffer.
+ // filePath: the path to the archive.
+ public static byte[] getMergedZip(string filePath)
+ {
+ int pos = 0, size = 0;
+ if (!File.Exists(filePath)) return null;
+
+ getZipInfoMerged(filePath, ref pos, ref size);
+ if (size == 0) return null;
+
+ byte[] tempBuffer = new byte[size];
+
+ using (var file = File.OpenRead(filePath))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ reader.BaseStream.Seek(pos, SeekOrigin.Begin);
+ reader.Read(tempBuffer, 0, size);
+ }
+ }
+
+ return tempBuffer;
+ }
+#endif
+
+ // Get the merged zip archive in a buffer as a byte buffer.
+ // buffer: the buffer where the zip archive resides.
+ // ref position: the position in bytes of the zip archive.
+ // ref size: the size of the zip archive.
+ public static byte[] getMergedZip(byte[] buffer, ref int position, ref int siz)
+ {
+ int pos = 0, size = 0;
+
+ if (buffer == null) return null;
+
+ getZipInfoMerged(buffer, ref pos, ref size);
+
+ position = pos;
+ siz = size;
+
+ if (size == 0) return null;
+
+ byte[] tempBuffer = new byte[size];
+
+ using (var file = new MemoryStream(buffer))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ reader.BaseStream.Seek(pos, SeekOrigin.Begin);
+ reader.Read(tempBuffer, 0, size);
+ }
+ }
+
+ return tempBuffer;
+ }
+
+ // Get the merged zip archive in a buffer as a byte buffer.
+ // buffer: the buffer where the zip archive resides.
+ public static byte[] getMergedZip(byte[] buffer)
+ {
+ int pos = 0, size = 0;
+ if (buffer == null) return null;
+
+ getZipInfoMerged(buffer, ref pos, ref size);
+ if (size == 0) return null;
+ byte[] tempBuffer = new byte[size];
+
+ using (var file = new MemoryStream(buffer))
+ {
+ using (var reader = new BinaryReader(file))
+ {
+ reader.BaseStream.Seek(pos, SeekOrigin.Begin);
+ reader.Read(tempBuffer, 0, size);
+ }
+ }
+
+ return tempBuffer;
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ // A function that extracts all contents of a zip file that is merged in another file in the file system, to disk.
+ // file : the path to the file where the zip archive resides.
+ // outPath : the directory in which the zip contents will be extracted.
+ // progress : provide a single item integer array to write the current index of the file getting extracted. To use it in realtime, call
+ // : this function in a separate thread.
+ // proc: : a single item ulong array that gets updated with the progress of the decompression in bytes.
+ // (100% is reached when the compressed size of the file is reached.)
+ // password : if needed, the password to decrypt the archive.
+ // ERROR CODES
+ // : -1 = could not initialize zip archive.
+ // : -2 = failed extraction
+ // : 1 = success
+ public static int decompressZipMerged(string file, string outPath, int[] progress = null, ulong[] proc = null,
+ string password = null)
+ {
+ if (!File.Exists(file)) return 0;
+ outPath = outPath.Replace("//", "/");
+
+ if (!Directory.Exists(outPath)) Directory.CreateDirectory(outPath);
+
+ int pos = 0, size = 0, res = 0;
+
+ var tempBuffer = getMergedZip(file, ref pos, ref size);
+
+ if (tempBuffer != null)
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(tempBuffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64());
+ t2.info[0] = size;
+
+ res = decompress_Mem2File(t2, outPath, progress, proc, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ tempBuffer = null;
+ }
+
+ return res;
+ }
+
+ // A function that extracts all contents of a merged zip file that resides in a buffer to disk.
+ // buffer : the buffer where the zip archive resides.
+ // outPath : the directory in which the zip contents will be extracted.
+ // progress : a single item integer array that increments with the archives that have been extracted. To use it in realtime, call
+ // : this function in a separate thread.
+ // proc: : a single item ulong array that gets updated with the progress of the decompression in bytes.
+ // (100% is reached when the compressed size of the file is reached.)
+ // password : if needed, the password to decrypt the archive.
+ // ERROR CODES
+ // : -1 = could not initialize zip archive.
+ // : -2 = failed extraction
+ // : 1 = success
+ public static int decompressZipMerged(byte[] buffer, string outPath, int[] progress = null, ulong[] proc = null,
+ string password = null)
+ {
+ if (buffer == null) return 0;
+ outPath = outPath.Replace("//", "/");
+ if (!Directory.Exists(outPath)) Directory.CreateDirectory(outPath);
+
+ int pos = 0, size = 0, res = 0;
+
+ if (getZipInfoMerged(buffer, ref pos, ref size))
+ {
+ inMemory t2 = new inMemory();
+
+ var pinnedArray = gcA(buffer);
+
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64() + pos);
+ t2.info[0] = size;
+
+ res = decompress_Mem2File(t2, outPath, progress, proc, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ }
+
+ return res;
+ }
+
+ private static void writeFile(byte[] tb, string entry, string outPath, string overrideEntryName, ref int res)
+ {
+ if (tb != null)
+ {
+ string fn;
+
+ if (overrideEntryName == null)
+ {
+ if (entry.Contains("/"))
+ {
+ string[] fileName = entry.Split('/');
+ fn = fileName[fileName.Length - 1];
+ }
+ else
+ {
+ fn = entry;
+ }
+ }
+ else
+ {
+ fn = overrideEntryName;
+ }
+
+ File.WriteAllBytes(outPath + "/" + fn, tb);
+ res = 1;
+ }
+ else
+ {
+ Debug.Log("Could not extract entry.");
+ }
+ }
+
+ // Extract an entry from a merged zip that resides in the file system to disk.
+ // Returns 1 on success.
+ //
+ // file : the path to the file where the zip archive resides.
+ // entry : the entry to extract.
+ // outPath : the path where the entry will be extracted.
+ // overrideEntryName : with this you can override the default entry name.
+ // password : if needed, the password to decrypt the archive.
+ public static int entry2FileMerged(string file, string entry, string outPath, string overrideEntryName = null,
+ string password = null)
+ {
+ if (!File.Exists(file)) return -10;
+ outPath = outPath.Replace("//", "/");
+
+ int pos = 0, size = 0, res = 0;
+
+ var tempBuffer = getMergedZip(file, ref pos, ref size);
+
+ if (tempBuffer != null)
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(tempBuffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64());
+ t2.info[0] = size;
+
+ var tb = entry2BufferMem(t2, entry, password);
+ pinnedArray.Free();
+
+ writeFile(tb, entry, outPath, overrideEntryName, ref res);
+
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ tempBuffer = null;
+ tb = null;
+ }
+
+ return res;
+ }
+
+
+ // Extract an entry from a merged zip that resides in a buffer to disk.
+ // Returns 1 on success.
+ //
+ // buffer : the buffer where the zip archive resides.
+ // entry : the entry to extract.
+ // outPath : the path where the entry will be extracted.
+ // overrideEntryName : with this you can override the default entry name.
+ // password : if needed, the password to decrypt the archive.
+ public static int entry2FileMerged(byte[] buffer, string entry, string outPath, string overrideEntryName = null,
+ string password = null)
+ {
+ if (buffer == null) return -10;
+
+ outPath = outPath.Replace("//", "/");
+
+ int pos = 0, size = 0, res = 0;
+
+ if (getZipInfoMerged(buffer, ref pos, ref size))
+ {
+ inMemory t2 = new inMemory();
+
+ var pinnedArray = gcA(buffer);
+
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64() + pos);
+ t2.info[0] = size;
+
+ var tb = entry2BufferMem(t2, entry, password);
+ pinnedArray.Free();
+
+ writeFile(tb, entry, outPath, overrideEntryName, ref res);
+
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ tb = null;
+ }
+
+ return res;
+ }
+
+
+ // A function that extracts an entry from a zip archive that is merged/hidden in the file system and returns the extracted data in a new buffer.
+ //
+ // file : the path to the file where the zip archive resides.
+ // entry : the entry to extract.
+ // password : if needed, the password to decrypt the archive.
+ public static byte[] entry2BufferMerged(string file, string entry, string password = null)
+ {
+ if (!File.Exists(file)) return null;
+
+ int pos = 0, size = 0;
+
+ var tempBuffer = getMergedZip(file, ref pos, ref size);
+
+ if (tempBuffer != null)
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(tempBuffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64());
+ t2.info[0] = size;
+
+ var res = entry2BufferMem(t2, entry, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ tempBuffer = null;
+ return res;
+ }
+
+ return null;
+ }
+
+ // A function that extracts an entry from a zip archive that is merged/hidden in the file system and returns the extracted data in a referenced buffer that will get resized to fit the data.
+ //
+ // file : the path to the file where the zip archive resides.
+ // entry : the entry to extract.
+ // refBuffer : the referenced buffer that will get resized to store the decompressed data.
+ // password : if needed, the password to decrypt the archive.
+ public static int entry2BufferMerged(string file, string entry, ref byte[] refBuffer, string password = null)
+ {
+ if (!File.Exists(file)) return 0;
+
+ int pos = 0, size = 0;
+
+ var tempBuffer = getMergedZip(file, ref pos, ref size);
+
+ if (tempBuffer != null)
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(tempBuffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64());
+ t2.info[0] = size;
+
+ var res = entry2BufferMem(t2, entry, ref refBuffer, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ tempBuffer = null;
+ return res;
+ }
+
+ return 0;
+ }
+
+ // A function that extracts an entry from a zip archive that is merged/hidden in the file system and writes the extracted data in a fixed size buffer.
+ //
+ // file : the path to the file where the zip archive resides.
+ // entry : the entry to extract.
+ // fixedBuffer : the fixed sized buffer where the data will be written.
+ // password : if needed, the password to decrypt the archive.
+ public static int entry2FixedBufferMerged(string file, string entry, ref byte[] fixedBuffer, string password = null)
+ {
+ if (!File.Exists(file)) return 0;
+
+ int pos = 0, size = 0;
+
+ var tempBuffer = getMergedZip(file, ref pos, ref size);
+
+ if (tempBuffer != null)
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(tempBuffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64());
+ t2.info[0] = size;
+
+ int res = entry2FixedBufferMem(t2, entry, ref fixedBuffer, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ tempBuffer = null;
+ return res;
+ }
+
+ return 0;
+ }
+#endif
+
+ // A function that extracts an entry from a zip archive that is merged/hidden in a buffer and returns the extracted data in a new buffer.
+ //
+ // buffer : the buffer where the zip archive resides.
+ // entry : the entry to extract.
+ // password : if needed, the password to decrypt the archive.
+ public static byte[] entry2BufferMerged(byte[] buffer, string entry, string password = null)
+ {
+ if (buffer == null) return null;
+
+ int pos = 0, size = 0;
+
+ if (getZipInfoMerged(buffer, ref pos, ref size))
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(buffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64() + pos);
+ t2.info[0] = size;
+
+ var res = entry2BufferMem(t2, entry, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ return res;
+ }
+
+ return null;
+ }
+
+ // A function that extracts an entry from a zip archive that is merged/hidden in a buffer and returns the extracted data in a referenced buffer that will get resized to fit the data.
+ //
+ // buffer : the buffer where the zip archive resides.
+ // entry : the entry to extract.
+ // refBuffer : the referenced buffer that will get resized to store the decompressed data.
+ // password : if needed, the password to decrypt the archive.
+ public static int entry2BufferMerged(byte[] buffer, string entry, ref byte[] refBuffer, string password = null)
+ {
+ if (buffer == null) return 0;
+
+ int pos = 0, size = 0;
+
+ if (getZipInfoMerged(buffer, ref pos, ref size))
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(buffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64() + pos);
+ t2.info[0] = size;
+
+ var res = entry2BufferMem(t2, entry, ref refBuffer, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ return res;
+ }
+
+ return 0;
+ }
+
+ // A function that extracts an entry from a zip archive that is merged/hidden in a buffer and writes the extracted data in a fixed size buffer.
+ // Returns the size of the uncompressed data.
+ //
+ // buffer : the buffer where the zip archive resides.
+ // entry : the entry to extract.
+ // fixedBuffer : the fixed sized buffer where the data will be written.
+ // password : if needed, the password to decrypt the archive.
+ // ERROR CODES
+ // : -1 = could not initialize zip archive.
+ // : -2 = failed extraction
+ // : 1 = success
+ public static int entry2FixedBufferMerged(byte[] buffer, string entry, ref byte[] fixedBuffer,
+ string password = null)
+ {
+ if (buffer == null) return 0;
+
+ int pos = 0, size = 0;
+
+ if (getZipInfoMerged(buffer, ref pos, ref size))
+ {
+ inMemory t2 = new inMemory();
+ var pinnedArray = gcA(buffer);
+ t2.pointer = new IntPtr(pinnedArray.AddrOfPinnedObject().ToInt64() + pos);
+ t2.info[0] = size;
+
+ int res = entry2FixedBufferMem(t2, entry, ref fixedBuffer, password);
+
+ pinnedArray.Free();
+ t2.info = null;
+ t2.pointer = IntPtr.Zero;
+ t2 = null;
+ return res;
+ }
+
+ return 0;
+ }
+ // ---------------------------------------------------------------------------------------------------------------------------------
+ //
+ // END hidden/merged zip and zipInfo functions
+ //
+ // ---------------------------------------------------------------------------------------------------------------------------------
+
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // ZLIB BUFFER SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+ // A function that compresses a byte buffer to a zlib stream compressed buffer. Provide a reference buffer to write to. This buffer will be resized.
+ //
+ // source : the input buffer
+ // outBuffer : the referenced output buffer
+ // levelOfCompression : (0-10) recommended 9 for maximum (10 is highest but slower and not zlib compatible)
+ //
+ // ERROR CODES : true = success
+ // : false = failed
+ //
+ public static bool compressBuffer(byte[] source, ref byte[] outBuffer, int levelOfCompression)
+ {
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 10) levelOfCompression = 10;
+
+ var sbuf = gcA(source);
+ IntPtr ptr;
+ int siz = 0;
+
+ ptr = zipCompressBuffer(sbuf.AddrOfPinnedObject(), source.Length, levelOfCompression, ref siz);
+
+ if (siz == 0 || ptr == IntPtr.Zero)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return false;
+ }
+
+ Array.Resize(ref outBuffer, siz);
+ Marshal.Copy(ptr, outBuffer, 0, siz);
+
+ sbuf.Free();
+ releaseBuffer(ptr);
+
+ return true;
+ }
+
+
+ // same as the compressBuffer function, only this function will put the result in a fixed size buffer to avoid memory allocations.
+ // the compressed size is returned so you can manipulate it at will.
+ //
+ // safe: if set to true the function will abort if the compressed resut is larger the the fixed size output buffer.
+ // Otherwise compressed data will be written only until the end of the fixed output buffer.
+ //
+ public static int compressBufferFixed(byte[] source, ref byte[] outBuffer, int levelOfCompression, bool safe = true)
+ {
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 10) levelOfCompression = 10;
+
+ var sbuf = gcA(source);
+ IntPtr ptr;
+ int siz = 0;
+
+ ptr = zipCompressBuffer(sbuf.AddrOfPinnedObject(), source.Length, levelOfCompression, ref siz);
+
+ if (siz == 0 || ptr == IntPtr.Zero)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return 0;
+ }
+
+ if (siz > outBuffer.Length)
+ {
+ if (safe)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return 0;
+ }
+ else
+ {
+ siz = outBuffer.Length;
+ }
+ }
+
+ Marshal.Copy(ptr, outBuffer, 0, siz);
+
+ sbuf.Free();
+ releaseBuffer(ptr);
+
+ return siz;
+ }
+
+
+ // A function that compresses a byte buffer to a zlib stream compressed buffer. Returns a new buffer with the compressed data.
+ //
+ // source : the input buffer
+ // levelOfCompression : (0-10) recommended 9 for maximum (10 is highest but slower and not zlib compatible)
+ //
+ // ERROR CODES : a valid byte buffer = success
+ // : null = failed
+ //
+ public static byte[] compressBuffer(byte[] source, int levelOfCompression)
+ {
+ if (levelOfCompression < 0) levelOfCompression = 0;
+ if (levelOfCompression > 10) levelOfCompression = 10;
+
+ var sbuf = gcA(source);
+ IntPtr ptr;
+ int siz = 0;
+
+ ptr = zipCompressBuffer(sbuf.AddrOfPinnedObject(), source.Length, levelOfCompression, ref siz);
+
+ if (siz == 0 || ptr == IntPtr.Zero)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return null;
+ }
+
+ byte[] buffer = new byte[siz];
+ Marshal.Copy(ptr, buffer, 0, siz);
+
+ sbuf.Free();
+ releaseBuffer(ptr);
+
+ return buffer;
+ }
+
+
+ // A function that decompresses a zlib compressed buffer to a referenced outBuffer. The outbuffer will be resized.
+ //
+ // source : a zlib compressed buffer.
+ // outBuffer : a referenced out buffer provided to extract the data. This buffer will be resized to fit the uncompressed data.
+ //
+ // ERROR CODES : true = success
+ // : false = failed
+ //
+ public static bool decompressBuffer(byte[] source, ref byte[] outBuffer)
+ {
+ var sbuf = gcA(source);
+ IntPtr ptr;
+ int siz = 0;
+
+ ptr = zipDecompressBuffer(sbuf.AddrOfPinnedObject(), source.Length, ref siz);
+
+ if (siz == 0 || ptr == IntPtr.Zero)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return false;
+ }
+
+ Array.Resize(ref outBuffer, siz);
+ Marshal.Copy(ptr, outBuffer, 0, siz);
+
+ sbuf.Free();
+ releaseBuffer(ptr);
+
+ return true;
+ }
+
+
+ // same as the decompressBuffer function. Only this one outputs to a buffer of fixed which size isn't resized to avoid memory allocations.
+ // The fixed buffer should have a size that will be able to hold the incoming decompressed data.
+ // Returns the uncompressed size.
+ //
+ // safe: if set to true the function will abort if the decompressed resut is larger the the fixed size output buffer.
+ // Otherwise decompressed data will be written only until the end of the fixed output buffer.
+ //
+ public static int decompressBufferFixed(byte[] source, ref byte[] outBuffer, bool safe = true)
+ {
+ var sbuf = gcA(source);
+ IntPtr ptr;
+ int siz = 0;
+
+ ptr = zipDecompressBuffer(sbuf.AddrOfPinnedObject(), source.Length, ref siz);
+
+ if (siz == 0 || ptr == IntPtr.Zero)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return 0;
+ }
+
+ if (siz > outBuffer.Length)
+ {
+ if (safe)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return 0;
+ }
+ else
+ {
+ siz = outBuffer.Length;
+ }
+ }
+
+ Marshal.Copy(ptr, outBuffer, 0, siz);
+
+ sbuf.Free();
+ releaseBuffer(ptr);
+
+ return siz;
+ }
+
+
+ // A function that decompresses a zlib compressed buffer and creates a new buffer. Returns a new buffer with the uncompressed data.
+ //
+ // source : a zlib compressed buffer.
+ //
+ // ERROR CODES : a valid byte buffer = success
+ // : null = failed
+ //
+ public static byte[] decompressBuffer(byte[] source)
+ {
+ var sbuf = gcA(source);
+ IntPtr ptr;
+ int siz = 0;
+
+ ptr = zipDecompressBuffer(sbuf.AddrOfPinnedObject(), source.Length, ref siz);
+
+ if (siz == 0 || ptr == IntPtr.Zero)
+ {
+ sbuf.Free();
+ releaseBuffer(ptr);
+ return null;
+ }
+
+ byte[] buffer = new byte[siz];
+ Marshal.Copy(ptr, buffer, 0, siz);
+
+ sbuf.Free();
+ releaseBuffer(ptr);
+
+ return buffer;
+ }
+ //---------------------------------------------------------------------------------------------------------------------------
+ // END ZLIB BUFFER SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // GZIP SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+ // compress a byte buffer to gzip format.
+ //
+ // returns the size of the compressed buffer.
+ //
+ // source: the uncompressed input buffer.
+ // outBuffer: the provided output buffer where the compressed data will be stored (it should be at least the size of the input buffer +18 bytes).
+ // level: the level of compression (0-10). (0 = Store method.)
+ // addHeader: if a gzip header should be added. (recommended if you want to write out a gzip file)
+ // addFooter: if a gzip footer should be added. (recommended if you want to write out a gzip file)
+ // overrideDateTimeWithLength: use the bytes 5-8 of the header to store the gzip length instead of DateTime modification. This is useful when you want to know the
+ // compressed size of a gzip buffer. Then use the gzipCompressedSize function to get this size.
+ public static int gzip(byte[] source, byte[] outBuffer, int level, bool addHeader = true, bool addFooter = true,
+ bool overrideDateTimeWithLength = false)
+ {
+ if (source == null || outBuffer == null) return 0;
+ var sbuf = gcA(source);
+ var dbuf = gcA(outBuffer);
+
+ if (level < 0) level = 0;
+ if (level > 10) level = 10;
+
+ int res = zipGzip(sbuf.AddrOfPinnedObject(), source.Length, dbuf.AddrOfPinnedObject(), level, addHeader,
+ addFooter);
+
+ sbuf.Free();
+ dbuf.Free();
+ int hf = 0;
+ if (addHeader) hf += 10;
+ if (addFooter) hf += 8;
+
+ int compressedSize = res + hf;
+
+ if (addHeader && overrideDateTimeWithLength)
+ {
+ outBuffer[4] = (byte) (((uint) compressedSize >> 0) & 0xff);
+ outBuffer[5] = (byte) (((uint) compressedSize >> 8) & 0xff);
+ outBuffer[6] = (byte) (((uint) compressedSize >> 16) & 0xff);
+ outBuffer[7] = (byte) (((uint) compressedSize >> 24) & 0xff);
+ // use the operating system flag to mark this gzip that it holds the compressed data size.
+ outBuffer[9] = 0xfe;
+ }
+
+ return compressedSize;
+ }
+
+
+ // get the uncompressed size from a gzip buffer that has a footer included
+ //
+ // source: the gzip compressed input buffer. (it should have at least a gzip footer)
+ public static int gzipUncompressedSize(byte[] source)
+ {
+ if (source == null) return 0;
+ int res = source.Length;
+ uint size = ((uint) source[res - 4] & 0xff) |
+ ((uint) source[res - 3] & 0xff) << 8 |
+ ((uint) source[res - 2] & 0xff) << 16 |
+ ((uint) source[res - 1] & 0xff) << 24;
+ return (int) size;
+ }
+
+ // get the compressed size of a gzip, if the compressed size of it has been written in the date header bytes and marked as such, with the gzip function above.
+ //
+ // source: the gzip compressed input buffer.
+ public static int gzipCompressedSize(byte[] source, int offset = 0)
+ {
+ if (source == null) return 0;
+
+ if (source[offset + 9] != 0xfe)
+ {
+ Debug.Log("Gzip has not been marked to have compressed size stored.");
+ return 0;
+ }
+
+ int res = offset + 8;
+
+ uint size = ((uint) source[res - 4] & 0xff) |
+ ((uint) source[res - 3] & 0xff) << 8 |
+ ((uint) source[res - 2] & 0xff) << 16 |
+ ((uint) source[res - 1] & 0xff) << 24;
+ return (int) size;
+ }
+
+ // find where the merged gzip starts in a buffer.
+ //
+ // buffer: a memory buffer that has a gzip merged at the end of it.
+ public static int findGzStart(byte[] buffer)
+ {
+ if (buffer == null) return 0;
+ int res = 0;
+ int i = 0;
+
+ while (i < buffer.Length - 2)
+ {
+ if (buffer[i] == 0x1f)
+ {
+ if (buffer[i + 1] == 0x8b && buffer[i + 2] == 0x08)
+ {
+ res = i;
+ break;
+ }
+ }
+
+ i++;
+ }
+
+ return res;
+ }
+
+ // decompress a gzip buffer
+ //
+ // returns: uncompressed size. negative error code on error.
+ //
+ // source: the gzip compressed input buffer.
+ // outBuffer: the provided output buffer where the uncompressed data will be stored.
+ // hasHeader: if the buffer has a header.
+ // hasFooter: if the buffer has a footer.
+ //
+ public static int unGzip(byte[] source, byte[] outBuffer, bool hasHeader = true, bool hasFooter = true)
+ {
+ if (source == null || outBuffer == null) return 0;
+ var sbuf = gcA(source);
+ var dbuf = gcA(outBuffer);
+
+ int res = zipUnGzip(sbuf.AddrOfPinnedObject(), source.Length, dbuf.AddrOfPinnedObject(), outBuffer.Length,
+ hasHeader, hasFooter);
+
+ sbuf.Free();
+ dbuf.Free();
+ return res;
+ }
+
+ // decompress a gzip buffer (This function assumes that the gzip buffer has a gzip header !!!)
+ //
+ // returns: uncompressed size. negative error code on error.
+ //
+ // source: the gzip compressed input buffer.
+ // outBuffer: the provided output buffer where the uncompressed data will be stored.
+ //
+ public static int unGzip2(byte[] source, byte[] outBuffer)
+ {
+ if (source == null || outBuffer == null) return 0;
+ var sbuf = gcA(source);
+ var dbuf = gcA(outBuffer);
+
+ int res = zipUnGzip2(sbuf.AddrOfPinnedObject(), source.Length, dbuf.AddrOfPinnedObject(), outBuffer.Length);
+
+ sbuf.Free();
+ dbuf.Free();
+ return res;
+ }
+
+ // decompress a gzip buffer that is merged in the end of a buffer (This function assumes that the gzip buffer has a gzip header !!!)
+ //
+ // returns: uncompressed size. negative error code on error.
+ //
+ // source: the buffer where the gzip compressed input buffer resides. (at the end of it, or anywhere if you know the length of it)
+ // offset: the offset in bytes where the gzip starts.
+ // bufferLength: the length of the gzip buffer.
+ // outBuffer: the provided output buffer where the uncompressed data will be stored.
+ //
+ public static int unGzip2Merged(byte[] source, int offset, int bufferLength, byte[] outBuffer)
+ {
+ if (source == null || outBuffer == null) return 0;
+ if (bufferLength == 0) return 0;
+
+ var sbuf = gcA(source);
+ var dbuf = gcA(outBuffer);
+
+ IntPtr p = new IntPtr(sbuf.AddrOfPinnedObject().ToInt64() + offset);
+
+ int res = zipUnGzip2(p, bufferLength, dbuf.AddrOfPinnedObject(), outBuffer.Length);
+
+ sbuf.Free();
+ dbuf.Free();
+ return res;
+ }
+
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+
+ // Create a gzip file in the file system.
+ //
+ // returns 1 on success.
+ //
+ // inFile : the input file to compress.
+ // outFile : the output path of the created gzip. If null, the input file + ".gz" will be used.
+ // level : level of compression (1 - 10).
+ // progress : a ulong single item array that will report how many bytes have been processed. It should equal the uncompressed size.
+ // addHeader : if gzip header and footer should be added. If set to false the gzip can still be extracted but not opened from other decompression apps.
+ //
+ // error codes : -10 could not open input file
+ // : -11 could not write output file
+ // : -1 general error
+
+ public static int gzipFile(string inFile, string outFile = null, int level = 9, ulong[] progress = null,
+ bool addHeader = true)
+ {
+ int res = -1;
+ if (level < 1) level = 1;
+ if (level > 10) level = 10;
+
+ if (outFile == null) outFile = inFile + ".gz";
+
+ if (progress != null)
+ {
+ var prog = gcA(progress);
+ res = gzip_File(@inFile.Replace("//", "/"), @outFile.Replace("//", "/"), level, prog.AddrOfPinnedObject(),
+ addHeader);
+ prog.Free();
+ }
+ else
+ {
+ res = gzip_File(@inFile.Replace("//", "/"), @outFile.Replace("//", "/"), level, IntPtr.Zero, addHeader);
+ }
+
+ if (res == 0) return 1;
+ else return res;
+ }
+
+ // Decompress a gzip file
+ //
+ // returns 1 on success.
+ //
+ // inFile : the gzip file to extract.
+ // outFile : the output path of the extracted file. If null, the original name will be used.
+ // progress : a ulong single item array that will report how many bytes have been processed. It should equal the compressed size of the gz file.
+ //
+ // error codes : -11 could not open input file
+ // : -12 could not write output file
+ // : -3 error reading gz file
+ // : -4 error writing output
+ public static int ungzipFile(string inFile, string outFile = null, ulong[] progress = null)
+ {
+ int res = -1;
+
+ if (outFile == null)
+ {
+ if (inFile.Substring(inFile.Length - 3, 3).ToLower() != ".gz")
+ {
+ Debug.Log("Input file does not have a .gz extension");
+ return -2;
+ }
+
+ outFile = inFile.Substring(0, inFile.Length - 3);
+ }
+
+ if (progress != null)
+ {
+ var prog = gcA(progress);
+ res = ungzip_File(@inFile.Replace("//", "/"), @outFile.Replace("//", "/"), prog.AddrOfPinnedObject());
+ prog.Free();
+ }
+ else
+ {
+ res = ungzip_File(@inFile.Replace("//", "/"), @outFile.Replace("//", "/"), IntPtr.Zero);
+ }
+
+ return res;
+ }
+
+#endif
+ //---------------------------------------------------------------------------------------------------------------------------
+ // END GZIP SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+
+ //---------------------------------------------------------------------------------------------------------------------------
+ // START BZ2 SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+
+ // Create a bz2 file in the file system.
+ //
+ // returns 1 on success.
+ //
+ // inFile: the input file to compress.
+ // outFile: the output path of the created bz2. If null, the input file + ".bz2" will be used.
+ // level: level of compression (0 - 9).
+ // progress: a ulong single item array that will report how many bytes have been processed. It should equal the uncompressed size.
+ //
+ // error codes : 1 success
+ // : -3 could not read input file
+ // : -4 could not create output file
+ // : -8 canceled
+#if (!UNITY_WEBGL && !UNITY_TVOS) || UNITY_EDITOR
+ public static int bz2Create(string inFile, string outFile = null, int level = 9, ulong[] byteProgress = null)
+ {
+ int res = -10;
+
+ if (outFile == null) outFile = inFile + ".bz2";
+
+ if (byteProgress != null)
+ {
+ var prog = gcA(byteProgress);
+ res = bz2(false, level, @inFile.Replace("//", "/"), @outFile.Replace("//", "/"), prog.AddrOfPinnedObject());
+ prog.Free();
+ }
+ else
+ {
+ res = bz2(false, level, @inFile.Replace("//", "/"), @outFile.Replace("//", "/"), IntPtr.Zero);
+ }
+
+ return res;
+ }
+
+ // Decompress a bz2 file
+ //
+ // returns 1 on success.
+ //
+ // inFile : the bz2 file to extract.
+ // outFile : the output path of the extracted file. If null, the original name will be used.
+ // progress : a ulong single item array that will report how many bytes have been processed. It should equal the compressed size of the bz2 file.
+ //
+ // error codes : 1 success
+ // : -1 could not create output file
+ // : -2 could not read input file
+ // : -8 canceled
+ public static int bz2Decompress(string inFile, string outFile = null, ulong[] byteProgress = null)
+ {
+ int res = -10;
+
+ if (outFile == null)
+ {
+ if (inFile.Substring(inFile.Length - 4, 4).ToLower() != ".bz2")
+ {
+ Debug.Log("Input file does not have a .bz2 extension");
+ return -2;
+ }
+
+ outFile = inFile.Substring(0, inFile.Length - 4);
+ }
+
+ if (byteProgress != null)
+ {
+ var prog = gcA(byteProgress);
+ res = bz2(true, 0, @inFile.Replace("//", "/"), @outFile.Replace("//", "/"), prog.AddrOfPinnedObject());
+ prog.Free();
+ }
+ else
+ {
+ res = bz2(true, 0, @inFile.Replace("//", "/"), @outFile.Replace("//", "/"), IntPtr.Zero);
+ }
+
+ return res;
+ }
+#endif
+ //---------------------------------------------------------------------------------------------------------------------------
+ // END BZ2 SECTION
+ //---------------------------------------------------------------------------------------------------------------------------
+#endif
+}
\ No newline at end of file
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/FastZip.cs.meta b/Assets/TEngine/Runtime/Plugins/FastZip/FastZip.cs.meta
new file mode 100644
index 00000000..ff27bfb4
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/FastZip.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8998cfdd5f0c1a941b7b01932f12c77a
+timeCreated: 1567652860
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL.meta b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL.meta
new file mode 100644
index 00000000..391c7d82
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a76802e8087658142a1770e79001fb80
+folderAsset: yes
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-AES.zip b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-AES.zip
new file mode 100644
index 00000000..9777ce13
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-AES.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-AES.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-AES.zip.meta
new file mode 100644
index 00000000..578f175b
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-AES.zip.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 68b7bf2669a4d27419b66f374b51e8b8
+timeCreated: 1578624414
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-noAES.zip b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-noAES.zip
new file mode 100644
index 00000000..48664989
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-noAES.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-noAES.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-noAES.zip.meta
new file mode 100644
index 00000000..98dbcd76
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw-noAES.zip.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f0a6f4e5067758543af211e78476f046
+timeCreated: 1578624414
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw.bc b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw.bc
new file mode 100644
index 00000000..242a6fc6
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw.bc differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw.bc.meta b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw.bc.meta
new file mode 100644
index 00000000..dbf17704
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/WebGL/zipw.bc.meta
@@ -0,0 +1,141 @@
+fileFormatVersion: 2
+guid: 814f74b3a520e6a4399b7349f9eea37a
+timeCreated: 1578624414
+licenseType: Store
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 0
+ Exclude Win: 1
+ Exclude Win64: 1
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ OS: AnyOS
+ data:
+ first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS.meta
new file mode 100644
index 00000000..3b937241
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 0d7956afb984bbd4a872305e9060446c
+folderAsset: yes
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip
new file mode 100644
index 00000000..a135b0fe
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip.meta
new file mode 100644
index 00000000..14d1d29d
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 6eeb9c2cb063f5246a78aa3eb527347d
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip
new file mode 100644
index 00000000..b28f303c
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip.meta
new file mode 100644
index 00000000..ce4fc6c5
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 4867bbb8663ab874b951dc27257f90a6
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a
new file mode 100644
index 00000000..0ac79e3c
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip
new file mode 100644
index 00000000..45075d66
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip.meta
new file mode 100644
index 00000000..a7579f96
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 94855ec3b9c962e498debc069aa28414
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a.meta
new file mode 100644
index 00000000..7eb043c6
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/libzipw.a.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 7e7c1a50fda7adb4794d0d16d3d49057
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode.meta
new file mode 100644
index 00000000..8f344ecf
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f222dd79909967a4a8c7d20938ff8977
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip
new file mode 100644
index 00000000..99ae2d2d
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip.meta
new file mode 100644
index 00000000..7e32962f
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 95ebaf5d93e8fd144a73b04d303acf24
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle.meta b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle.meta
new file mode 100644
index 00000000..41492464
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle.meta
@@ -0,0 +1,44 @@
+fileFormatVersion: 2
+guid: d11bfa02d0f12de45a3a51d2f06b59be
+folderAsset: yes
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents.meta b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents.meta
new file mode 100644
index 00000000..8a6db2ff
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0e4ad9bf49a88784ca331bf8121990fc
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/Info.plist b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/Info.plist
new file mode 100644
index 00000000..095a3380
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/Info.plist
@@ -0,0 +1,46 @@
+
+
+
+
+ BuildMachineOSBuild
+ 19H2
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ libzipw
+ CFBundleIdentifier
+ com.zipwlib.libzipw
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ libzipw
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CFBundleVersion
+ 1
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+ 10G8
+ DTPlatformVersion
+ GM
+ DTSDKBuild
+ 18G74
+ DTSDKName
+ macosx10.14
+ DTXcode
+ 1030
+ DTXcodeBuild
+ 10G8
+ NSHumanReadableCopyright
+
+
+
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/Info.plist.meta b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/Info.plist.meta
new file mode 100644
index 00000000..0c7facf9
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/Info.plist.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c86f21f95c516ff4f9a464c02b3f9142
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS.meta b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS.meta
new file mode 100644
index 00000000..9cde6901
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0c4d8edd6d4e14b4abf69fddfbb960ca
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw
new file mode 100644
index 00000000..31a4f307
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw.meta b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw.meta
new file mode 100644
index 00000000..01767572
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 52d3301f351ed294f98a227f33ab85f6
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS.meta
new file mode 100644
index 00000000..9681e976
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 3937d3ee24e47974085db745e1449425
+folderAsset: yes
+timeCreated: 1567735096
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a
new file mode 100644
index 00000000..05929d0b
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip
new file mode 100644
index 00000000..23919b4a
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip.meta
new file mode 100644
index 00000000..96d9375e
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: cab2b712c38923b4e98b890b50454d7f
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a.meta
new file mode 100644
index 00000000..674463a0
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.a.meta
@@ -0,0 +1,124 @@
+fileFormatVersion: 2
+guid: 4a473fefb2d14ed49bab6613f6816b25
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude tvOS: 0
+ - first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ OS: AnyOS
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip
new file mode 100644
index 00000000..603bb434
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip.meta
new file mode 100644
index 00000000..d60d1e9b
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 37fdb245f2bbb9d4c90c97d057b1caed
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip
new file mode 100644
index 00000000..1057331b
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip.meta
new file mode 100644
index 00000000..18b717af
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 0d16f60a9aa809340a228db1e14a096e
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode.meta
new file mode 100644
index 00000000..18e5dada
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c485bd23c13ffb64ca2e1877fb851d8e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip
new file mode 100644
index 00000000..e9f0ef96
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip.meta b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip.meta
new file mode 100644
index 00000000..e161e68d
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 7af8e42eb3bf3974a80b2a00e2315f6d
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86.meta b/Assets/TEngine/Runtime/Plugins/FastZip/x86.meta
new file mode 100644
index 00000000..1a180891
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/x86.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 216841e2f4169b841a63762297a59899
+folderAsset: yes
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.dll b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.dll
new file mode 100644
index 00000000..c2a1d178
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.dll differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.dll.meta b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.dll.meta
new file mode 100644
index 00000000..a85df629
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.dll.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: 69b2e938d4e7b53439579d2d87b97ec2
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 0
+ Exclude OSXIntel64: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 1
+ Exclude Win: 0
+ Exclude Win64: 1
+ - first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Windows
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.so b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.so
new file mode 100644
index 00000000..e99020db
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.so differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.so.meta b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.so.meta
new file mode 100644
index 00000000..b5e09a74
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/x86/libzipw.so.meta
@@ -0,0 +1,122 @@
+fileFormatVersion: 2
+guid: c9097014bda9e224d9bc17361d932bad
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ - first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Linux
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 0
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86_64.meta b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64.meta
new file mode 100644
index 00000000..6f0fc7fd
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 80e52fdbb1d0f4e46bf43d6cbbd076df
+folderAsset: yes
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.dll b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.dll
new file mode 100644
index 00000000..7a8a168f
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.dll differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.dll.meta b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.dll.meta
new file mode 100644
index 00000000..2861a1a4
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.dll.meta
@@ -0,0 +1,122 @@
+fileFormatVersion: 2
+guid: 9e780a1644e034044a7862ef812836f8
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 0
+ Exclude OSXIntel64: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 0
+ - first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OS: Windows
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 0
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.so b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.so
new file mode 100644
index 00000000..adb63a22
Binary files /dev/null and b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.so differ
diff --git a/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.so.meta b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.so.meta
new file mode 100644
index 00000000..f73ea6ec
--- /dev/null
+++ b/Assets/TEngine/Runtime/Plugins/FastZip/x86_64/libzipw.so.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: b316761f19f6daa479d49fe0e46147f1
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 1
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ - first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Linux
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TEngine/Runtime/Res/ResMgr.cs b/Assets/TEngine/Runtime/Res/ResMgr.cs
index 0c7e1a81..fcc1265b 100644
--- a/Assets/TEngine/Runtime/Res/ResMgr.cs
+++ b/Assets/TEngine/Runtime/Res/ResMgr.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.IO;
using UnityEngine;
namespace TEngine
@@ -299,5 +300,28 @@ namespace TEngine
go.SetActive(isActive);
}
}
+
+ ///
+ /// 获取RawBytes下资源完整路径
+ ///
+ /// 路径会包含RawBytes,适应获取资源的其他接口使用习惯
+ ///
+ public static string GetRawBytesFullPath(string rawPath)
+ {
+ if (string.IsNullOrEmpty(rawPath))
+ return rawPath;
+
+#if ASSETBUNDLE_ENABLE
+ string target = GameConfig.Instance.FilePath($"{FileSystem.ResourceRoot}/{rawPath}");
+ if (!File.Exists(target))
+ {
+ target = $"{FileSystem.ResourceRootInStreamAsset}/{rawPath}";
+ }
+
+ return target;
+#else
+ return $"{Application.dataPath}/TResources/{rawPath}";
+#endif
+ }
}
}
\ No newline at end of file
diff --git a/Assets/TResources/UIStyle.meta b/Assets/TResources/UIStyle.meta
new file mode 100644
index 00000000..686aa7e7
--- /dev/null
+++ b/Assets/TResources/UIStyle.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 94c08a921d700464e88452fff0d9cf7a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/TResources/UIStyle/Style.json b/Assets/TResources/UIStyle/Style.json
new file mode 100644
index 00000000..83d2dfe5
--- /dev/null
+++ b/Assets/TResources/UIStyle/Style.json
@@ -0,0 +1,71 @@
+{
+ "Style_QuitApp": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "退出"
+ }
+ },
+ "Style_RestartApp": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "重启"
+ }
+ },
+ "Style_Retry": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "重试"
+ },
+ "BtnIgnore": {
+ "Align": 2,
+ "Show": true,
+ "Desc": "取消"
+ }
+ },
+ "Style_StartUpdate_Notice": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "开始更新"
+ },
+ "BtnIgnore": {
+ "Align": 2,
+ "Show": true,
+ "Desc": "放弃"
+ }
+ },
+ "Style_DownLoadApk": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "下载"
+ }
+ },
+ "Style_Clear": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "修复"
+ },
+ "BtnIgnore": {
+ "Align": 2,
+ "Show": true,
+ "Desc": "取消"
+ }
+ },
+ "Style_DownZip": {
+ "BtnOK": {
+ "Align": 0,
+ "Show": true,
+ "Desc": "继续"
+ },
+ "BtnIgnore": {
+ "Align": 2,
+ "Show": true,
+ "Desc": "取消"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/TResources/UIStyle/Style.json.meta b/Assets/TResources/UIStyle/Style.json.meta
new file mode 100644
index 00000000..dc6f1efc
--- /dev/null
+++ b/Assets/TResources/UIStyle/Style.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2778d24cc1bb7f34daaaf5a09c1561cb
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant: