diff --git a/Assets/Demo/HybirdCLR/HybirdCLR_Demo.unity b/Assets/Demo/HybirdCLR/HybirdCLR_Demo.unity deleted file mode 100644 index 4d865ad9..00000000 --- a/Assets/Demo/HybirdCLR/HybirdCLR_Demo.unity +++ /dev/null @@ -1,344 +0,0 @@ -%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.44657898, g: 0.4964133, b: 0.5748178, 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 &209661865 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 209661867} - - component: {fileID: 209661866} - 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 &209661866 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 209661865} - 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 &209661867 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 209661865} - 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 &400364856 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 400364859} - - component: {fileID: 400364858} - - component: {fileID: 400364857} - 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 &400364857 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 400364856} - m_Enabled: 1 ---- !u!20 &400364858 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 400364856} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, 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 &400364859 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 400364856} - 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 &1891593711 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1891593712} - - component: {fileID: 1891593713} - m_Layer: 0 - m_Name: TEngine - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1891593712 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1891593711} - 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 &1891593713 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1891593711} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6c3c520ddf3e7a74499ea41cf4b09db2, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Demo/HybirdCLR/HybirdCLR_Demo.unity.meta b/Assets/Demo/HybirdCLR/HybirdCLR_Demo.unity.meta deleted file mode 100644 index c05c78f8..00000000 --- a/Assets/Demo/HybirdCLR/HybirdCLR_Demo.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8ef518d49b9758848883444880ef20c8 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scene/ConsoleToSceen.cs b/Assets/Scene/ConsoleToSceen.cs deleted file mode 100644 index a30566c5..00000000 --- a/Assets/Scene/ConsoleToSceen.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class ConsoleToSceen : MonoBehaviour -{ - const int maxLines = 50; - const int maxLineLength = 120; - private string _logStr = ""; - - GUIStyle titleStyle2 = new GUIStyle(); - - private readonly List _lines = new List(); - void OnEnable() { Application.logMessageReceived += Log; } - void OnDisable() { Application.logMessageReceived -= Log; } - void Update() { } - - public void Log(string logString, string stackTrace, LogType type) - { - foreach (var line in logString.Split('\n')) - { - if (line.Length <= maxLineLength) - { - _lines.Add(line); - continue; - } - var lineCount = line.Length / maxLineLength + 1; - for (int i = 0; i < lineCount; i++) - { - if ((i + 1) * maxLineLength <= line.Length) - { - _lines.Add(line.Substring(i * maxLineLength, maxLineLength)); - } - else - { - _lines.Add(line.Substring(i * maxLineLength, line.Length - i * maxLineLength)); - } - } - } - if (_lines.Count > maxLines) - { - _lines.RemoveRange(0, _lines.Count - maxLines); - } - _logStr = string.Join("\n", _lines); - } - - void OnGUI() - { - titleStyle2.fontSize = 26; - titleStyle2.normal.textColor = Color.white; - //GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(Screen.width / 1920f, Screen.height / 800.0f, 1.0f)); - GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3.one); - GUI.Label(new Rect(10, 10, 800, 370), _logStr, titleStyle2); - } -} \ No newline at end of file diff --git a/Assets/Scene/Launcher.unity b/Assets/Scene/Launcher.unity deleted file mode 100644 index 42bb8cef..00000000 --- a/Assets/Scene/Launcher.unity +++ /dev/null @@ -1,410 +0,0 @@ -%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/TEngine-Demo.unity b/Assets/Scene/TEngine-Demo.unity deleted file mode 100644 index eda171cd..00000000 --- a/Assets/Scene/TEngine-Demo.unity +++ /dev/null @@ -1,262 +0,0 @@ -%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, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - 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_UseShadowmask: 1 ---- !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 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &78470599 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 78470602} - - component: {fileID: 78470601} - - component: {fileID: 78470600} - 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 &78470600 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 78470599} - m_Enabled: 1 ---- !u!20 &78470601 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 78470599} - 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 &78470602 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 78470599} - 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 &1297425162 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1297425163} - - component: {fileID: 1297425165} - - component: {fileID: 1297425164} - m_Layer: 0 - m_Name: TEngine - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1297425163 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297425162} - 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: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1297425164 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297425162} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 869b1b77e2356f14a86cbb2646bc4032, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1297425165 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297425162} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dfe10a0a11028794aac9fd5ea811c3e4, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Scene/TEngine-NetDemo.unity b/Assets/Scene/TEngine-NetDemo.unity deleted file mode 100644 index 69b8e919..00000000 --- a/Assets/Scene/TEngine-NetDemo.unity +++ /dev/null @@ -1,249 +0,0 @@ -%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, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - 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_UseShadowmask: 1 ---- !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 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &1143387670 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1143387671} - - component: {fileID: 1143387672} - m_Layer: 0 - m_Name: TEngine - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1143387671 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143387670} - 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: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1143387672 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143387670} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 869b1b77e2356f14a86cbb2646bc4032, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &1861967532 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1861967535} - - component: {fileID: 1861967534} - - component: {fileID: 1861967533} - 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 &1861967533 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1861967532} - m_Enabled: 1 ---- !u!20 &1861967534 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1861967532} - 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 &1861967535 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1861967532} - 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} diff --git a/Assets/Demo.meta b/Assets/Scenes.meta similarity index 77% rename from Assets/Demo.meta rename to Assets/Scenes.meta index 115170fc..ebd85859 100644 --- a/Assets/Demo.meta +++ b/Assets/Scenes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c7be6642490fcb64dbcb3c9e89a4a056 +guid: b59798f3c8d5ea44abbe3c1dc66ad803 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scenes/DemoScene.unity b/Assets/Scenes/DemoScene.unity new file mode 100644 index 00000000..97e872ea --- /dev/null +++ b/Assets/Scenes/DemoScene.unity @@ -0,0 +1,567 @@ +%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: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + 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: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + 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_UseShadowmask: 1 +--- !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 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &276929966 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 276929967} + - component: {fileID: 276929968} + m_Layer: 0 + m_Name: Debugger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &276929967 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 276929966} + 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: 1552848810} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &276929968 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 276929966} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2619bea7150754947a3e1a3916e9408c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Skin: {fileID: 0} + m_ActiveWindow: 0 + m_ShowFullWindow: 0 + m_ConsoleWindow: + m_LockScroll: 1 + m_MaxLine: 100 + m_InfoFilter: 1 + m_WarningFilter: 1 + m_ErrorFilter: 1 + m_FatalFilter: 1 + m_InfoColor: + serializedVersion: 2 + rgba: 4294967295 + m_WarningColor: + serializedVersion: 2 + rgba: 4278512639 + m_ErrorColor: + serializedVersion: 2 + rgba: 4278190335 + m_FatalColor: + serializedVersion: 2 + rgba: 4281545650 +--- !u!1 &519420028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 519420032} + - component: {fileID: 519420031} + - component: {fileID: 519420029} + 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 &519420029 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + m_Enabled: 1 +--- !u!20 &519420031 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + 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: 1 + 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: 0 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &519420032 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, 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 &1185455041 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1185455042} + - component: {fileID: 1185455043} + m_Layer: 0 + m_Name: Resources + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1185455042 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1185455041} + 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: 1552848810} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1185455043 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1185455041} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bc449de9a177d854181ed6d829a72ada, type: 3} + m_Name: + m_EditorClassIdentifier: + ResourceMode: 1 + EditorResourceMode: 1 +--- !u!1 &1212234302 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1212234303} + - component: {fileID: 1212234304} + m_Layer: 0 + m_Name: HotUpdate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1212234303 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1212234302} + 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: 1552848810} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1212234304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1212234302} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f010c29093f111146bfc776d19c8fb27, type: 3} + m_Name: + m_EditorClassIdentifier: + m_BuildInfoTextAsset: {fileID: 4900000, guid: d231f7a19087f02418363f9a6d5cb2c7, + type: 3} + m_DefaultDictionaryTextAsset: {fileID: 0} +--- !u!1 &1347603164 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1347603165} + - component: {fileID: 1347603166} + m_Layer: 0 + m_Name: Procedure + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1347603165 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347603164} + 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: 1552848810} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1347603166 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347603164} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5a40346edec23a442b535cd880416c0b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AvailableProcedureTypeNames: + - TEngine.ProcedureLaunch + - TEngine.ProcedureSplash + - TEngine.Runtime.ProcedureCheckVersion + - TEngine.Runtime.ProcedureCodeInit + - TEngine.Runtime.ProcedureInitResources + - TEngine.Runtime.ProcedureLaunch + - TEngine.Runtime.ProcedureResourcesVerify + - TEngine.Runtime.ProcedureSplash + - TEngine.Runtime.ProcedureStartGame + - TEngine.Runtime.ProcedureVersionUpdate + m_EntranceProcedureTypeName: TEngine.Runtime.ProcedureLaunch +--- !u!1 &1552848809 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1552848810} + - component: {fileID: 1552848811} + m_Layer: 0 + m_Name: GameEntry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1552848810 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1552848809} + 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: 276929967} + - {fileID: 1212234303} + - {fileID: 1347603165} + - {fileID: 1986485476} + - {fileID: 1879938136} + - {fileID: 1185455042} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1552848811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1552848809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 958db4adbbd69934a90f778087cb4aa4, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1879938135 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1879938136} + - component: {fileID: 1879938137} + m_Layer: 0 + m_Name: Refrence + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1879938136 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1879938135} + 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: 1552848810} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1879938137 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1879938135} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61474d279eb27214d9178822796f3b88, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EnableStrictCheck: 0 +--- !u!1 &1986485475 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1986485476} + - component: {fileID: 1986485477} + - component: {fileID: 1986485478} + m_Layer: 0 + m_Name: Setting + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1986485476 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986485475} + 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: 1552848810} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1986485477 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986485475} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a8153343c6698c40a65333865e0e5b6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1986485478 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986485475} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1735f945f64ce2049b684dfdb90c1f67, type: 3} + m_Name: + m_EditorClassIdentifier: + m_CustomSettingHelper: {fileID: 1986485477} diff --git a/Assets/Scene/Launcher.unity.meta b/Assets/Scenes/DemoScene.unity.meta similarity index 74% rename from Assets/Scene/Launcher.unity.meta rename to Assets/Scenes/DemoScene.unity.meta index dbedc1b0..c1e3c88e 100644 --- a/Assets/Scene/Launcher.unity.meta +++ b/Assets/Scenes/DemoScene.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a3d60f4c16cf2ce4f88aa378cd0d8a0e +guid: 2cda990e2423bbf4892e6590ba056729 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/TEngine.meta b/Assets/TEngine.meta index c8549c7d..27996007 100644 --- a/Assets/TEngine.meta +++ b/Assets/TEngine.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2d40c31e298adf14b954b51538c26105 +guid: 10736cb3e9b908a4888ac313bea04966 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/TEngine/Config~/Tools/excel2json/CommandLine.dll b/Assets/TEngine/Config~/Tools/excel2json/CommandLine.dll deleted file mode 100644 index d5497ef2..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/CommandLine.dll and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/CommandLine.xml b/Assets/TEngine/Config~/Tools/excel2json/CommandLine.xml deleted file mode 100644 index 4620bee3..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/CommandLine.xml +++ /dev/null @@ -1,1390 +0,0 @@ - - - - CommandLine - - - - - Provides base properties for creating an attribute, used to define rules for command line parsing. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - Validating and . - - Short name of the option. - Long name of the option. - - - - Initializes a new instance of the class. Validating - and . This constructor accepts a as short name. - - Short name of the option. - Long name of the option. - - - - Gets a short name of this command line option. You can use only one character. - - - - - Gets long name of this command line option. This name is usually a single english word. - - - - - Gets or sets the option's mutually exclusive set. - - - - - Gets or sets a value indicating whether a command line option is required. - - - - - Gets or sets mapped property default value. - - - - - Gets or sets mapped property meta value. - - - - - Gets or sets a short description of this command line option. Usually a sentence summary. - - - - - Models an option specification. - - - - - Initializes a new instance of the class. - The default long name will be inferred from target property. - - - - - Initializes a new instance of the class. - - The short name of the option.. - - - - Initializes a new instance of the class. - - The long name of the option. - - - - Initializes a new instance of the class. - - The short name of the option. - The long name of the option or null if not used. - - - - Helper factory method for testing purpose. - - An instance. - - - - Models an option that can accept multiple values as separated arguments. - - - - - Initializes a new instance of the class. - The default long name will be inferred from target property. - - - - - Initializes a new instance of the class. - - The short name of the option. - - - - Initializes a new instance of the class. - - The long name of the option. - - - - Initializes a new instance of the class. - - The short name of the option. - The long name of the option or null if not used. - - - - Indicates the instance method that must be invoked when it becomes necessary show your help screen. - The method signature is an instance method with no parameters and - return value. - - - - - Initializes a new instance of the class. - Although it is possible, it is strongly discouraged redefine the long name for this option - not to disorient your users. It is also recommended not to define a short one. - - - - - Initializes a new instance of the class - with the specified short name. Use parameter less constructor instead. - - The short name of the option. - - It's highly not recommended change the way users invoke help. It may create confusion. - - - - - Initializes a new instance of the class - with the specified long name. Use parameter less constructor instead. - - The long name of the option or null if not used. - - It's highly not recommended change the way users invoke help. It may create confusion. - - - - - Initializes a new instance of the class. - Allows you to define short and long option names. - - The short name of the option. - The long name of the option or null if not used. - - It's highly not recommended change the way users invoke help. It may create confusion. - - - - - Returns always false for this kind of option. - This behaviour can't be changed by design; if you try set - an will be thrown. - - - - - Models an option that can accept multiple values. - Must be applied to a field compatible with an interface - of instances. - - - - - Initializes a new instance of the class. - The default long name will be inferred from target property. - - - - - Initializes a new instance of the class. - - The short name of the option. - - - - Initializes a new instance of the class. - - The long name of the option or null if not used. - - - - Initializes a new instance of the class. - - The short name of the option. - The long name of the option or null if not used. - - - - Initializes a new instance of the class. - - The short name of the option or null if not used. - The long name of the option or null if not used. - Values separator character. - - - - Gets or sets the values separator character. - - - - - Indicates that the property can receive an instance of type . - - - - - Models a list of command line arguments that are not options. - Must be applied to a field compatible with an interface - of instances. - - To map individual values use instead . - - - - Initializes a new instance of the class. - - A type that implements . - Thrown if is null. - - - - Gets or sets the maximum element allow for the list managed by type. - If lesser than 0, no upper bound is fixed. - If equal to 0, no elements are allowed. - - - - - Gets the concrete type specified during initialization. - - - - - Maps a single unnamed option to the target property. Values will be mapped in order of Index. - This attribute takes precedence over with which - can coexist. - - It can handle only scalar values. Do not apply to arrays or lists. - - - - Initializes a new instance of the class. - - The _index of the option. - - - - Gets the position this option has on the command line. - - - - - Utility extension methods for System.Char. - - - - - Encapsulates property writing primitives. - - - - - Utility extension methods for System.String. - - - - - Gets or sets the assembly from which to pull information. Setter provided for testing purpose. - - - - - Utility extension methods for query target capabilities. - - - - - Maps unnamed options to property using and . - - - - - Helper method for testing purpose. - - An argument enumerator instance. - The next input value. - - - - Initializes a new instance of the class. Used for unit testing purpose. - - Option short name. - Option long name. - - - - Initializes a new instance of the class. - It is internal rather than private for unit testing purpose. - - Initial internal capacity. - Parser settings instance. - - - - Provides means to format an help screen. - You can assign it in place of a instance. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - specifying the sentence builder. - - - A instance. - - - - - Initializes a new instance of the class - specifying heading string. - - An heading string or an instance of . - Thrown when parameter is null or empty string. - - - - Initializes a new instance of the class - specifying the sentence builder and heading string. - - A instance. - A string with heading or an instance of . - - - - Initializes a new instance of the class - specifying heading and copyright strings. - - A string with heading or an instance of . - A string with copyright or an instance of . - Thrown when one or more parameters are null or empty strings. - - - - Initializes a new instance of the class - specifying heading and copyright strings. - - A instance. - A string with heading or an instance of . - A string with copyright or an instance of . - Thrown when one or more parameters are null or empty strings. - - - - Initializes a new instance of the class - specifying heading and copyright strings. - - A string with heading or an instance of . - A string with copyright or an instance of . - The instance that collected command line arguments parsed with class. - Thrown when one or more parameters are null or empty strings. - - - - Initializes a new instance of the class - specifying heading and copyright strings. - - A instance. - A string with heading or an instance of . - A string with copyright or an instance of . - The instance that collected command line arguments parsed with class. - Thrown when one or more parameters are null or empty strings. - - - - Creates a new instance of the class using common defaults. - - - An instance of class. - - The instance that collected command line arguments parsed with class. - - - - Creates a new instance of the class using common defaults. - - - An instance of class. - - The instance that collected command line arguments parsed with class. - A delegate used to customize the text block for reporting parsing errors. - If true the output style is consistent with verb commands (no dashes), otherwise it outputs options. - - - - Creates a new instance of the class using common defaults, - for verb commands scenario. - - - An instance of class. - - The instance that collected command line arguments parsed with class. - The verb command invoked. - - - - Supplies a default parsing error handler implementation. - - The instance that collects parsed arguments parsed and associates - to a property of type . - The instance. - - - - Converts the help instance to a . - - This instance. - The that contains the help screen. - - - - Adds a text line after copyright and before options usage strings. - - A instance. - Thrown when parameter is null or empty string. - - - - Adds a text line at the bottom, after options usage string. - - A instance. - Thrown when parameter is null or empty string. - - - - Adds a text block with options usage string. - - The instance that collected command line arguments parsed with class. - Thrown when parameter is null. - - - - Adds a text block with options usage string. - - The instance that collected command line arguments parsed with the class. - The word to use when the option is required. - Thrown when parameter is null. - Thrown when parameter is null or empty string. - - - - Adds a text block with options usage string. - - The instance that collected command line arguments parsed with the class. - The word to use when the option is required. - The maximum length of the help documentation. - Thrown when parameter is null. - Thrown when parameter is null or empty string. - - - - Builds a string that contains a parsing error message. - - An options target instance that collects parsed arguments parsed with the - associated to a property of type . - Number of spaces used to indent text. - The that contains the parsing error message. - - - - Returns the help screen as a . - - The that contains the help screen. - - - - The OnFormatOptionHelpText method also allows derived classes to handle the event without attaching a delegate. - This is the preferred technique for handling the event in a derived class. - - Data for the event. - - - - Occurs when an option help text is formatted. - - - - - Gets or sets the heading string. - You can directly assign a instance. - - - - - Gets or sets the copyright string. - You can directly assign a instance. - - - - - Gets or sets the maximum width of the display. This determines word wrap when displaying the text. - - The maximum width of the display. - - - - Gets or sets a value indicating whether the format of options should contain dashes. - It modifies behavior of method. - - - - - Gets or sets a value indicating whether to add an additional line after the description of the option. - - - - - Gets the instance specified in constructor. - - - - - Models an abstract sentence builder. - - - - - Creates the built in sentence builder. - - The built in sentence builder. - - - - Gets a string containing word 'option'. - - The word 'option'. - - - - Gets a string containing the word 'and'. - - The word 'and'. - - - - Gets a string containing the sentence 'required option missing'. - - The sentence 'required option missing'. - - - - Gets a string containing the sentence 'violates format'. - - The sentence 'violates format'. - - - - Gets a string containing the sentence 'violates mutual exclusiveness'. - - The sentence 'violates mutual exclusiveness'. - - - - Gets a string containing the error heading text. - - The error heading text. - - - - Models an english sentence builder, currently the default one. - - - - - Gets a string containing word 'option' in english. - - The word 'option' in english. - - - - Gets a string containing the word 'and' in english. - - The word 'and' in english. - - - - Gets a string containing the sentence 'required option missing' in english. - - The sentence 'required option missing' in english. - - - - Gets a string containing the sentence 'violates format' in english. - - The sentence 'violates format' in english. - - - - Gets a string containing the sentence 'violates mutual exclusiveness' in english. - - The sentence 'violates mutual exclusiveness' in english. - - - - Gets a string containing the error heading text in english. - - The error heading text in english. - - - - Models the copyright part of an help text. - You can assign it where you assign any instance. - - - - - Initializes a new instance of the class - specifying author and year. - - The company or person holding the copyright. - The year of coverage of copyright. - Thrown when parameter is null or empty string. - - - - Initializes a new instance of the class - specifying author and copyrightYears. - - The company or person holding the copyright. - The copyrightYears of coverage of copyright. - Thrown when parameter is null or empty string. - Thrown when parameter is not supplied. - - - - Initializes a new instance of the class - specifying symbol case, author and copyrightYears. - - The case of the copyright symbol. - The company or person holding the copyright. - The copyrightYears of coverage of copyright. - Thrown when parameter is null or empty string. - Thrown when parameter is not supplied. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with an assembly attribute, this overrides all formatting. - - The attribute which text to use. - - - - Converts the copyright instance to a . - - This instance. - The that contains the copyright. - - - - Returns the copyright as a . - - The that contains the copyright. - - - - When overridden in a derived class, allows to specify a new algorithm to render copyright copyrightYears - as a instance. - - A array of copyrightYears. - A instance with copyright copyrightYears. - - - - Gets the default copyright information. - Retrieved from , if it exists, - otherwise it uses as copyright holder with the current year. - If neither exists it throws an . - - - - - Gets a different copyright word when overridden in a derived class. - - - - - Models the heading part of an help text. - You can assign it where you assign any instance. - - - - - Initializes a new instance of the class - specifying program name. - - The name of the program. - Thrown when parameter is null or empty string. - - - - Initializes a new instance of the class - specifying program name and version. - - The name of the program. - The version of the program. - Thrown when parameter is null or empty string. - - - - Converts the heading to a . - - This instance. - The that contains the heading. - - - - Returns the heading as a . - - The that contains the heading. - - - - Writes out a string and a new line using the program name specified in the constructor - and parameter. - - The message to write. - The target derived type. - Thrown when parameter is null or empty string. - Thrown when parameter is null. - - - - Writes out a string and a new line using the program name specified in the constructor - and parameter to standard output stream. - - The message to write. - Thrown when parameter is null or empty string. - - - - Writes out a string and a new line using the program name specified in the constructor - and parameter to standard error stream. - - The message to write. - Thrown when parameter is null or empty string. - - - - Gets the default heading instance. - The title is retrieved from , - or the assembly short name if its not defined. - The version is retrieved from , - or the assembly version if its not defined. - - - - - Provides base properties for creating an attribute, used to define multiple lines of text. - - - - - Initializes a new instance of the class. Used in derived type - using one line of text. - - The first line of text. - - - - Initializes a new instance of the class. Used in type - using two lines of text. - - The first line of text. - The second line of text. - - - - Initializes a new instance of the class. Used in type - using three lines of text. - - The first line of text. - The second line of text. - The third line of text. - - - - Initializes a new instance of the class. Used in type - using four lines of text. - - The first line of text. - The second line of text. - The third line of text. - The fourth line of text. - - - - Initializes a new instance of the class. Used in type - using five lines of text. - - The first line of text. - The second line of text. - The third line of text. - The fourth line of text. - The fifth line of text. - - - - Returns the last line with text. Preserves blank lines if user intended by skipping a line. - - The last index of line of the non-blank line. - - The string array to process. - - - - Gets the all non-blank lines as string. - - A string of all non-blank lines. - - - - Gets the first line of text. - - - - - Gets the second line of text. - - - - - Gets third line of text. - - - - - Gets the fourth line of text. - - - - - Gets the fifth line of text. - - - - - Models a multiline assembly license text. - - - - - Initializes a new instance of the class - with one line of text. - - First line of license text. - - - - Initializes a new instance of the class - with two lines of text. - - First line of license text. - Second line of license text. - - - - Initializes a new instance of the class - with three lines of text. - - First line of license text. - Second line of license text. - Third line of license text. - - - - Initializes a new instance of the class - with four lines of text. - - First line of license text. - Second line of license text. - Third line of license text. - Fourth line of license text. - - - - Initializes a new instance of the class - with five lines of text. - - First line of license text. - Second line of license text. - Third line of license text. - Fourth line of license text. - Fifth line of license text. - - - - Models a multiline assembly usage text. - - - - - Initializes a new instance of the class - with one line of text. - - First line of usage text. - - - - Initializes a new instance of the class - with two lines of text. - - First line of usage text. - Second line of usage text. - - - - Initializes a new instance of the class - with three lines of text. - - First line of usage text. - Second line of usage text. - Third line of usage text. - - - - Initializes a new instance of the class - with four lines of text. - - First line of usage text. - Second line of usage text. - Third line of usage text. - Fourth line of usage text. - - - - Initializes a new instance of the class - with five lines of text. - - First line of usage text. - Second line of usage text. - Third line of usage text. - Fourth line of usage text. - Fifth line of usage text. - - - - Provides data for the FormatOptionHelpText event. - - - - - Initializes a new instance of the class. - - Option to format. - - - - Gets the option to format. - - - - - Indicates the instance method that must be invoked when it becomes necessary show your help screen. - The method signature is an instance method with that accepts and returns a . - - - - - Initializes a new instance of the class. - Although it is possible, it is strongly discouraged redefine the long name for this option - not to disorient your users. - - - - - Initializes a new instance of the class - with the specified long name. Use parameter less constructor instead. - - Help verb option alternative name. - - It's highly not recommended change the way users invoke help. It may create confusion. - - - - - Help verb command do not support short name by design. - - - - - Help verb command like ordinary help option cannot be mandatory by design. - - - - - Models a verb command specification. - - - - - Initializes a new instance of the class. - - The long name of the verb command. - - - - Verb commands do not support short name by design. - - - - - Verb commands cannot be mandatory since are mutually exclusive by design. - - - - - Models a bad parsed option. - - - - - Gets the short name of the option. - - Returns the short name of the option. - - - - Gets the long name of the option. - - Returns the long name of the option. - - - - Provides methods to parse command line arguments. - - - - - Default exit code (1) used by - and overloads. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class, - configurable with a object. - - The object is used to configure - aspects and behaviors of the parser. - - - - Initializes a new instance of the class, - configurable with using a delegate. - - The delegate used to configure - aspects and behaviors of the parser. - - - - Finalizes an instance of the class. - - - - - Parses a array of command line arguments, setting values in - parameter instance's public fields decorated with appropriate attributes. - - A array of command line arguments. - An instance used to receive values. - Parsing rules are defined using derived types. - True if parsing process succeed. - Thrown if is null. - Thrown if is null. - - - - Parses a array of command line arguments with verb commands, setting values in - parameter instance's public fields decorated with appropriate attributes. - This overload supports verb commands. - - A array of command line arguments. - An instance used to receive values. - Parsing rules are defined using derived types. - Delegate executed to capture verb command name and instance. - True if parsing process succeed. - Thrown if is null. - Thrown if is null. - Thrown if is null. - - - - Parses a array of command line arguments, setting values in - parameter instance's public fields decorated with appropriate attributes. If parsing fails, the method invokes - the delegate, if null exits with . - - A array of command line arguments. - An object's instance used to receive values. - Parsing rules are defined using derived types. - The delegate executed when parsing fails. - True if parsing process succeed. - Thrown if is null. - Thrown if is null. - - - - Parses a array of command line arguments with verb commands, setting values in - parameter instance's public fields decorated with appropriate attributes. If parsing fails, the method invokes - the delegate, if null exits with . - This overload supports verb commands. - - A array of command line arguments. - An instance used to receive values. - Parsing rules are defined using derived types. - Delegate executed to capture verb command name and instance. - The delegate executed when parsing fails. - True if parsing process succeed. - Thrown if is null. - Thrown if is null. - Thrown if is null. - - - - Frees resources owned by the instance. - - - - - Gets the singleton instance created with basic defaults. - - - - - Gets the instance that implements in use. - - - - - This exception is thrown when a generic parsing error occurs. - - - - - Initializes a new instance of the class. The exception is thrown - when something unexpected occurs during the parsing process. - - - - - Initializes a new instance of the class. The exception is thrown - when something unexpected occurs during the parsing process. - - Error message string. - - - - Initializes a new instance of the class. The exception is thrown - when something unexpected occurs during the parsing process. - - Error message string. - Inner exception reference. - - - - Initializes a new instance of the class. The exception is thrown - when something unexpected occurs during the parsing process. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Provides settings for . Once consumed cannot be reused. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class, - setting the case comparison behavior. - - If set to true, parsing will be case sensitive. - - - - Initializes a new instance of the class, - setting the used for help method output. - - Any instance derived from , - default . Setting this argument to null, will disable help screen. - - - - Initializes a new instance of the class, - setting case comparison and help output options. - - If set to true, parsing will be case sensitive. - Any instance derived from , - default . Setting this argument to null, will disable help screen. - - - - Initializes a new instance of the class, - setting case comparison and mutually exclusive behaviors. - - If set to true, parsing will be case sensitive. - If set to true, enable mutually exclusive behavior. - - - - Initializes a new instance of the class, - setting case comparison, mutually exclusive behavior and help output option. - - If set to true, parsing will be case sensitive. - If set to true, enable mutually exclusive behavior. - Any instance derived from , - default . Setting this argument to null, will disable help screen. - - - - Initializes a new instance of the class, - setting case comparison, mutually exclusive behavior and help output option. - - If set to true, parsing will be case sensitive. - If set to true, enable mutually exclusive behavior. - If set to true, allow the parser to skip unknown argument, otherwise return a parse failure - Any instance derived from , - default . Setting this argument to null, will disable help screen. - - - - Finalizes an instance of the class. - - - - - Frees resources owned by the instance. - - - - - Gets or sets a value indicating whether perform case sensitive comparisons. - - - - - Gets or sets a value indicating whether set a mutually exclusive behavior. - Default is set to false. - - - - - Gets or sets the used for help method output. - Setting this property to null, will disable help screen. - - - - - Gets or sets a value indicating whether the parser shall move on to the next argument and ignore the given argument if it - encounter an unknown arguments - - - true to allow parsing the arguments with different class options that do not have all the arguments. - - - This allows fragmented version class parsing, useful for project with add-on where add-ons also requires command line arguments but - when these are unknown by the main program at build time. - - - - - Gets or sets the culture used when parsing arguments to typed properties. - - - Default is CurrentCulture of . - - - - - Represents the parser state. - - - - - Gets errors occurred during parsing. - - - - - Models a type that records the parser state after parsing. - - - - - Gets a list of parsing errors. - - - Parsing errors. - - - - - Models a parsing error. - - - - - Gets or a the bad parsed option. - - - The bad option. - - - - - Gets or sets a value indicating whether this violates required. - - - true if violates required; otherwise, false. - - - - - Gets or sets a value indicating whether this violates format. - - - true if violates format; otherwise, false. - - - - - Gets or sets a value indicating whether this violates mutual exclusiveness. - - - true if violates mutual exclusiveness; otherwise, false. - - - - diff --git a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.DataSet.dll b/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.DataSet.dll deleted file mode 100644 index 88e6002e..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.DataSet.dll and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.DataSet.xml b/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.DataSet.xml deleted file mode 100644 index 4cdb2290..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.DataSet.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - ExcelDataReader.DataSet - - - - - ExcelDataReader DataSet extensions - - - - - Converts all sheets to a DataSet - - The IExcelDataReader instance - An optional configuration object to modify the behavior of the conversion - A dataset with all workbook contents - - - - Processing configuration options and callbacks for IExcelDataReader.AsDataSet(). - - - - - Gets or sets a value indicating whether to set the DataColumn.DataType property in a second pass. - - - - - Gets or sets a callback to obtain configuration options for a DataTable. - - - - - Gets or sets a callback to determine whether to include the current sheet in the DataSet. Called once per sheet before ConfigureDataTable. - - - - - Processing configuration options and callbacks for AsDataTable(). - - - - - Gets or sets a value indicating the prefix of generated column names. - - - - - Gets or sets a value indicating whether to use a row from the data as column names. - - - - - Gets or sets a callback to determine which row is the header row. Only called when UseHeaderRow = true. - - - - - Gets or sets a callback to determine whether to include the current row in the DataTable. - - - - - Gets or sets a callback to determine whether to include the specific column in the DataTable. Called once per column after reading the headers. - - - - diff --git a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.dll b/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.dll deleted file mode 100644 index 767f8da7..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.dll and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.xml b/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.xml deleted file mode 100644 index dc62d59a..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/ExcelDataReader.xml +++ /dev/null @@ -1,1680 +0,0 @@ - - - - ExcelDataReader - - - - - A range for cells using 0 index positions. - - - - - Gets the column the range starts in - - - - - Gets the row the range starts in - - - - - Gets the column the range ends in - - - - - Gets the row the range ends in - - - - - If present the Calculate Message was in the status bar when Excel saved the file. - This occurs if the sheet changed, the Manual calculation option was on, and the Recalculate Before Save option was off. - - - - - Gets the string value. Encoding is only used with BIFF2-5 byte strings. - - - - - Represents blank cell - Base class for all cell types - - - - - Gets the zero-based index of row containing this cell. - - - - - Gets the zero-based index of column containing this cell. - - - - - Gets the extended format used for this cell. If BIFF2 and this value is 63, this record was preceded by an IXFE record containing the actual XFormat >= 63. - - - - - Gets the number format used for this cell. Only used in BIFF2 without XF records. Used by Excel 2.0/2.1 instead of XF/IXFE records. - - - - - - - - Gets a value indicating whether the cell's record identifier is BIFF2-specific. - The shared binary layout of BIFF2 cells are different from BIFF3+. - - - - - Represents BIFF BOF record - - - - - Gets the version. - - - - - Gets the type of the BIFF block - - - - - Gets the creation Id. - - Not used before BIFF5 - - - - Gets the creation year. - - Not used before BIFF5 - - - - Gets the file history flag. - - Not used before BIFF8 - - - - Gets the minimum Excel version to open this file. - - Not used before BIFF8 - - - - Represents Sheet record in Workbook Globals - - - - - Gets the worksheet data start offset. - - - - - Gets the worksheet type. - - - - - Gets the visibility of the worksheet. - - - - - Gets the name of the worksheet. - - - - - Represents additional space for very large records - - - - - Represents cell-indexing record, finishes each row values block - - - - - Gets the offset of first row linked with this record - - - - - Gets the addresses of cell values. - - - - - Gets the row height in twips - - - - - Represents Dimensions of worksheet - - - - - Gets the index of first row. - - - - - Gets the index of last row + 1. - - - - - Gets the index of first column. - - - - - Gets the index of last column + 1. - - - - - Represents BIFF EOF resord - - - - - Represents FILEPASS record containing XOR obfuscation details or a an EncryptionInfo structure - - - - - Represents a string value of format - - - - - Gets the string value. - - - - - Represents a cell containing formula - - - - - Indicates that a string value is stored in a String record that immediately follows this record. See[MS - XLS] 2.5.133 FormulaValue. - - - - - Indecates that the formula value is an empty string. - - - - - Indicates that the property is valid. - - - - - Indicates that the property is valid. - - - - - Indicates that the property is valid. - - - - - Gets the formula flags - - - - - Gets the formula value type. - - - - - Represents a string value of formula - - - - - Gets the string value. - - - - - Represents a string value of a header or footer. - - - - - Gets the string value. - - - - - Represents a worksheet index - - - - - Gets a value indicating whether BIFF8 addressing is used or not. - - - - - Gets the zero-based index of first existing row - - - - - Gets the zero-based index of last existing row - - - - - Gets the addresses of DbCell records - - - - - Represents a constant integer number in range 0..65535 - - - - - Gets the cell value. - - - - - Represents InterfaceHdr record in Wokrbook Globals - - - - - Gets the CodePage for Interface Header - - - - - [MS-XLS] 2.4.148 Label - Represents a string - - - - - Gets the cell value. - - - - - Represents a string stored in SST - - - - - Gets the index of string in Shared String Table - - - - - [MS-XLS] 2.4.168 MergeCells - If the count of the merged cells in the document is greater than 1026, the file will contain multiple adjacent MergeCells records. - - - - - Represents MSO Drawing record - - - - - Represents multiple Blank cell - - - - - Gets the zero-based index of last described column - - - - - Returns format forspecified column, column must be between ColumnIndex and LastColumnIndex - - Index of column - Format - - - - Represents multiple RK number cells - - - - - Gets the zero-based index of last described column - - - - - Returns format for specified column - - Index of column, must be between ColumnIndex and LastColumnIndex - The format. - - - - Gets the value for specified column - - Index of column, must be between ColumnIndex and LastColumnIndex - The value. - - - - Represents a floating-point number - - - - - Gets the value of this cell - - - - - For now QuickTip will do nothing, it seems to have a different - - - - - Represents basic BIFF record - Base class for all BIFF record types - - - - - Gets the type Id of this entry - - - - - Gets the data size of this entry - - - - - Gets the whole size of structure - - - - - Represents an RK number cell - - - - - Gets the value of this cell - - - - - Decodes RK-encoded number - - Encoded number - The number. - - - - Represents row record in table - - - - - Gets the zero-based index of row described - - - - - Gets the index of first defined column - - - - - Gets the index of last defined column - - - - - Gets a value indicating whether to use the default row height instead of the RowHeight property - - - - - Gets the row height in twips. - - - - - Gets a value indicating whether the XFormat property is used - - - - - Gets the default format for this row - - - - - Represents record with the only two-bytes value - - - - - Gets the value - - - - - Represents a Shared String Table in BIFF8 format - - - - - Gets the number of strings in SST - - - - - Gets the count of unique strings in SST - - - - - Parses strings out of the SST record and subsequent Continue records from the BIFF stream - - - - - Returns string at specified index - - Index of string to get - Workbook encoding - string value if it was found, empty string otherwise - - - - Represents a BIFF stream - - - - - Gets the size of BIFF stream in bytes - - - - - Gets or sets the current position in BIFF stream - - - - - Gets or sets the ICryptoTransform instance used to decrypt the current block - - - - - Gets or sets the current block number being decrypted with CipherTransform - - - - - Sets stream pointer to the specified offset - - Offset value - Offset origin - - - - Reads record under cursor and advances cursor position to next record - - The record -or- null. - - - - Returns record at specified offset - - The stream - The record -or- null. - - - - Create an ICryptoTransform instance to decrypt a 1024-byte block - - - - - Decrypt some dummy bytes to align the decryptor with the position in the current 1024-byte block - - - - - If present the Calculate Message was in the status bar when Excel saved the file. - This occurs if the sheet changed, the Manual calculation option was on, and the Recalculate Before Save option was off. - - - - - Represents Workbook's global window description - - - - - Gets the X position of a window - - - - - Gets the Y position of a window - - - - - Gets the width of the window - - - - - Gets the height of the window - - - - - Gets the window flags - - - - - Gets the active workbook tab (zero-based) - - - - - Gets the first visible workbook tab (zero-based) - - - - - Gets the number of selected workbook tabs - - - - - Gets the workbook tab width to horizontal scrollbar width - - - - - Word-sized string, stored as single bytes with encoding from CodePage record. Used in BIFF2-5 - - - - - Gets the number of characters in the string. - - - - - Gets the value. - - - - - Plain string without backing storage. Used internally - - - - - Byte sized string, stored as bytes, with encoding from CodePage record. Used in BIFF2-5 . - - - - - [MS-XLS] 2.5.240 ShortXLUnicodeString - Byte-sized string, stored as single or multibyte unicode characters. - - - - - Gets a value indicating whether the string is a multibyte string or not. - - - - - Helper class for parsing the BIFF8 Shared String Table (SST) - - - - - Gets or sets the offset into the current record's byte content. May point at the end when the current record has been parsed entirely. - - - - - Reads an SST string potentially spanning multiple records - - The string - - - - If the read position is exactly at the end of a record: - Read the next continue record and update the read position. - - - - - Advances the read position a number of bytes, potentially spanning - multiple records. - NOTE: If the new read position ends on a record boundary, - the next record will not be read, and the read position will point - at the end of the record! Must call EnsureRecord() as needed - to read the next continue record and reset the read position. - - Number of bytes to skip - - - - [MS-XLS] 2.5.293 XLUnicodeRichExtendedString - Word-sized formatted string in SST, stored as single or multibyte unicode characters potentially spanning multiple Continue records. - - - - - Gets the number of characters in the string. - - - - - Gets the flags. - - - - - Gets a value indicating whether the string has an extended record. - - - - - Gets a value indicating whether the string has a formatting record. - - - - - Gets a value indicating whether the string is a multibyte string or not. - - - - - Gets the number of formats used for formatting (0 if string has no formatting) - - - - - Gets the size of extended string in bytes, 0 if there is no one - - - - - Gets the head (before string data) size in bytes - - - - - Gets the tail (after string data) size in bytes - - - - - [MS-XLS] 2.5.294 XLUnicodeString - Word-sized string, stored as single or multibyte unicode characters. - - - - - Gets a value indicating whether the string is a multibyte string or not. - - - - - Represents Globals section of workbook - - - - - Gets or sets the Shared String Table of workbook - - - - - Represents Worksheet section in workbook - - - - - Gets the worksheet name - - - - - Gets the visibility of worksheet - - - - - Gets the worksheet data offset. - - - - - Find how many rows to read at a time and their offset in the file. - If rows are stored sequentially in the file, returns a block size of up to 32 rows. - If rows are stored non-sequentially, the block size may extend up to the entire worksheet stream - - - - - Reads additional records if needed: a string record might follow a formula result - - - - - Returns an index into Workbook.Formats for the given cell and preceding ixfe record. - - - - - Gets or sets the zero-based column index. - - - - - Common handling of extended formats (XF) and mappings between file-based and global number format indices. - - - - - Gets the dictionary of global number format strings. Always includes the built-in formats at their - corresponding indices and any additional formats specified in the workbook file. - - - - - Gets the the dictionary of mappings between format index in the file and key in the Formats dictionary. - - - - - Returns the global number format index from an XF index. - - - - - Returns the global number format index from a file-based format index. - - - - - Registers a number format string and its file-based format index in the workbook's Formats dictionary. - If the format string matches a built-in or previously registered format, it will be mapped to that index. - - - - - Registers an extended format and its file based number format index. - - - - - Represents single Root Directory record - - - - - Gets or sets the name of directory entry - - - - - Gets or sets the entry type - - - - - Gets or sets the entry "color" in directory tree - - - - - Gets or sets the SID of left sibling - - 0xFFFFFFFF if there's no one - - - - Gets or sets the SID of right sibling - - 0xFFFFFFFF if there's no one - - - - Gets or sets the SID of first child (if EntryType is STGTY_STORAGE) - - 0xFFFFFFFF if there's no one - - - - Gets or sets the CLSID of container (if EntryType is STGTY_STORAGE) - - - - - Gets or sets the user flags of container (if EntryType is STGTY_STORAGE) - - - - - Gets or sets the creation time of entry - - - - - Gets or sets the last modification time of entry - - - - - Gets or sets the first sector of data stream (if EntryType is STGTY_STREAM) - - if EntryType is STGTY_ROOT, this can be first sector of MiniStream - - - - Gets or sets the size of data stream (if EntryType is STGTY_STREAM) - - if EntryType is STGTY_ROOT, this can be size of MiniStream - - - - Gets or sets a value indicating whether this entry relats to a ministream - - - - - Gets or sets the prop type. Reserved, must be 0. - - - - - Reads bytes from a regular or mini stream. - - - - - The header contains the first 109 DIF entries. If there are any more, read from a separate stream. - - - - - Represents Excel file header - - - - - Gets or sets the file signature - - - - - Gets a value indicating whether the signature is valid. - - - - - Gets or sets the class id. Typically filled with zeroes - - - - - Gets or sets the version. Must be 0x003E - - - - - Gets or sets the dll version. Must be 0x0003 - - - - - Gets or sets the byte order. Must be 0xFFFE - - - - - Gets or sets the sector size in Pot - - - - - Gets the sector size. Typically 512 - - - - - Gets or sets the mini sector size in Pot - - - - - Gets the mini sector size. Typically 64 - - - - - Gets or sets the number of directory sectors. If Major Version is 3, the Number of - Directory Sectors MUST be zero. This field is not supported for version 3 compound files - - - - - Gets or sets the number of FAT sectors - - - - - Gets or sets the number of first Root Directory Entry (Property Set Storage, FAT Directory) sector - - - - - Gets or sets the transaction signature, 0 for Excel - - - - - Gets or sets the maximum size for small stream, typically 4096 bytes - - - - - Gets or sets the first sector of Mini FAT, FAT_EndOfChain if there's no one - - - - - Gets or sets the number of sectors in Mini FAT, 0 if there's no one - - - - - Gets or sets the first sector of DIF, FAT_EndOfChain if there's no one - - - - - Gets or sets the number of sectors in DIF, 0 if there's no one - - - - - Gets or sets the first 109 locations in the DIF sector chain - - - - - Reads completely through a CSV stream to determine encoding, separator, field count and row count. - Uses fallbackEncoding if there is no BOM. Throws DecoderFallbackException if there are invalid characters in the stream. - Returns the separator whose average field count is closest to its max field count. - - - - - Low level, reentrant CSV parser. Call ParseBuffer() in a loop, and finally Flush() to empty the internal buffers. - - - - - Helpers class - - - - - Determines whether the encoding is single byte or not. - - The encoding. - - if the specified encoding is single byte; otherwise, . - - - - - Convert a double from Excel to an OA DateTime double. - The returned value is normalized to the '1900' date mode and adjusted for the 1900 leap year bug. - - - - - The common workbook interface between the binary and OpenXml formats - - A type implementing IWorksheet - - - - The common worksheet interface between the binary and OpenXml formats - - - - - Parse ECMA-376 number format strings from Excel and other spreadsheet softwares. - - - - - Initializes a new instance of the class. - - The number format string. - - - - Gets a value indicating whether the number format string is valid. - - - - - Gets the number format string. - - - - - Gets a value indicating whether the format represents a DateTime - - - - - Gets a value indicating whether the format represents a TimeSpan - - - - - Parses as many placeholders and literals needed to format a number with optional decimals. - Returns number of tokens parsed, or 0 if the tokens didn't form a number. - - - - - A seekable stream for reading an EncryptedPackage blob using OpenXml Agile Encryption. - - - - - Represents "Agile Encryption" used in XLSX (Office 2010 and newer) - - - - - Base class for the various encryption schemes used by Excel - - - - - Gets a value indicating whether XOR obfuscation is used. - When true, the ICryptoTransform can be cast to XorTransform and - handle the special case where XorArrayIndex must be manipulated - per record. - - - - - Represents the binary RC4+MD5 encryption header used in XLS. - - - - - Minimal RC4 decryption compatible with System.Security.Cryptography.SymmetricAlgorithm. - - - - - Represents the binary "Standard Encryption" header used in XLS and XLSX. - XLS uses RC4+SHA1. XLSX uses AES+SHA1. - - - - - 2.3.5.2 RC4 CryptoAPI Encryption Key Generation - - - - - 2.3.4.7 ECMA-376 Document Encryption Key Generation (Standard Encryption) - - - - - Represents "XOR Deobfucation Method 1" used in XLS. - - - - - Minimal Office "XOR Deobfuscation Method 1" implementation compatible - with System.Security.Cryptography.SymmetricAlgorithm. - - - - - Generates a 16 byte obfuscation array based on the POI/LibreOffice implementations - - - - - Gets or sets the obfuscation array index. BIFF obfuscation uses a different XorArrayIndex per record. - - - - - Base class for worksheet stream elements - - - - - Shared string table - - - - - Logic for the Excel dimensions. Ex: A15 - - The value. - The column, 1-based. - The row, 1-based. - - - - Gets or sets the zero-based row index. - - - - - Gets or sets the height of this row in points. Zero if hidden or collapsed. - - - - - Gets or sets the cells in this row. - - - - - Gets a value indicating whether the row is empty. NOTE: Returns true if there are empty, but formatted cells. - - - - - Returns the zero-based maximum column index reference on this row. - - - - - Initializes a new instance of the class. - - The zip file stream. - - - - Gets the shared strings stream. - - The shared strings stream. - - - - Gets the styles stream. - - The styles stream. - - - - Gets the workbook stream. - - The workbook stream. - - - - Gets the worksheet stream. - - The sheet id. - The worksheet stream. - - - - Gets the workbook rels stream. - - The rels stream. - - - - ExcelDataReader Class - - - - - A generic implementation of the IExcelDataReader interface using IWorkbook/IWorksheet to enumerate data. - - A type implementing IWorkbook - A type implementing IWorksheet - - - - - - - - - - Configuration options for an instance of ExcelDataReader. - - - - - Gets or sets a value indicating the encoding to use when the input XLS lacks a CodePage record, - or when the input CSV lacks a BOM and does not parse as UTF8. Default: cp1252. (XLS BIFF2-5 and CSV only) - - - - - Gets or sets the password used to open password protected workbooks. - - - - - Gets or sets an array of CSV separator candidates. The reader autodetects which best fits the input data. Default: , ; TAB | # (CSV only) - - - - - Gets or sets a value indicating whether to leave the stream open after the IExcelDataReader object is disposed. Default: false - - - - - Gets or sets a value indicating the number of rows to analyze for encoding, separator and field count in a CSV. - When set, this option causes the IExcelDataReader.RowCount property to throw an exception. - Default: 0 - analyzes the entire file (CSV only, has no effect on other formats) - - - - - The ExcelReader Factory - - - - - Creates an instance of or - - The file stream. - The configuration object. - The excel data reader. - - - - Creates an instance of - - The file stream. - The configuration object. - The excel data reader. - - - - Creates an instance of - - The file stream. - The reader configuration -or- to use the default configuration. - The excel data reader. - - - - Creates an instance of ExcelCsvReader - - The file stream. - The reader configuration -or- to use the default configuration. - The excel data reader. - - - - Thrown when there is a problem parsing the Compound Document container format used by XLS and password-protected XLSX. - - - - - Initializes a new instance of the class. - - The error message - - - - Initializes a new instance of the class. - - The error message - The inner exception - - - - Base class for exceptions thrown by ExcelDataReader - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The error message - - - - Initializes a new instance of the class. - - The error message - The inner exception - - - - Initializes a new instance of the class. - - The serialization info - The streaming context - - - - Thrown when ExcelDataReader cannot parse the header - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The error message - - - - Initializes a new instance of the class. - - The error message - The inner exception - - - - Initializes a new instance of the class. - - The serialization info - The streaming context - - - - Thrown when ExcelDataReader cannot open a password protected document because the password - - - - - Initializes a new instance of the class. - - The error message - - - - Header and footer text. - - - - - Gets a value indicating whether the header and footer are different on the first page. - - - - - Gets a value indicating whether the header and footer are different on odd and even pages. - - - - - Gets the header used for the first page if is . - - - - - Gets the footer used for the first page if is . - - - - - Gets the header used for odd pages -or- all pages if is . - - - - - Gets the footer used for odd pages -or- all pages if is . - - - - - Gets the header used for even pages if is . - - - - - Gets the footer used for even pages if is . - - - - - The ExcelDataReader interface - - - - - Gets the sheet name. - - - - - Gets the sheet VBA code name. - - - - - Gets the sheet visible state. - - - - - Gets the sheet header and footer -or- if none set. - - - - - Gets the list of merged cell ranges. - - - - - Gets the number of results (workbooks). - - - - - Gets the number of rows in the current result. - - - - - Gets the height of the current row in points. - - - - - Seeks to the first result. - - - - - Gets the number format for the specified field -or- if there is no value. - - The index of the field to find. - The number format string of the specified field. - - - - Gets the number format index for the specified field -or- -1 if there is no value. - - The index of the field to find. - The number format index of the specified field. - - - - Gets the width the specified column. - - The index of the column to find. - The width of the specified column. - - - - Custom interface for logging messages - - - - - Debug level of the specified message. The other method is preferred since the execution is deferred. - - The message. - The formatting. - - - - Info level of the specified message. The other method is preferred since the execution is deferred. - - The message. - The formatting. - - - - Warn level of the specified message. The other method is preferred since the execution is deferred. - - The message. - The formatting. - - - - Error level of the specified message. The other method is preferred since the execution is deferred. - - The message. - The formatting. - - - - Fatal level of the specified message. The other method is preferred since the execution is deferred. - - The message. - The formatting. - - - - Factory interface for loggers. - - - - - Create a logger for the specified type. - - The type to create a logger for. - The logger instance. - - - - logger type initialization - - - - - Sets up logging to be with a certain type - - The type of ILog for the application to use - - - - Initializes a new instance of a logger for an object. - This should be done only once per object name. - - The type to get a logger for. - ILog instance for an object if log type has been intialized; otherwise a null logger. - - - - The default logger until one is set. - - - - - - - - - - - - - - - - - - - - - - - 2.0 version of LogExtensions, not as awesome as Extension methods - - - - - Gets the logger for a type. - - The type to fetch a logger for. - The type to get the logger for. - Instance of a logger for the object. - This method is thread safe. - - - diff --git a/Assets/TEngine/Config~/Tools/excel2json/FastColoredTextBox.dll b/Assets/TEngine/Config~/Tools/excel2json/FastColoredTextBox.dll deleted file mode 100644 index 1f426e42..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/FastColoredTextBox.dll and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/FastColoredTextBox.xml b/Assets/TEngine/Config~/Tools/excel2json/FastColoredTextBox.xml deleted file mode 100644 index 55d36af0..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/FastColoredTextBox.xml +++ /dev/null @@ -1,3243 +0,0 @@ - - - - FastColoredTextBox - - - - - Item of autocomplete menu - - - - - Returns text for inserting into Textbox - - - - - Compares fragment text with this item - - - - - Returns text for display into popup menu - - - - - This method is called after item inserted into text - - - - - Title for tooltip. - - Return null for disable tooltip for this item - - - - Tooltip text. - - For display tooltip text, ToolTipTitle must be not null - - - - Menu text. This text is displayed in the drop-down menu. - - - - - Fore color of text of item - - - - - Back color of item - - - - - Item do not appears - - - - - Item appears - - - - - Item appears and will selected - - - - - Autocomplete item for code snippets - - Snippet can contain special char ^ for caret position. - - - - Compares fragment text with this item - - - - - This autocomplete item appears after dot - - - - - This Item does not check correspondence to current text fragment. - SuggestItem is intended for dynamic menus. - - - - - Popup menu for autocomplete - - - - - Regex pattern for serach fragment around caret - - - - - Minimum fragment length for popup - - - - - User selects item - - - - - It fires after item inserting - - - - - Occurs when popup menu is opening - - - - - Allow TAB for select menu item - - - - - Interval of menu appear (ms) - - - - - Sets the max tooltip window size - - - - - Tooltip will perm show and duration will be ignored - - - - - Back color of selected item - - - - - Border color of hovered item - - - - - Shows popup menu immediately - - If True - MinFragmentLength will be ignored - - - - Minimal size of menu - - - - - Image list of menu - - - - - Tooltip duration (ms) - - - - - Tooltip - - - - - Base class for bookmark collection - - - - - Collection of bookmarks - - - - - Removes bookmark by line index - - - - - Returns Bookmark by index. - - - - - Bookmark of FastColoredTextbox - - - - - Name of bookmark - - - - - Line index - - - - - Color of bookmark sign - - - - - Scroll textbox to the bookmark - - - - - Char and style - - - - - Unicode character - - - - - Style bit mask - - Bit 1 in position n means that this char will rendering by FastColoredTextBox.Styles[n] - - - - Shows document map of FCTB - - - - - Scale - - - - - Scrollbar visibility - - - - - Exports colored text as HTML - - At this time only TextStyle renderer is supported. Other styles is not exported. - - - - Use nbsp; instead space - - - - - Use nbsp; instead space in beginning of line - - - - - Use original font - - - - - Use style tag instead style attribute - - - - - Use 'br' tag instead of '\n' - - - - - Includes line numbers - - - - - Exports colored text as RTF - - At this time only TextStyle renderer is supported. Other styles are not exported. - - - - Includes line numbers - - - - - Use original font - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Collection of Hints. - This is temporary buffer for currently displayed hints. - - - - - Clears all displayed hints - - - - - Add and shows the hint - - - - - - Is collection contains the hint? - - - - - Count of hints - - - - - Hint of FastColoredTextbox - - - - - Text of simple hint - - - - - Linked range - - - - - Backcolor - - - - - Second backcolor - - - - - Border color - - - - - Fore color - - - - - Text alignment - - - - - Font - - - - - Occurs when user click on simple hint - - - - - Inner control - - - - - Docking (allows None and Fill only) - - - - - Width of hint (if Dock is None) - - - - - Height of hint - - - - - Host panel - - - - - Tag - - - - - Cursor - - - - - Inlining. If True then hint will moves apart text. - - - - - Scroll textbox to the hint - - - - - Creates Hint - - Linked range - Text for simple hint - Inlining. If True then hint will moves apart text - Docking. If True then hint will fill whole line - - - - Creates Hint - - Linked range - Text for simple hint - - - - Creates Hint - - Linked range - Inner control - Inlining. If True then hint will moves apart text - Docking. If True then hint will fill whole line - - - - Creates Hint - - Linked range - Inner control - - - - Returns edited hotkey map - - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - This class records, stores and executes the macros. - - - - - Allows to user to record macros - - - - - Returns current recording state. Set to True/False to start/stop recording programmatically. - - - - - FCTB - - - - - Executes recorded macro - - - - - - Adds the char to current macro - - - - - Adds keyboard key to current macro - - - - - Clears last recorded macro - - - - - Returns True if last macro is empty - - - - - Macros as string. - - - - - Dictionary of shortcuts for FCTB - - - - - Actions for shortcuts - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Highlights syntax for given language - - - - - Highlights syntax for given XML description file - - - - - Uses the given to parse a XML description and adds it as syntax descriptor. - The syntax descriptor is used for highlighting when - - Language property of FCTB is set to - DescriptionFile property of FCTB has the same value as the method parameter - - - Name of the description file - XmlDocument to parse - - - - Adds the given as resilient style. A resilient style is additionally available when highlighting is - based on a syntax descriptor that has been derived from a XML description file. In the run of the highlighting routine - the styles used by the FCTB are always dropped and replaced with the (initial) ones from the syntax descriptor. Resilient styles are - added afterwards and can be used anyway. - - Style to add - - - - Highlights C# code - - - - - - Highlights VB code - - - - - - Highlights HTML code - - - - - - Highlights XML code - - - - - - Highlights SQL code - - - - - - Highlights PHP code - - - - - - Highlights JavaScript code - - - - - - Highlights Lua code - - - - - - String style - - - - - Comment style - - - - - Number style - - - - - C# attribute style - - - - - Class name style - - - - - Keyword style - - - - - Style of tags in comments of C# - - - - - HTML attribute value style - - - - - HTML tag brackets style - - - - - HTML tag name style - - - - - HTML Entity style - - - - - XML attribute style - - - - - XML attribute value style - - - - - XML tag brackets style - - - - - XML tag name style - - - - - XML Entity style - - - - - XML CData style - - - - - Variable style - - - - - Specific PHP keyword style - - - - - Specific PHP keyword style - - - - - SQL Statements style - - - - - SQL Functions style - - - - - SQL Types style - - - - - Language - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Fast colored textbox - - - - - Constructor - - - - - AutoComplete brackets - - - - - Colors of some service visual markers - - - - - Contains UniqueId of start lines of folded blocks - - This dictionary remembers folding state of blocks. - It is needed to restore child folding after user collapsed/expanded top-level folding block. - - - - Strategy of search of brackets to highlighting - - - - - Automatically shifts secondary wordwrap lines on the shift amount of the first line - - - - - Indent of secondary wordwrap lines (in chars) - - - - - MacrosManager records, stores and executes the macroses - - - - - Allows drag and drop - - - - - Collection of Hints. - This is temporary buffer for currently displayed hints. - - You can asynchronously add, remove and clear hints. Appropriate hints will be shown or hidden from the screen. - - - - Delay (ms) of ToolTip - - - - - ToolTip component - - - - - Color of bookmarks - - - - - Bookmarks - - - - - Enables virtual spaces - - - - - Strategy of search of end of folding block - - - - - Indicates if tab characters are accepted as input - - - - - Indicates if return characters are accepted as input - - - - - Shows or hides the caret - - - - - Enables caret blinking - - - - - Draw caret when the control is not focused - - - - - Color of border of text area - - - - - Type of border of text area - - - - - Background color for current line - - - - - Background color for highlighting of changed lines - - - - - Fore color (default style color) - - - - - Height of char in pixels (includes LineInterval) - - - - - Interval between lines (in pixels) - - - - - Width of char in pixels - - - - - Spaces count for tab - - - - - Text was changed - - - - - Text version - - This counter is incremented each time changes the text - - - - Read only - - - - - Shows line numbers. - - - - - Shows vertical lines between folding start line and folding end line. - - - - - Rectangle where located text - - - - - Color of line numbers. - - - - - Start value of first line number. - - - - - Background color of indent area - - - - - Background color of padding area - - - - - Color of disabled component - - - - - Color of caret - - - - - Wide caret - - - - - Color of service lines (folding lines, borders of blocks etc.) - - - - - Padings of text area - - - - - --Do not use this property-- - - - - - Color of folding area indicator - - - - - Enables folding indicator (left vertical line between folding bounds) - - - - - Left distance to text beginning - - - - - Left padding in pixels - - - - - This property draws vertical line after defined char position. - Set to 0 for disable drawing of vertical line. - - - - - Styles - - - - - Hotkeys. Do not use this property in your code, use HotkeysMapping property. - - - - - Hotkeys mapping - - - - - Default text style - This style is using when no one other TextStyle is not defined in Char.style - - - - - Style for rendering Selection area - - - - - Style for folded block rendering - - - - - Style for brackets highlighting - - - - - Style for alternative brackets highlighting - - - - - Opening bracket for brackets highlighting. - Set to '\x0' for disable brackets highlighting. - - - - - Closing bracket for brackets highlighting. - Set to '\x0' for disable brackets highlighting. - - - - - Alternative opening bracket for brackets highlighting. - Set to '\x0' for disable brackets highlighting. - - - - - Alternative closing bracket for brackets highlighting. - Set to '\x0' for disable brackets highlighting. - - - - - Comment line prefix. - - - - - This property specifies which part of the text will be highlighted as you type (by built-in highlighter). - - When a user enters text, a component refreshes highlighting (because the text was changed). - This property specifies exactly which section of the text will be re-highlighted. - This can be useful to highlight multi-line comments, for example. - - - - Is keyboard in replace mode (wide caret) ? - - - - - Allows text rendering several styles same time. - - - - - Allows to record macros. - - - - - Allows AutoIndent. Inserts spaces before new line. - - - - - Does autoindenting in existing lines. It works only if AutoIndent is True. - - - - - Minimal delay(ms) for delayed events (except TextChangedDelayed). - - - - - Minimal delay(ms) for TextChangedDelayed event. - - - - - Language for highlighting by built-in highlighter. - - - - - Syntax Highlighter - - - - - XML file with description of syntax highlighting. - This property works only with Language == Language.Custom. - - - - - Position of left highlighted bracket. - - - - - Position of right highlighted bracket. - - - - - Position of left highlighted alternative bracket. - - - - - Position of right highlighted alternative bracket. - - - - - Start line index of current highlighted folding area. Return -1 if start of area is not found. - - - - - End line index of current highlighted folding area. Return -1 if end of area is not found. - - - - - TextSource - - - - - The source of the text. - Allows to get text from other FastColoredTextBox. - - - - - Returns current visible range of text - - - - - Current selection range - - - - - Background color. - It is used if BackBrush is null. - - - - - Background brush. - If Null then BackColor is used. - - - - - Multiline - - - - - WordWrap. - - - - - WordWrap mode. - - - - - If true then line breaks included into the selection will be selected too. - Then line breaks will be shown as selected blank character. - - - - - Do not change this property - - - - - Count of lines - - - - - Gets or sets char and styleId for given place - This property does not fire OnTextChanged event - - - - - Gets Line - - - - - Text of control - - - - - Text lines - - - - - Gets colored text as HTML - - For more flexibility you can use ExportToHTML class also - - - - Gets colored text as RTF - - For more flexibility you can use ExportToRTF class also - - - - Text of current selection - - - - - Start position of selection - - - - - Length of selected text - - - - - Font - - Use only monospaced font - - - - Font - - Use only monospaced font - - - - Indicates that IME is allowed (for CJK language entering) - - - - - Is undo enabled? - - - - - Is redo enabled? - - - - - Range of all text - - - - - Color of selected area - - - - - Reserved space for line number characters. - If smaller than needed (e. g. line count >= 10 and this value set to 1) this value will have no impact. - If you want to reserve space, e. g. for line numbers >= 10 or >= 100 than you can set this value to 2 or 3 or higher. - - - - - Occurs when mouse is moving over text and tooltip is needed - - - - - Removes all hints - - - - - Add and shows the hint - - Linked range - Inner control - Scrolls textbox to the hint - Inlining. If True then hint will moves apart text - Docking. If True then hint will fill whole line - - - - Add and shows the hint - - Linked range - Inner control - - - - Add and shows simple text hint - - Linked range - Text of simple hint - Scrolls textbox to the hint - Inlining. If True then hint will moves apart text - Docking. If True then hint will fill whole line - - - - Add and shows simple text hint - - Linked range - Text of simple hint - - - - Occurs when user click on the hint - - - - - - Occurs when VisibleRange is changed - - - - - Invalidates the entire surface of the control and causes the control to be redrawn. - This method is thread safe and does not require Invoke. - - - - - HintClick event. - It occurs if user click on the hint. - - - - - TextChanged event. - It occurs after insert, delete, clear, undo and redo operations. - - - - - Fake event for correct data binding - - - - - Occurs when user paste text from clipboard - - - - - TextChanging event. - It occurs before insert, delete, clear, undo and redo operations. - - - - - SelectionChanged event. - It occurs after changing of selection. - - - - - VisibleRangeChanged event. - It occurs after changing of visible range. - - - - - TextChangedDelayed event. - It occurs after insert, delete, clear, undo and redo operations. - This event occurs with a delay relative to TextChanged, and fires only once. - - - - - SelectionChangedDelayed event. - It occurs after changing of selection. - This event occurs with a delay relative to SelectionChanged, and fires only once. - - - - - VisibleRangeChangedDelayed event. - It occurs after changing of visible range. - This event occurs with a delay relative to VisibleRangeChanged, and fires only once. - - - - - It occurs when user click on VisualMarker. - - - - - It occurs when visible char is enetering (alphabetic, digit, punctuation, DEL, BACKSPACE) - - Set Handle to True for cancel key - - - - It occurs when visible char is enetered (alphabetic, digit, punctuation, DEL, BACKSPACE) - - - - - It occurs when calculates AutoIndent for new line - - - - - It occurs when line background is painting - - - - - Occurs when line was inserted/added - - - - - Occurs when line was removed - - - - - Occurs when current highlighted folding area is changed. - Current folding area see in StartFoldingLine and EndFoldingLine. - - - - - - Occurs when undo/redo stack is changed - - - - - - Occurs when component was zoomed - - - - - Occurs when user pressed key, that specified as CustomAction - - - - - Occurs when scroolbars are updated - - - - - Occurs when custom wordwrap is needed - - - - - Returns list of styles of given place - - - - - Call this method if the recalc of the position of lines is needed. - - - - - Call this method if the recalc of the position of lines is needed. - - - - - Call this method if the recalc of the position of lines is needed. - - - - - Navigates forward (by Line.LastVisit property) - - - - - Navigates backward (by Line.LastVisit property) - - - - - Navigates to defined line, without Line.LastVisit reseting - - - - - Add new style - - Layer index of this style - - - - Checks if the styles buffer has enough space to add one - more element. If not, an exception is thrown. Otherwise, - the index of a free slot is returned. - - Index of free styles buffer slot - If maximum count of styles is exceeded - - - - Shows find dialog - - - - - Shows find dialog - - - - - Shows replace dialog - - - - - Shows replace dialog - - - - - Gets length of given line - - Line index - Length of line - - - - Get range of line - - Line index - - - - Copy selected text into Clipboard - - - - - Cut selected text into Clipboard - - - - - Paste text from clipboard into selected position - - - - - Select all chars of text - - - - - Move caret to end of text - - - - - Move caret to first position - - - - - Clear text, styles, history, caches - - - - - Clear buffer of styles - - - - - Clear style of all text - - - - - Clears undo and redo stacks - - - - - Insert text into current selected position - - - - - Insert text into current selected position - - - - - - Insert text into current selection position (with predefined style) - - - - - - Insert text into current selection position (with predefined style) - - - - - Insert text into replaceRange and restore previous selection - - - - - Append string to end of the Text - - - - - Append string to end of the Text - - - - - Returns index of the style in Styles - -1 otherwise - - - Index of the style in Styles - - - - Returns StyleIndex mask of given styles - - - StyleIndex mask of given styles - - - - Deletes selected chars - - - - - Deletes current line(s) - - - - - Calculates wordwrap cutoffs - - - - - Scroll control for display defined rectangle - - - - - - Updates scrollbar position after Value changed - - - - - Scroll control for display caret - - - - - Scroll control left - - - - - Scroll control for display selection area - - - - - Scroll control for display given range - - - - - Scroll control for display given range - - - - - Process control keys - - - - - Scrolls to nearest bookmark or to first bookmark - - Current bookmark line index - - - - Scrolls to nearest previous bookmark or to last bookmark - - Current bookmark line index - - - - Bookmarks line - - - - - Unbookmarks current line - - - - - Moves selected lines down - - - - - Moves selected lines up - - - - - Convert selected text to upper case - - - - - Convert selected text to lower case - - - - - Convert selected text to title case - - - - - Convert selected text to sentence case - - - - - Insert/remove comment prefix into selected lines - - - - - Insert/remove comment prefix into selected lines - - - - - Process "real" keys (no control) - - - - - Enables AutoIndentChars mode - - - - - Regex patterns for AutoIndentChars (one regex per line) - - - - - Do AutoIndentChars - - - - - Finds given char after current caret position, moves the caret to found pos. - - - - - - Inserts autoindent's spaces in the line - - - - - Returns needed start space count for the line - - - - - Undo last operation - - - - - Redo - - - - - Draws text to given Graphics - - - Start place of drawing text - Size of drawing - - - - Draw control - - - - - Gets the value for the system control panel mouse wheel scroll settings. - The value returns the number of lines that shall be scolled if the user turns the mouse wheet one step. - - - This methods gets the "WheelScrollLines" value our from the registry key "HKEY_CURRENT_USER\Control Panel\Desktop". - If the value of this option is 0, the screen will not scroll when the mouse wheel is turned. - If the value of this option is -1 or is greater than the number of lines visible in the window, - the screen will scroll up or down by one page. - - - Number of lines to scrol l when the mouse wheel is turned - - - - - Zooming (in percentages) - - - - - Gets nearest line and char position from coordinates - - Point - Line and char position - - - - Gets nearest absolute text position for given point - - Point - Position - - - - Fires TextChanging event - - - - - Fires TextChanged event - - - - - Fires TextChanged event - - - - - Fires TextChanged event - - - - - Call this method before multiple text changing - - - - - Call this method after multiple text changing - - - - - Fires TextChanged event - - - - - Clears folding state for range of text - - - - - Fires SelectionChanged event - - - - - Gets absolute text position from line and char position - - Line and char position - Point of char - - - - Gets line and char position from absolute text position - - - - - Gets absolute char position from char position - - - - - Gets point for given line and char position - - Line and char position - Coordiantes - - - - Get range of text - - Absolute start position - Absolute finish position - Range - - - - Get range of text - - Line and char position - Line and char position - Range - - - - Finds ranges for given regex pattern - - Regex pattern - Enumeration of ranges - - - - Finds ranges for given regex pattern - - Regex pattern - Enumeration of ranges - - - - Get text of given line - - Line index - Text - - - - Exapnds folded block - - Start line - - - - Collapse folding blocks using FoldedBlocks dictionary. - - - - - Expand collapsed block - - - - - Expand collapsed block - - Any line inside collapsed block - - - - Collapses all folding blocks - - - - - Exapnds all folded blocks - - - - - - Collapses folding block - - Start folding line - - - - Start foilding marker for the line - - - - - End foilding marker for the line - - - - - Collapse text block - - - - - Insert TAB into front of seletcted lines. - - - - - Remove TAB from front of seletcted lines. - - - - - Remove TAB in front of the caret ot the selected line. - - - - - Insert autoindents into selected lines - - - - - Insert prefix into front of seletcted lines - - - - - Remove prefix from front of selected lines - This method ignores forward spaces of the line - - - - - Begins AutoUndo block. - All changes of text between BeginAutoUndo() and EndAutoUndo() will be canceled in one operation Undo. - - - - - Ends AutoUndo block. - All changes of text between BeginAutoUndo() and EndAutoUndo() will be canceled in one operation Undo. - - - - - Highlights brackets around caret - - - - - Returns range between brackets (or null if not found) - - - - - Selectes next fragment for given regex. - - - - - Prints range of text - - - - - Prints all text - - - - - Prints all text, without any dialog windows - - - - - Open text file - - - - - Open text file (with automatic encoding detector) - - - - - Open file binding mode - - - - - - - Close file binding mode - - - - - Save text to the file - - - - - - - Set VisibleState of line - - - - - Returns VisibleState of the line - - - - - Shows Goto dialog form - - - - - Occurs when undo/redo stack is changed - - - - - Search lines by regex pattern - - - - - Removes given lines - - - - - Activates the scrolling mode (middle click button). - - MouseEventArgs - - - - Deactivates the scrolling mode (middle click button). - - - - - Restore scrolls - - - - - Inserted line index - - - - - Count of inserted lines - - - - - Removed line index - - - - - Count of removed lines - - - - - UniqueIds of removed lines - - - - - TextChanged event argument - - - - - Constructor - - - - - This range contains changed area of text - - - - - Set to true if you want to cancel text inserting - - - - - Word wrapping by control width - - - - - Word wrapping by preferred line width (PreferredLineWidth) - - - - - Char wrapping by control width - - - - - Char wrapping by preferred line width (PreferredLineWidth) - - - - - Custom wrap (by event WordWrapNeeded) - - - - - Title of page. If you want to print Title on the page, insert code &w in Footer or Header. - - - - - Footer of page. - Here you can use special codes: &w (Window title), &D, &d (Date), &t(), &4 (Time), &p (Current page number), &P (Total number of pages), && (A single ampersand), &b (Right justify text, Center text. If &b occurs once, then anything after the &b is right justified. If &b occurs twice, then anything between the two &b is centered, and anything after the second &b is right justified). - More detailed see here - - - - - Header of page - Here you can use special codes: &w (Window title), &D, &d (Date), &t(), &4 (Time), &p (Current page number), &P (Total number of pages), && (A single ampersand), &b (Right justify text, Center text. If &b occurs once, then anything after the &b is right justified. If &b occurs twice, then anything between the two &b is centered, and anything after the second &b is right justified). - More detailed see here - - - - - Prints line numbers - - - - - Additional spaces count for this line, relative to previous line - - - - - Additional spaces count for next line, relative to previous line - - - - - Absolute indentation of current line. You can change this property if you want to set absolute indentation. - - - - - Type of highlighting - - - - - Highlight only changed range of text. Highest performance. - - - - - Highlight visible range of text. Middle performance. - - - - - Highlight all (visible and invisible) text. Lowest performance. - - - - - Strategy of search of end of folding block - - - - - Strategy of search of brackets to highlighting - - - - - ToolTipNeeded event args - - - - - HintClick event args - - - - - CustomAction event args - - - - - Style index mask (16 styles) - - - - - Insert single char - - This operation includes also insertion of new line and removing char by backspace - - - - Constructor - - Underlaying textbox - Inserting char - - - - Undo operation - - - - - Execute operation - - - - - Merge lines i and i+1 - - - - - Insert text - - - - - Constructor - - Underlaying textbox - Text for inserting - - - - Undo operation - - - - - Execute operation - - - - - Insert text into given ranges - - - - - Constructor - - Underlaying textbox - List of ranges for replace - Text for inserting - - - - Undo operation - - - - - Execute operation - - - - - Clear selected text - - - - - Construstor - - Underlaying textbox - - - - Undo operation - - - - - Execute operation - - - - - Replaces text - - - - - Constructor - - Underlaying textsource - List of ranges for replace - - - - Undo operation - - - - - Execute operation - - - - - Removes lines - - - - - Constructor - - Underlaying textbox - List of ranges for replace - Text for inserting - - - - Undo operation - - - - - Execute operation - - - - - Wrapper for multirange commands - - - - - Remembers current selection and restore it after Undo - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Limited stack - - - - - Max stack length - - - - - Current length of stack - - - - - Constructor - - Maximum length of stack - - - - Pop item - - - - - Peek item - - - - - Push item - - - - - Clear stack - - - - - Line of text - - - - - Text of line was changed - - - - - Time of last visit of caret in this line - - This property can be used for forward/backward navigating - - - - Background brush. - - - - - Unique ID - - - - - Count of needed start spaces for AutoIndent - - - - - Clears style of chars, delete folding markers - - - - - Text of the line - - - - - Clears folding markers - - - - - Count of start spaces - - - - - Chars count - - - - - Visible state - - - - - Positions for wordwrap cutoffs - - - - - Count of wordwrap string count for this line - - - - - Gets index of wordwrap string for given char position - - - - - Line index and char index - - - - - Diapason of text chars - - - - - Constructor - - - - - Return true if no selected text - - - - - Column selection mode - - - - - Constructor - - - - - Constructor - - - - - Constructor. Creates range of the line - - - - - Returns intersection with other range, - empty range returned otherwise - - - - - - - Returns union with other range. - - - - - - - Select all chars of control - - - - - Start line and char position - - - - - Finish line and char position - - - - - Text of range - - This property has not 'set' accessor because undo/redo stack works only with - FastColoredTextBox.Selection range. So, if you want to set text, you need to use FastColoredTextBox.Selection - and FastColoredTextBox.InsertText() mehtod. - - - - - Returns first char after Start place - - - - - Returns first char before Start place - - - - - Returns required char's number before start of the Range - - - - - Returns required char's number after start of the Range - - - - - Clone range - - - - - - Return minimum of end.X and start.X - - - - - Return maximum of end.X and start.X - - - - - Move range right - - This method jump over folded blocks - - - - Move range left - - This method can to go inside folded blocks - - - - Move range left - - This method jump over folded blocks - - - - Move range left - - This method can to go inside folded blocks - - - - Set style for range - - - - - Set style for given regex pattern - - - - - Set style for given regex - - - - - Set style for given regex pattern - - - - - Set style for given regex pattern - - - - - Set style for given regex pattern - - - - - Appends style to chars of range - - - - - Sets folding markers - - Pattern for start folding line - Pattern for finish folding line - - - - Sets folding markers - - Pattern for start folding line - Pattern for finish folding line - - - - Sets folding markers - - Pattern for start and end folding line - - - - Finds ranges for given regex pattern - - Regex pattern - Enumeration of ranges - - - - Finds ranges for given regex pattern - - Regex pattern - Enumeration of ranges - - - - Finds ranges for given regex pattern. - Search is separately in each line. - This method requires less memory than GetRanges(). - - Regex pattern - Enumeration of ranges - - - - Finds ranges for given regex. - Search is separately in each line. - This method requires less memory than GetRanges(). - - Regex - Enumeration of ranges - - - - Finds ranges for given regex pattern. - Search is separately in each line (order of lines is reversed). - This method requires less memory than GetRanges(). - - Regex pattern - Enumeration of ranges - - - - Finds ranges for given regex - - Enumeration of ranges - - - - Clear styles of range - - - - - Clear styles of range - - - - - Clear folding markers of all lines of range - - - - - Starts selection position updating - - - - - Ends selection position updating - - - - - Exchanges Start and End if End appears before Start - - - - - Exchanges Start and End - - - - - Expands range from first char of Start line to last char of End line - - - - - Chars of range (exclude \n) - - - - - Get fragment of text around Start place. Returns maximal matched to pattern fragment. - - Allowed chars pattern for fragment - Range of found fragment - - - - Get fragment of text around Start place. Returns maximal matched to given Style. - - Allowed style for fragment - Range of found fragment - - - - Get fragment of text around Start place. Returns maximal mathed to pattern fragment. - - Allowed chars pattern for fragment - Range of found fragment - - - - Range is readonly? - This property return True if any char of the range contains ReadOnlyStyle. - Set this property to True/False to mark chars of the range as Readonly/Writable. - - - - - Is char before range readonly - - - - - - Is char after range readonly - - - - - - Style of chars - - This is base class for all text and design renderers - - - - This style is exported to outer formats (HTML for example) - - - - - Occurs when user click on StyleVisualMarker joined to this style - - - - - Constructor - - - - - Renders given range of text - - Graphics object - Position of the range in absolute control coordinates - Rendering range of text - - - - Occurs when user click on StyleVisualMarker joined to this style - - - - - Shows VisualMarker - Call this method in Draw method, when you need to show VisualMarker for your style - - - - - Returns CSS for export to HTML - - - - - - Returns RTF descriptor for export to RTF - - - - - - Style for chars rendering - This renderer can draws chars, with defined fore and back colors - - - - - Renderer for folded block - - - - - Renderer for selected area - - - - - Marker style - Draws background color for text - - - - - Draws small rectangle for popup menu - - - - - This style draws a wavy line below a given text range. - - Thanks for Yallie - - - - This style is used to mark range of text as ReadOnly block - - You can inherite this style to add visual effects of readonly text - - - - This class contains the source text (chars and styles). - It stores a text lines, the manager of commands, undo/redo stack, styles. - - - - - Styles - - - - - Occurs when line was inserted/added - - - - - Occurs when line was removed - - - - - Occurs when text was changed - - - - - Occurs when recalc is needed - - - - - Occurs when recalc wordwrap is needed - - - - - Occurs before text changing - - - - - Occurs after CurrentTB was changed - - - - - Current focused FastColoredTextBox - - - - - Default text style - This style is using when no one other TextStyle is not defined in Char.style - - - - - Text lines - - - - - Lines count - - - - - These classes are required for correct data binding to Text property of FastColoredTextbox - - - - - This class contains the source text (chars and styles). - It stores a text lines, the manager of commands, undo/redo stack, styles. - - - - - Occurs when need to display line in the textbox - - - - - Occurs when need to save line in the file - - - - - End Of Line characters used for saving - - - - - This text will be displayed in textbox - - - - - This property contains only changed text. - If text of line is not changed, this property contains null. - - - - - This text will be saved in the file - - - - diff --git a/Assets/TEngine/Config~/Tools/excel2json/ICSharpCode.SharpZipLib.dll b/Assets/TEngine/Config~/Tools/excel2json/ICSharpCode.SharpZipLib.dll deleted file mode 100644 index 76ddc96a..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/ICSharpCode.SharpZipLib.dll and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/ICSharpCode.SharpZipLib.xml b/Assets/TEngine/Config~/Tools/excel2json/ICSharpCode.SharpZipLib.xml deleted file mode 100644 index 780aecfc..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/ICSharpCode.SharpZipLib.xml +++ /dev/null @@ -1,10331 +0,0 @@ - - - - ICSharpCode.SharpZipLib - - - - - An example class to demonstrate compression and decompression of BZip2 streams. - - - - - Decompress the input writing - uncompressed data to the output stream - - The readable stream containing data to decompress. - The output stream to receive the decompressed data. - Both streams are closed on completion if true. - - - - Compress the input stream sending - result data to output stream - - The readable stream to compress. - The output stream to receive the compressed data. - Both streams are closed on completion if true. - Block size acts as compression level (1 to 9) with 1 giving - the lowest compression and 9 the highest. - - - - Defines internal values for both compression and decompression - - - - - Random numbers used to randomise repetitive blocks - - - - - When multiplied by compression parameter (1-9) gives the block size for compression - 9 gives the best compression but uses the most memory. - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - Backend constant - - - - - BZip2Exception represents exceptions specific to BZip2 classes and code. - - - - - Initialise a new instance of . - - - - - Initialise a new instance of with its message string. - - A that describes the error. - - - - Initialise a new instance of . - - A that describes the error. - The that caused this exception. - - - - Initializes a new instance of the BZip2Exception class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - An input stream that decompresses files in the BZip2 format - - - - - Construct instance for reading from stream - - Data source - - - - Get/set flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - - - - Gets a value indicating if the stream supports reading - - - - - Gets a value indicating whether the current stream supports seeking. - - - - - Gets a value indicating whether the current stream supports writing. - This property always returns false - - - - - Gets the length in bytes of the stream. - - - - - Gets the current position of the stream. - Setting the position is not supported and will throw a NotSupportException. - - Any attempt to set the position. - - - - Flushes the stream. - - - - - Set the streams position. This operation is not supported and will throw a NotSupportedException - - A byte offset relative to the parameter. - A value of type indicating the reference point used to obtain the new position. - The new position of the stream. - Any access - - - - Sets the length of this stream to the given value. - This operation is not supported and will throw a NotSupportedExceptionortedException - - The new length for the stream. - Any access - - - - Writes a block of bytes to this stream using data from a buffer. - This operation is not supported and will throw a NotSupportedException - - The buffer to source data from. - The offset to start obtaining data from. - The number of bytes of data to write. - Any access - - - - Writes a byte to the current position in the file stream. - This operation is not supported and will throw a NotSupportedException - - The value to write. - Any access - - - - Read a sequence of bytes and advances the read position by one byte. - - Array of bytes to store values in - Offset in array to begin storing data - The maximum number of bytes to read - The total number of bytes read into the buffer. This might be less - than the number of bytes requested if that number of bytes are not - currently available or zero if the end of the stream is reached. - - - - - Closes the stream, releasing any associated resources. - - - - - Read a byte from stream advancing position - - byte read or -1 on end of stream - - - - An output stream that compresses into the BZip2 format - including file header chars into another stream. - - - - - Construct a default output stream with maximum block size - - The stream to write BZip data onto. - - - - Initialise a new instance of the - for the specified stream, using the given blocksize. - - The stream to write compressed data to. - The block size to use. - - Valid block sizes are in the range 1..9, with 1 giving - the lowest compression and 9 the highest. - - - - - Ensures that resources are freed and other cleanup operations - are performed when the garbage collector reclaims the BZip2OutputStream. - - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - Gets a value indicating whether the current stream supports reading - - - - - Gets a value indicating whether the current stream supports seeking - - - - - Gets a value indicating whether the current stream supports writing - - - - - Gets the length in bytes of the stream - - - - - Gets or sets the current position of this stream. - - - - - Sets the current position of this stream to the given value. - - The point relative to the offset from which to being seeking. - The reference point from which to begin seeking. - The new position in the stream. - - - - Sets the length of this stream to the given value. - - The new stream length. - - - - Read a byte from the stream advancing the position. - - The byte read cast to an int; -1 if end of stream. - - - - Read a block of bytes - - The buffer to read into. - The offset in the buffer to start storing data at. - The maximum number of bytes to read. - The total number of bytes read. This might be less than the number of bytes - requested if that number of bytes are not currently available, or zero - if the end of the stream is reached. - - - - Write a block of bytes to the stream - - The buffer containing data to write. - The offset of the first byte to write. - The number of bytes to write. - - - - Write a byte to the stream. - - The byte to write to the stream. - - - - Get the number of bytes written to output. - - - - - Get the number of bytes written to the output. - - - - - Releases the unmanaged resources used by the and optionally releases the managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Flush output buffers - - - - - Computes Adler32 checksum for a stream of data. An Adler32 - checksum is not as reliable as a CRC32 checksum, but a lot faster to - compute. - - The specification for Adler32 may be found in RFC 1950. - ZLIB Compressed Data Format Specification version 3.3) - - - From that document: - - "ADLER32 (Adler-32 checksum) - This contains a checksum value of the uncompressed data - (excluding any dictionary data) computed according to Adler-32 - algorithm. This algorithm is a 32-bit extension and improvement - of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 - standard. - - Adler-32 is composed of two sums accumulated per byte: s1 is - the sum of all bytes, s2 is the sum of all s1 values. Both sums - are done modulo 65521. s1 is initialized to 1, s2 to zero. The - Adler-32 checksum is stored as s2*65536 + s1 in most- - significant-byte first (network) order." - - "8.2. The Adler-32 algorithm - - The Adler-32 algorithm is much faster than the CRC32 algorithm yet - still provides an extremely low probability of undetected errors. - - The modulo on unsigned long accumulators can be delayed for 5552 - bytes, so the modulo operation time is negligible. If the bytes - are a, b, c, the second sum is 3a + 2b + c + 3, and so is position - and order sensitive, unlike the first sum, which is just a - checksum. That 65521 is prime is important to avoid a possible - large class of two-byte errors that leave the check unchanged. - (The Fletcher checksum uses 255, which is not prime and which also - makes the Fletcher check insensitive to single byte changes 0 - - 255.) - - The sum s1 is initialized to 1 instead of zero to make the length - of the sequence part of s2, so that the length does not have to be - checked separately. (Any sequence of zeroes has a Fletcher - checksum of zero.)" - - - - - - - largest prime smaller than 65536 - - - - - The CRC data checksum so far. - - - - - Initialise a default instance of - - - - - Resets the Adler32 data checksum as if no update was ever called. - - - - - Returns the Adler32 data checksum computed so far. - - - - - Updates the checksum with the byte b. - - - The data value to add. The high byte of the int is ignored. - - - - - Updates the Adler32 data checksum with the bytes taken from - a block of data. - - Contains the data to update the checksum with. - - - - Update Adler32 data checksum based on a portion of a block of data - - - The chunk of data to add - - - - - CRC-32 with unreversed data and reversed output - - - Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: - x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0. - - Polynomials over GF(2) are represented in binary, one bit per coefficient, - with the lowest powers in the most significant bit. Then adding polynomials - is just exclusive-or, and multiplying a polynomial by x is a right shift by - one. If we call the above polynomial p, and represent a byte as the - polynomial q, also with the lowest power in the most significant bit (so the - byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, - where a mod b means the remainder after dividing a by b. - - This calculation is done using the shift-register method of multiplying and - taking the remainder. The register is initialized to zero, and for each - incoming bit, x^32 is added mod p to the register if the bit is a one (where - x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by - x (which is shifting right by one and adding x^32 mod p if the bit shifted - out is a one). We start with the highest power (least significant bit) of - q and repeat for all eight bits of q. - - The table is simply the CRC of all possible eight bit values. This is all - the information needed to generate CRC's on data a byte at a time for all - combinations of CRC register values and incoming bytes. - - - - - The CRC data checksum so far. - - - - - Initialise a default instance of - - - - - Resets the CRC data checksum as if no update was ever called. - - - - - Returns the CRC data checksum computed so far. - - Reversed Out = true - - - - Updates the checksum with the int bval. - - - the byte is taken as the lower 8 bits of bval - - Reversed Data = false - - - - Updates the CRC data checksum with the bytes taken from - a block of data. - - Contains the data to update the CRC with. - - - - Update CRC data checksum based on a portion of a block of data - - - The chunk of data to add - - - - - CRC-32 with reversed data and unreversed output - - - Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: - x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0. - - Polynomials over GF(2) are represented in binary, one bit per coefficient, - with the lowest powers in the most significant bit. Then adding polynomials - is just exclusive-or, and multiplying a polynomial by x is a right shift by - one. If we call the above polynomial p, and represent a byte as the - polynomial q, also with the lowest power in the most significant bit (so the - byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, - where a mod b means the remainder after dividing a by b. - - This calculation is done using the shift-register method of multiplying and - taking the remainder. The register is initialized to zero, and for each - incoming bit, x^32 is added mod p to the register if the bit is a one (where - x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by - x (which is shifting right by one and adding x^32 mod p if the bit shifted - out is a one). We start with the highest power (least significant bit) of - q and repeat for all eight bits of q. - - The table is simply the CRC of all possible eight bit values. This is all - the information needed to generate CRC's on data a byte at a time for all - combinations of CRC register values and incoming bytes. - - - - - The CRC data checksum so far. - - - - - Initialise a default instance of - - - - - Resets the CRC data checksum as if no update was ever called. - - - - - Returns the CRC data checksum computed so far. - - Reversed Out = false - - - - Updates the checksum with the int bval. - - - the byte is taken as the lower 8 bits of bval - - Reversed Data = true - - - - Updates the CRC data checksum with the bytes taken from - a block of data. - - Contains the data to update the CRC with. - - - - Update CRC data checksum based on a portion of a block of data - - - The chunk of data to add - - - - - Interface to compute a data checksum used by checked input/output streams. - A data checksum can be updated by one byte or with a byte array. After each - update the value of the current checksum can be returned by calling - getValue. The complete checksum object can also be reset - so it can be used again with new data. - - - - - Resets the data checksum as if no update was ever called. - - - - - Returns the data checksum computed so far. - - - - - Adds one byte to the data checksum. - - - the data value to add. The high byte of the int is ignored. - - - - - Updates the data checksum with the bytes taken from the array. - - - buffer an array of bytes - - - - - Adds the byte array to the data checksum. - - - The chunk of data to add - - - - - SharpZipBaseException is the base exception class for SharpZipLib. - All library exceptions are derived from this. - - NOTE: Not all exceptions thrown will be derived from this class. - A variety of other exceptions are possible for example - - - - Initializes a new instance of the SharpZipBaseException class. - - - - - Initializes a new instance of the SharpZipBaseException class with a specified error message. - - A message describing the exception. - - - - Initializes a new instance of the SharpZipBaseException class with a specified - error message and a reference to the inner exception that is the cause of this exception. - - A message describing the exception. - The inner exception - - - - Initializes a new instance of the SharpZipBaseException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Indicates that an error occured during decoding of a input stream due to corrupt - data or (unintentional) library incompability. - - - - - Initializes a new instance of the StreamDecodingException with a generic message - - - - - Initializes a new instance of the StreamDecodingException class with a specified error message. - - A message describing the exception. - - - - Initializes a new instance of the StreamDecodingException class with a specified - error message and a reference to the inner exception that is the cause of this exception. - - A message describing the exception. - The inner exception - - - - Initializes a new instance of the StreamDecodingException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Indicates that the input stream could not decoded due to known library incompability or missing features - - - - - Initializes a new instance of the StreamUnsupportedException with a generic message - - - - - Initializes a new instance of the StreamUnsupportedException class with a specified error message. - - A message describing the exception. - - - - Initializes a new instance of the StreamUnsupportedException class with a specified - error message and a reference to the inner exception that is the cause of this exception. - - A message describing the exception. - The inner exception - - - - Initializes a new instance of the StreamUnsupportedException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Indicates that the input stream could not decoded due to the stream ending before enough data had been provided - - - - - Initializes a new instance of the UnexpectedEndOfStreamException with a generic message - - - - - Initializes a new instance of the UnexpectedEndOfStreamException class with a specified error message. - - A message describing the exception. - - - - Initializes a new instance of the UnexpectedEndOfStreamException class with a specified - error message and a reference to the inner exception that is the cause of this exception. - - A message describing the exception. - The inner exception - - - - Initializes a new instance of the UnexpectedEndOfStreamException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Indicates that a value was outside of the expected range when decoding an input stream - - - - - Initializes a new instance of the ValueOutOfRangeException class naming the the causing variable - - Name of the variable, use: nameof() - - - - Initializes a new instance of the ValueOutOfRangeException class naming the the causing variable, - it's current value and expected range. - - Name of the variable, use: nameof() - The invalid value - Expected maximum value - Expected minimum value - - - - Initializes a new instance of the ValueOutOfRangeException class naming the the causing variable, - it's current value and expected range. - - Name of the variable, use: nameof() - The invalid value - Expected maximum value - Expected minimum value - - - - Initializes a new instance of the ValueOutOfRangeException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Event arguments for scanning. - - - - - Initialise a new instance of - - The file or directory name. - - - - The file or directory name for this event. - - - - - Get set a value indicating if scanning should continue or not. - - - - - Event arguments during processing of a single file or directory. - - - - - Initialise a new instance of - - The file or directory name if known. - The number of bytes processed so far - The total number of bytes to process, 0 if not known - - - - The name for this event if known. - - - - - Get set a value indicating wether scanning should continue or not. - - - - - Get a percentage representing how much of the has been processed - - 0.0 to 100.0 percent; 0 if target is not known. - - - - The number of bytes processed so far - - - - - The number of bytes to process. - - Target may be 0 or negative if the value isnt known. - - - - Event arguments for directories. - - - - - Initialize an instance of . - - The name for this directory. - Flag value indicating if any matching files are contained in this directory. - - - - Get a value indicating if the directory contains any matching files or not. - - - - - Arguments passed when scan failures are detected. - - - - - Initialise a new instance of - - The name to apply. - The exception to use. - - - - The applicable name. - - - - - The applicable exception. - - - - - Get / set a value indicating wether scanning should continue. - - - - - Delegate invoked before starting to process a file. - - The source of the event - The event arguments. - - - - Delegate invoked during processing of a file or directory - - The source of the event - The event arguments. - - - - Delegate invoked when a file has been completely processed. - - The source of the event - The event arguments. - - - - Delegate invoked when a directory failure is detected. - - The source of the event - The event arguments. - - - - Delegate invoked when a file failure is detected. - - The source of the event - The event arguments. - - - - FileSystemScanner provides facilities scanning of files and directories. - - - - - Initialise a new instance of - - The file filter to apply when scanning. - - - - Initialise a new instance of - - The file filter to apply. - The directory filter to apply. - - - - Initialise a new instance of - - The file filter to apply. - - - - Initialise a new instance of - - The file filter to apply. - The directory filter to apply. - - - - Delegate to invoke when a directory is processed. - - - - - Delegate to invoke when a file is processed. - - - - - Delegate to invoke when processing for a file has finished. - - - - - Delegate to invoke when a directory failure is detected. - - - - - Delegate to invoke when a file failure is detected. - - - - - Raise the DirectoryFailure event. - - The directory name. - The exception detected. - - - - Raise the FileFailure event. - - The file name. - The exception detected. - - - - Raise the ProcessFile event. - - The file name. - - - - Raise the complete file event - - The file name - - - - Raise the ProcessDirectory event. - - The directory name. - Flag indicating if the directory has matching files. - - - - Scan a directory. - - The base directory to scan. - True to recurse subdirectories, false to scan a single directory. - - - - The file filter currently in use. - - - - - The directory filter currently in use. - - - - - Flag indicating if scanning should continue running. - - - - - INameTransform defines how file system names are transformed for use with archives, or vice versa. - - - - - Given a file name determine the transformed value. - - The name to transform. - The transformed file name. - - - - Given a directory name determine the transformed value. - - The name to transform. - The transformed directory name - - - - InvalidNameException is thrown for invalid names such as directory traversal paths and names with invalid characters - - - - - Initializes a new instance of the InvalidNameException class with a default error message. - - - - - Initializes a new instance of the InvalidNameException class with a specified error message. - - A message describing the exception. - - - - Initializes a new instance of the InvalidNameException class with a specified - error message and a reference to the inner exception that is the cause of this exception. - - A message describing the exception. - The inner exception - - - - Initializes a new instance of the InvalidNameException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Scanning filters support filtering of names. - - - - - Test a name to see if it 'matches' the filter. - - The name to test. - Returns true if the name matches the filter, false if it does not match. - - - - NameFilter is a string matching class which allows for both positive and negative - matching. - A filter is a sequence of independant regular expressions separated by semi-colons ';'. - To include a semi-colon it may be quoted as in \;. Each expression can be prefixed by a plus '+' sign or - a minus '-' sign to denote the expression is intended to include or exclude names. - If neither a plus or minus sign is found include is the default. - A given name is tested for inclusion before checking exclusions. Only names matching an include spec - and not matching an exclude spec are deemed to match the filter. - An empty filter matches any name. - - The following expression includes all name ending in '.dat' with the exception of 'dummy.dat' - "+\.dat$;-^dummy\.dat$" - - - - - Construct an instance based on the filter expression passed - - The filter expression. - - - - Test a string to see if it is a valid regular expression. - - The expression to test. - True if expression is a valid false otherwise. - - - - Test an expression to see if it is valid as a filter. - - The filter expression to test. - True if the expression is valid, false otherwise. - - - - Split a string into its component pieces - - The original string - Returns an array of values containing the individual filter elements. - - - - Convert this filter to its string equivalent. - - The string equivalent for this filter. - - - - Test a value to see if it is included by the filter. - - The value to test. - True if the value is included, false otherwise. - - - - Test a value to see if it is excluded by the filter. - - The value to test. - True if the value is excluded, false otherwise. - - - - Test a value to see if it matches the filter. - - The value to test. - True if the value matches, false otherwise. - - - - Compile this filter. - - - - - PathFilter filters directories and files using a form of regular expressions - by full path name. - See NameFilter for more detail on filtering. - - - - - Initialise a new instance of . - - The filter expression to apply. - - - - Test a name to see if it matches the filter. - - The name to test. - True if the name matches, false otherwise. - is used to get the full path before matching. - - - - ExtendedPathFilter filters based on name, file size, and the last write time of the file. - - Provides an example of how to customise filtering. - - - - Initialise a new instance of ExtendedPathFilter. - - The filter to apply. - The minimum file size to include. - The maximum file size to include. - - - - Initialise a new instance of ExtendedPathFilter. - - The filter to apply. - The minimum to include. - The maximum to include. - - - - Initialise a new instance of ExtendedPathFilter. - - The filter to apply. - The minimum file size to include. - The maximum file size to include. - The minimum to include. - The maximum to include. - - - - Test a filename to see if it matches the filter. - - The filename to test. - True if the filter matches, false otherwise. - The doesnt exist - - - - Get/set the minimum size/length for a file that will match this filter. - - The default value is zero. - value is less than zero; greater than - - - - Get/set the maximum size/length for a file that will match this filter. - - The default value is - value is less than zero or less than - - - - Get/set the minimum value that will match for this filter. - - Files with a LastWrite time less than this value are excluded by the filter. - - - - Get/set the maximum value that will match for this filter. - - Files with a LastWrite time greater than this value are excluded by the filter. - - - - NameAndSizeFilter filters based on name and file size. - - A sample showing how filters might be extended. - - - - Initialise a new instance of NameAndSizeFilter. - - The filter to apply. - The minimum file size to include. - The maximum file size to include. - - - - Test a filename to see if it matches the filter. - - The filename to test. - True if the filter matches, false otherwise. - - - - Get/set the minimum size for a file that will match this filter. - - - - - Get/set the maximum size for a file that will match this filter. - - - - - Provides simple " utilities. - - - - - Read from a ensuring all the required data is read. - - The stream to read. - The buffer to fill. - - - - - Read from a " ensuring all the required data is read. - - The stream to read data from. - The buffer to store data in. - The offset at which to begin storing data. - The number of bytes of data to store. - Required parameter is null - and or are invalid. - End of stream is encountered before all the data has been read. - - - - Read as much data as possible from a ", up to the requested number of bytes - - The stream to read data from. - The buffer to store data in. - The offset at which to begin storing data. - The number of bytes of data to store. - Required parameter is null - and or are invalid. - - - - Copy the contents of one to another. - - The stream to source data from. - The stream to write data to. - The buffer to use during copying. - - - - Copy the contents of one to another. - - The stream to source data from. - The stream to write data to. - The buffer to use during copying. - The progress handler delegate to use. - The minimum between progress updates. - The source for this event. - The name to use with the event. - This form is specialised for use within #Zip to support events during archive operations. - - - - Copy the contents of one to another. - - The stream to source data from. - The stream to write data to. - The buffer to use during copying. - The progress handler delegate to use. - The minimum between progress updates. - The source for this event. - The name to use with the event. - A predetermined fixed target value to use with progress updates. - If the value is negative the target is calculated by looking at the stream. - This form is specialised for use within #Zip to support events during archive operations. - - - - Initialise an instance of - - - - - WindowsPathUtils provides simple utilities for handling windows paths. - - - - - Initializes a new instance of the class. - - - - - Remove any path root present in the path - - A containing path information. - The path with the root removed if it was present; path otherwise. - Unlike the class the path isnt otherwise checked for validity. - - - - PkzipClassic embodies the classic or original encryption facilities used in Pkzip archives. - While it has been superceded by more recent and more powerful algorithms, its still in use and - is viable for preventing casual snooping - - - - - Generates new encryption keys based on given seed - - The seed value to initialise keys with. - A new key value. - - - - PkzipClassicCryptoBase provides the low level facilities for encryption - and decryption using the PkzipClassic algorithm. - - - - - Transform a single byte - - - The transformed value - - - - - Set the key schedule for encryption/decryption. - - The data use to set the keys from. - - - - Update encryption keys - - - - - Reset the internal state. - - - - - PkzipClassic CryptoTransform for encryption. - - - - - Initialise a new instance of - - The key block to use. - - - - Transforms the specified region of the specified byte array. - - The input for which to compute the transform. - The offset into the byte array from which to begin using data. - The number of bytes in the byte array to use as data. - The computed transform. - - - - Transforms the specified region of the input byte array and copies - the resulting transform to the specified region of the output byte array. - - The input for which to compute the transform. - The offset into the input byte array from which to begin using data. - The number of bytes in the input byte array to use as data. - The output to which to write the transform. - The offset into the output byte array from which to begin writing data. - The number of bytes written. - - - - Gets a value indicating whether the current transform can be reused. - - - - - Gets the size of the input data blocks in bytes. - - - - - Gets the size of the output data blocks in bytes. - - - - - Gets a value indicating whether multiple blocks can be transformed. - - - - - Cleanup internal state. - - - - - PkzipClassic CryptoTransform for decryption. - - - - - Initialise a new instance of . - - The key block to decrypt with. - - - - Transforms the specified region of the specified byte array. - - The input for which to compute the transform. - The offset into the byte array from which to begin using data. - The number of bytes in the byte array to use as data. - The computed transform. - - - - Transforms the specified region of the input byte array and copies - the resulting transform to the specified region of the output byte array. - - The input for which to compute the transform. - The offset into the input byte array from which to begin using data. - The number of bytes in the input byte array to use as data. - The output to which to write the transform. - The offset into the output byte array from which to begin writing data. - The number of bytes written. - - - - Gets a value indicating whether the current transform can be reused. - - - - - Gets the size of the input data blocks in bytes. - - - - - Gets the size of the output data blocks in bytes. - - - - - Gets a value indicating whether multiple blocks can be transformed. - - - - - Cleanup internal state. - - - - - Defines a wrapper object to access the Pkzip algorithm. - This class cannot be inherited. - - - - - Get / set the applicable block size in bits. - - The only valid block size is 8. - - - - Get an array of legal key sizes. - - - - - Generate an initial vector. - - - - - Get an array of legal block sizes. - - - - - Get / set the key value applicable. - - - - - Generate a new random key. - - - - - Create an encryptor. - - The key to use for this encryptor. - Initialisation vector for the new encryptor. - Returns a new PkzipClassic encryptor - - - - Create a decryptor. - - Keys to use for this new decryptor. - Initialisation vector for the new decryptor. - Returns a new decryptor. - - - - Encrypts and decrypts AES ZIP - - - Based on information from http://www.winzip.com/aes_info.htm - and http://www.gladman.me.uk/cryptography_technology/fileencrypt/ - - - - - Constructor - - The stream on which to perform the cryptographic transformation. - Instance of ZipAESTransform - Read or Write - - - - Reads a sequence of bytes from the current CryptoStream into buffer, - and advances the position within the stream by the number of bytes read. - - - - - Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. - - An array of bytes. This method copies count bytes from buffer to the current stream. - The byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - - - - Transforms stream using AES in CTR mode - - - - - Constructor. - - Password string - Random bytes, length depends on encryption strength. - 128 bits = 8 bytes, 192 bits = 12 bytes, 256 bits = 16 bytes. - The encryption strength, in bytes eg 16 for 128 bits. - True when creating a zip, false when reading. For the AuthCode. - - - - - Implement the ICryptoTransform method. - - - - - Returns the 2 byte password verifier - - - - - Returns the 10 byte AUTH CODE to be checked or appended immediately following the AES data stream. - - - - - Not implemented. - - - - - Gets the size of the input data blocks in bytes. - - - - - Gets the size of the output data blocks in bytes. - - - - - Gets a value indicating whether multiple blocks can be transformed. - - - - - Gets a value indicating whether the current transform can be reused. - - - - - Cleanup internal state. - - - - - An example class to demonstrate compression and decompression of GZip streams. - - - - - Decompress the input writing - uncompressed data to the output stream - - The readable stream containing data to decompress. - The output stream to receive the decompressed data. - Both streams are closed on completion if true. - Input or output stream is null - - - - Compress the input stream sending - result data to output stream - - The readable stream to compress. - The output stream to receive the compressed data. - Both streams are closed on completion if true. - Deflate buffer size, minimum 512 - Deflate compression level, 0-9 - Input or output stream is null - Buffer Size is smaller than 512 - Compression level outside 0-9 - - - - This class contains constants used for gzip. - - - - - Magic number found at start of GZIP header - - - - - Flag bit mask for text - - - - - Flag bitmask for Crc - - - - - Flag bit mask for extra - - - - - flag bitmask for name - - - - - flag bit mask indicating comment is present - - - - - Initialise default instance. - - Constructor is private to prevent instances being created. - - - - GZipException represents exceptions specific to GZip classes and code. - - - - - Initialise a new instance of . - - - - - Initialise a new instance of with its message string. - - A that describes the error. - - - - Initialise a new instance of . - - A that describes the error. - The that caused this exception. - - - - Initializes a new instance of the GZipException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - This filter stream is used to decompress a "GZIP" format stream. - The "GZIP" format is described baseInputStream RFC 1952. - - author of the original java version : John Leuner - - This sample shows how to unzip a gzipped file - - using System; - using System.IO; - - using ICSharpCode.SharpZipLib.Core; - using ICSharpCode.SharpZipLib.GZip; - - class MainClass - { - public static void Main(string[] args) - { - using (Stream inStream = new GZipInputStream(File.OpenRead(args[0]))) - using (FileStream outStream = File.Create(Path.GetFileNameWithoutExtension(args[0]))) { - byte[] buffer = new byte[4096]; - StreamUtils.Copy(inStream, outStream, buffer); - } - } - } - - - - - - CRC-32 value for uncompressed data - - - - - Flag to indicate if we've read the GZIP header yet for the current member (block of compressed data). - This is tracked per-block as the file is parsed. - - - - - Flag to indicate if at least one block in a stream with concatenated blocks was read successfully. - This allows us to exit gracefully if downstream data is not in gzip format. - - - - - Creates a GZipInputStream with the default buffer size - - - The stream to read compressed data from (baseInputStream GZIP format) - - - - - Creates a GZIPInputStream with the specified buffer size - - - The stream to read compressed data from (baseInputStream GZIP format) - - - Size of the buffer to use - - - - - Reads uncompressed data into an array of bytes - - - The buffer to read uncompressed data into - - - The offset indicating where the data should be placed - - - The number of uncompressed bytes to be read - - Returns the number of bytes actually read. - - - - This filter stream is used to compress a stream into a "GZIP" stream. - The "GZIP" format is described in RFC 1952. - - author of the original java version : John Leuner - - This sample shows how to gzip a file - - using System; - using System.IO; - - using ICSharpCode.SharpZipLib.GZip; - using ICSharpCode.SharpZipLib.Core; - - class MainClass - { - public static void Main(string[] args) - { - using (Stream s = new GZipOutputStream(File.Create(args[0] + ".gz"))) - using (FileStream fs = File.OpenRead(args[0])) { - byte[] writeData = new byte[4096]; - Streamutils.Copy(s, fs, writeData); - } - } - } - } - - - - - - CRC-32 value for uncompressed data - - - - - Creates a GzipOutputStream with the default buffer size - - - The stream to read data (to be compressed) from - - - - - Creates a GZipOutputStream with the specified buffer size - - - The stream to read data (to be compressed) from - - - Size of the buffer to use - - - - - Sets the active compression level (0-9). The new level will be activated - immediately. - - The compression level to set. - - Level specified is not supported. - - - - - - Get the current compression level. - - The current compression level. - - - - Write given buffer to output updating crc - - Buffer to write - Offset of first byte in buf to write - Number of bytes to write - - - - Writes remaining compressed output data to the output stream - and closes it. - - - - - Finish compression and write any footer information required to stream - - - - - This class contains constants used for LZW - - - - - Magic number found at start of LZW header: 0x1f 0x9d - - - - - Maximum number of bits per code - - - - - Mask for 'number of compression bits' - - - - - Indicates the presence of a fourth header byte - - - - - Reserved bits - - - - - Block compression: if table is full and compression rate is dropping, - clear the dictionary. - - - - - LZW file header size (in bytes) - - - - - Initial number of bits per code - - - - - LzwException represents exceptions specific to LZW classes and code. - - - - - Initialise a new instance of . - - - - - Initialise a new instance of with its message string. - - A that describes the error. - - - - Initialise a new instance of . - - A that describes the error. - The that caused this exception. - - - - Initializes a new instance of the LzwException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - This filter stream is used to decompress a LZW format stream. - Specifically, a stream that uses the LZC compression method. - This file format is usually associated with the .Z file extension. - - See http://en.wikipedia.org/wiki/Compress - See http://wiki.wxwidgets.org/Development:_Z_File_Format - - The file header consists of 3 (or optionally 4) bytes. The first two bytes - contain the magic marker "0x1f 0x9d", followed by a byte of flags. - - Based on Java code by Ronald Tschalar, which in turn was based on the unlzw.c - code in the gzip package. - - This sample shows how to unzip a compressed file - - using System; - using System.IO; - - using ICSharpCode.SharpZipLib.Core; - using ICSharpCode.SharpZipLib.LZW; - - class MainClass - { - public static void Main(string[] args) - { - using (Stream inStream = new LzwInputStream(File.OpenRead(args[0]))) - using (FileStream outStream = File.Create(Path.GetFileNameWithoutExtension(args[0]))) { - byte[] buffer = new byte[4096]; - StreamUtils.Copy(inStream, outStream, buffer); - // OR - inStream.Read(buffer, 0, buffer.Length); - // now do something with the buffer - } - } - } - - - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - Creates a LzwInputStream - - - The stream to read compressed data from (baseInputStream LZW format) - - - - - See - - - - - - Reads decompressed data into the provided buffer byte array - - - The array to read and decompress data into - - - The offset indicating where the data should be placed - - - The number of bytes to decompress - - The number of bytes read. Zero signals the end of stream - - - - Moves the unread data in the buffer to the beginning and resets - the pointers. - - - - - - - Gets a value indicating whether the current stream supports reading - - - - - Gets a value of false indicating seeking is not supported for this stream. - - - - - Gets a value of false indicating that this stream is not writeable. - - - - - A value representing the length of the stream in bytes. - - - - - The current position within the stream. - Throws a NotSupportedException when attempting to set the position - - Attempting to set the position - - - - Flushes the baseInputStream - - - - - Sets the position within the current stream - Always throws a NotSupportedException - - The relative offset to seek to. - The defining where to seek from. - The new position in the stream. - Any access - - - - Set the length of the current stream - Always throws a NotSupportedException - - The new length value for the stream. - Any access - - - - Writes a sequence of bytes to stream and advances the current position - This method always throws a NotSupportedException - - Thew buffer containing data to write. - The offset of the first byte to write. - The number of bytes to write. - Any access - - - - Writes one byte to the current stream and advances the current position - Always throws a NotSupportedException - - The byte to write. - Any access - - - - Closes the input stream. When - is true the underlying stream is also closed. - - - - - Flag indicating wether this instance has been closed or not. - - - - - This exception is used to indicate that there is a problem - with a TAR archive header. - - - - - Initialise a new instance of the InvalidHeaderException class. - - - - - Initialises a new instance of the InvalidHeaderException class with a specified message. - - Message describing the exception cause. - - - - Initialise a new instance of InvalidHeaderException - - Message describing the problem. - The exception that is the cause of the current exception. - - - - Used to advise clients of 'events' while processing archives - - - - - The TarArchive class implements the concept of a - 'Tape Archive'. A tar archive is a series of entries, each of - which represents a file system object. Each entry in - the archive consists of a header block followed by 0 or more data blocks. - Directory entries consist only of the header block, and are followed by entries - for the directory's contents. File entries consist of a - header followed by the number of blocks needed to - contain the file's contents. All entries are written on - block boundaries. Blocks are 512 bytes long. - - TarArchives are instantiated in either read or write mode, - based upon whether they are instantiated with an InputStream - or an OutputStream. Once instantiated TarArchives read/write - mode can not be changed. - - There is currently no support for random access to tar archives. - However, it seems that subclassing TarArchive, and using the - TarBuffer.CurrentRecord and TarBuffer.CurrentBlock - properties, this would be rather trivial. - - - - - Client hook allowing detailed information to be reported during processing - - - - - Raises the ProgressMessage event - - The TarEntry for this event - message for this event. Null is no message - - - - Constructor for a default . - - - - - Initalise a TarArchive for input. - - The to use for input. - - - - Initialise a TarArchive for output. - - The to use for output. - - - - The InputStream based constructors create a TarArchive for the - purposes of extracting or listing a tar archive. Thus, use - these constructors when you wish to extract files from or list - the contents of an existing tar archive. - - The stream to retrieve archive data from. - Returns a new suitable for reading from. - - - - Create TarArchive for reading setting block factor - - A stream containing the tar archive contents - The blocking factor to apply - Returns a suitable for reading. - - - - Create a TarArchive for writing to, using the default blocking factor - - The to write to - Returns a suitable for writing. - - - - Create a tar archive for writing. - - The stream to write to - The blocking factor to use for buffering. - Returns a suitable for writing. - - - - Set the flag that determines whether existing files are - kept, or overwritten during extraction. - - - If true, do not overwrite existing files. - - - - - Get/set the ascii file translation flag. If ascii file translation - is true, then the file is checked to see if it a binary file or not. - If the flag is true and the test indicates it is ascii text - file, it will be translated. The translation converts the local - operating system's concept of line ends into the UNIX line end, - '\n', which is the defacto standard for a TAR archive. This makes - text files compatible with UNIX. - - - - - Set the ascii file translation flag. - - - If true, translate ascii text files. - - - - - PathPrefix is added to entry names as they are written if the value is not null. - A slash character is appended after PathPrefix - - - - - RootPath is removed from entry names if it is found at the - beginning of the name. - - - - - Set user and group information that will be used to fill in the - tar archive's entry headers. This information is based on that available - for the linux operating system, which is not always available on other - operating systems. TarArchive allows the programmer to specify values - to be used in their place. - is set to true by this call. - - - The user id to use in the headers. - - - The user name to use in the headers. - - - The group id to use in the headers. - - - The group name to use in the headers. - - - - - Get or set a value indicating if overrides defined by SetUserInfo should be applied. - - If overrides are not applied then the values as set in each header will be used. - - - - Get the archive user id. - See ApplyUserInfoOverrides for detail - on how to allow setting values on a per entry basis. - - - The current user id. - - - - - Get the archive user name. - See ApplyUserInfoOverrides for detail - on how to allow setting values on a per entry basis. - - - The current user name. - - - - - Get the archive group id. - See ApplyUserInfoOverrides for detail - on how to allow setting values on a per entry basis. - - - The current group id. - - - - - Get the archive group name. - See ApplyUserInfoOverrides for detail - on how to allow setting values on a per entry basis. - - - The current group name. - - - - - Get the archive's record size. Tar archives are composed of - a series of RECORDS each containing a number of BLOCKS. - This allowed tar archives to match the IO characteristics of - the physical device being used. Archives are expected - to be properly "blocked". - - - The record size this archive is using. - - - - - Sets the IsStreamOwner property on the underlying stream. - Set this to false to prevent the Close of the TarArchive from closing the stream. - - - - - Close the archive. - - - - - Perform the "list" command for the archive contents. - - NOTE That this method uses the progress event to actually list - the contents. If the progress display event is not set, nothing will be listed! - - - - - Perform the "extract" command and extract the contents of the archive. - - - The destination directory into which to extract. - - - - - Extract an entry from the archive. This method assumes that the - tarIn stream has been properly set with a call to GetNextEntry(). - - - The destination directory into which to extract. - - - The TarEntry returned by tarIn.GetNextEntry(). - - - - - Write an entry to the archive. This method will call the putNextEntry - and then write the contents of the entry, and finally call closeEntry() - for entries that are files. For directories, it will call putNextEntry(), - and then, if the recurse flag is true, process each entry that is a - child of the directory. - - - The TarEntry representing the entry to write to the archive. - - - If true, process the children of directory entries. - - - - - Write an entry to the archive. This method will call the putNextEntry - and then write the contents of the entry, and finally call closeEntry() - for entries that are files. For directories, it will call putNextEntry(), - and then, if the recurse flag is true, process each entry that is a - child of the directory. - - - The TarEntry representing the entry to write to the archive. - - - If true, process the children of directory entries. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases the unmanaged resources used by the FileStream and optionally releases the managed resources. - - true to release both managed and unmanaged resources; - false to release only unmanaged resources. - - - - Closes the archive and releases any associated resources. - - - - - Ensures that resources are freed and other cleanup operations are performed - when the garbage collector reclaims the . - - - - - The TarBuffer class implements the tar archive concept - of a buffered input stream. This concept goes back to the - days of blocked tape drives and special io devices. In the - C# universe, the only real function that this class - performs is to ensure that files have the correct "record" - size, or other tars will complain. -

- You should never have a need to access this class directly. - TarBuffers are created by Tar IO Streams. -

-
-
- - - The size of a block in a tar archive in bytes. - - This is 512 bytes. - - - - The number of blocks in a default record. - - - The default value is 20 blocks per record. - - - - - The size in bytes of a default record. - - - The default size is 10KB. - - - - - Get the record size for this buffer - - The record size in bytes. - This is equal to the multiplied by the - - - - Get the TAR Buffer's record size. - - The record size in bytes. - This is equal to the multiplied by the - - - - Get the Blocking factor for the buffer - - This is the number of blocks in each record. - - - - Get the TAR Buffer's block factor - - The block factor; the number of blocks per record. - - - - Construct a default TarBuffer - - - - - Create TarBuffer for reading with default BlockFactor - - Stream to buffer - A new suitable for input. - - - - Construct TarBuffer for reading inputStream setting BlockFactor - - Stream to buffer - Blocking factor to apply - A new suitable for input. - - - - Construct TarBuffer for writing with default BlockFactor - - output stream for buffer - A new suitable for output. - - - - Construct TarBuffer for writing Tar output to streams. - - Output stream to write to. - Blocking factor to apply - A new suitable for output. - - - - Initialization common to all constructors. - - - - - Determine if an archive block indicates End of Archive. End of - archive is indicated by a block that consists entirely of null bytes. - All remaining blocks for the record should also be null's - However some older tars only do a couple of null blocks (Old GNU tar for one) - and also partial records - - The data block to check. - Returns true if the block is an EOF block; false otherwise. - - - - Determine if an archive block indicates the End of an Archive has been reached. - End of archive is indicated by a block that consists entirely of null bytes. - All remaining blocks for the record should also be null's - However some older tars only do a couple of null blocks (Old GNU tar for one) - and also partial records - - The data block to check. - Returns true if the block is an EOF block; false otherwise. - - - - Skip over a block on the input stream. - - - - - Read a block from the input stream. - - - The block of data read. - - - - - Read a record from data stream. - - - false if End-Of-File, else true. - - - - - Get the current block number, within the current record, zero based. - - Block numbers are zero based values - - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - Get the current block number, within the current record, zero based. - - - The current zero based block number. - - - The absolute block number = (record number * block factor) + block number. - - - - - Get the current record number. - - - The current zero based record number. - - - - - Get the current record number. - - - The current zero based record number. - - - - - Write a block of data to the archive. - - - The data to write to the archive. - - - - - Write an archive record to the archive, where the record may be - inside of a larger array buffer. The buffer must be "offset plus - record size" long. - - - The buffer containing the record data to write. - - - The offset of the record data within buffer. - - - - - Write a TarBuffer record to the archive. - - - - - WriteFinalRecord writes the current record buffer to output any unwritten data is present. - - Any trailing bytes are set to zero which is by definition correct behaviour - for the end of a tar stream. - - - - Close the TarBuffer. If this is an output buffer, also flush the - current block before closing. - - - - - This class represents an entry in a Tar archive. It consists - of the entry's header, as well as the entry's File. Entries - can be instantiated in one of three ways, depending on how - they are to be used. -

- TarEntries that are created from the header bytes read from - an archive are instantiated with the TarEntry( byte[] ) - constructor. These entries will be used when extracting from - or listing the contents of an archive. These entries have their - header filled in using the header bytes. They also set the File - to null, since they reference an archive entry not a file.

-

- TarEntries that are created from files that are to be written - into an archive are instantiated with the CreateEntryFromFile(string) - pseudo constructor. These entries have their header filled in using - the File's information. They also keep a reference to the File - for convenience when writing entries.

-

- Finally, TarEntries can be constructed from nothing but a name. - This allows the programmer to construct the entry by hand, for - instance when only an InputStream is available for writing to - the archive, and the header information is constructed from - other information. In this case the header fields are set to - defaults and the File is set to null.

- -
-
- - - Initialise a default instance of . - - - - - Construct an entry from an archive's header bytes. File is set - to null. - - - The header bytes from a tar archive entry. - - - - - Construct a TarEntry using the header provided - - Header details for entry - - - - Clone this tar entry. - - Returns a clone of this entry. - - - - Construct an entry with only a name. - This allows the programmer to construct the entry's header "by hand". - - The name to use for the entry - Returns the newly created - - - - Construct an entry for a file. File is set to file, and the - header is constructed from information from the file. - - The file name that the entry represents. - Returns the newly created - - - - Determine if the two entries are equal. Equality is determined - by the header names being equal. - - The to compare with the current Object. - - True if the entries are equal; false if not. - - - - - Derive a Hash value for the current - - A Hash code for the current - - - - Determine if the given entry is a descendant of this entry. - Descendancy is determined by the name of the descendant - starting with this entry's name. - - - Entry to be checked as a descendent of this. - - - True if entry is a descendant of this. - - - - - Get this entry's header. - - - This entry's TarHeader. - - - - - Get/Set this entry's name. - - - - - Get/set this entry's user id. - - - - - Get/set this entry's group id. - - - - - Get/set this entry's user name. - - - - - Get/set this entry's group name. - - - - - Convenience method to set this entry's group and user ids. - - - This entry's new user id. - - - This entry's new group id. - - - - - Convenience method to set this entry's group and user names. - - - This entry's new user name. - - - This entry's new group name. - - - - - Get/Set the modification time for this entry - - - - - Get this entry's file. - - - This entry's file. - - - - - Get/set this entry's recorded file size. - - - - - Return true if this entry represents a directory, false otherwise - - - True if this entry is a directory. - - - - - Fill in a TarHeader with information from a File. - - - The TarHeader to fill in. - - - The file from which to get the header information. - - - - - Get entries for all files present in this entries directory. - If this entry doesnt represent a directory zero entries are returned. - - - An array of TarEntry's for this entry's children. - - - - - Write an entry's header information to a header buffer. - - - The tar entry header buffer to fill in. - - - - - Convenience method that will modify an entry's name directly - in place in an entry header buffer byte array. - - - The buffer containing the entry header to modify. - - - The new name to place into the header buffer. - - - - - Fill in a TarHeader given only the entry's name. - - - The TarHeader to fill in. - - - The tar entry name. - - - - - The name of the file this entry represents or null if the entry is not based on a file. - - - - - The entry's header information. - - - - - TarException represents exceptions specific to Tar classes and code. - - - - - Initialise a new instance of . - - - - - Initialise a new instance of with its message string. - - A that describes the error. - - - - Initialise a new instance of . - - A that describes the error. - The that caused this exception. - - - - Initializes a new instance of the TarException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - Reads the extended header of a Tar stream - - - - - Creates a new . - - - - - Read bytes from - - - - - - - Returns the parsed headers as key-value strings - - - - - This class encapsulates the Tar Entry Header used in Tar Archives. - The class also holds a number of tar constants, used mostly in headers. - - - The tar format and its POSIX successor PAX have a long history which makes for compatability - issues when creating and reading files. - - This is further complicated by a large number of programs with variations on formats - One common issue is the handling of names longer than 100 characters. - GNU style long names are currently supported. - - This is the ustar (Posix 1003.1) header. - - struct header - { - char t_name[100]; // 0 Filename - char t_mode[8]; // 100 Permissions - char t_uid[8]; // 108 Numerical User ID - char t_gid[8]; // 116 Numerical Group ID - char t_size[12]; // 124 Filesize - char t_mtime[12]; // 136 st_mtime - char t_chksum[8]; // 148 Checksum - char t_typeflag; // 156 Type of File - char t_linkname[100]; // 157 Target of Links - char t_magic[6]; // 257 "ustar" or other... - char t_version[2]; // 263 Version fixed to 00 - char t_uname[32]; // 265 User Name - char t_gname[32]; // 297 Group Name - char t_devmajor[8]; // 329 Major for devices - char t_devminor[8]; // 337 Minor for devices - char t_prefix[155]; // 345 Prefix for t_name - char t_mfill[12]; // 500 Filler up to 512 - }; - - - - - The length of the name field in a header buffer. - - - - - The length of the mode field in a header buffer. - - - - - The length of the user id field in a header buffer. - - - - - The length of the group id field in a header buffer. - - - - - The length of the checksum field in a header buffer. - - - - - Offset of checksum in a header buffer. - - - - - The length of the size field in a header buffer. - - - - - The length of the magic field in a header buffer. - - - - - The length of the version field in a header buffer. - - - - - The length of the modification time field in a header buffer. - - - - - The length of the user name field in a header buffer. - - - - - The length of the group name field in a header buffer. - - - - - The length of the devices field in a header buffer. - - - - - The length of the name prefix field in a header buffer. - - - - - The "old way" of indicating a normal file. - - - - - Normal file type. - - - - - Link file type. - - - - - Symbolic link file type. - - - - - Character device file type. - - - - - Block device file type. - - - - - Directory file type. - - - - - FIFO (pipe) file type. - - - - - Contiguous file type. - - - - - Posix.1 2001 global extended header - - - - - Posix.1 2001 extended header - - - - - Solaris access control list file type - - - - - GNU dir dump file type - This is a dir entry that contains the names of files that were in the - dir at the time the dump was made - - - - - Solaris Extended Attribute File - - - - - Inode (metadata only) no file content - - - - - Identifies the next file on the tape as having a long link name - - - - - Identifies the next file on the tape as having a long name - - - - - Continuation of a file that began on another volume - - - - - For storing filenames that dont fit in the main header (old GNU) - - - - - GNU Sparse file - - - - - GNU Tape/volume header ignore on extraction - - - - - The magic tag representing a POSIX tar archive. (would be written with a trailing NULL) - - - - - The magic tag representing an old GNU tar archive where version is included in magic and overwrites it - - - - - Initialise a default TarHeader instance - - - - - Get/set the name for this tar entry. - - Thrown when attempting to set the property to null. - - - - Get the name of this entry. - - The entry's name. - - - - Get/set the entry's Unix style permission mode. - - - - - The entry's user id. - - - This is only directly relevant to unix systems. - The default is zero. - - - - - Get/set the entry's group id. - - - This is only directly relevant to linux/unix systems. - The default value is zero. - - - - - Get/set the entry's size. - - Thrown when setting the size to less than zero. - - - - Get/set the entry's modification time. - - - The modification time is only accurate to within a second. - - Thrown when setting the date time to less than 1/1/1970. - - - - Get the entry's checksum. This is only valid/updated after writing or reading an entry. - - - - - Get value of true if the header checksum is valid, false otherwise. - - - - - Get/set the entry's type flag. - - - - - The entry's link name. - - Thrown when attempting to set LinkName to null. - - - - Get/set the entry's magic tag. - - Thrown when attempting to set Magic to null. - - - - The entry's version. - - Thrown when attempting to set Version to null. - - - - The entry's user name. - - - - - Get/set the entry's group name. - - - This is only directly relevant to unix systems. - - - - - Get/set the entry's major device number. - - - - - Get/set the entry's minor device number. - - - - - Create a new that is a copy of the current instance. - - A new that is a copy of the current instance. - - - - Parse TarHeader information from a header buffer. - - - The tar entry header buffer to get information from. - - - - - 'Write' header information to buffer provided, updating the check sum. - - output buffer for header information - - - - Get a hash code for the current object. - - A hash code for the current object. - - - - Determines if this instance is equal to the specified object. - - The object to compare with. - true if the objects are equal, false otherwise. - - - - Set defaults for values used when constructing a TarHeader instance. - - Value to apply as a default for userId. - Value to apply as a default for userName. - Value to apply as a default for groupId. - Value to apply as a default for groupName. - - - - Parse an octal string from a header buffer. - - The header buffer from which to parse. - The offset into the buffer from which to parse. - The number of header bytes to parse. - The long equivalent of the octal string. - - - - Parse a name from a header buffer. - - - The header buffer from which to parse. - - - The offset into the buffer from which to parse. - - - The number of header bytes to parse. - - - The name parsed. - - - - - Add name to the buffer as a collection of bytes - - The name to add - The offset of the first character - The buffer to add to - The index of the first byte to add - The number of characters/bytes to add - The next free index in the - - - - Add name to the buffer as a collection of bytes - - The name to add - The offset of the first character - The buffer to add to - The index of the first byte to add - The number of characters/bytes to add - The next free index in the - - - - Add an entry name to the buffer - - - The name to add - - - The buffer to add to - - - The offset into the buffer from which to start adding - - - The number of header bytes to add - - - The index of the next free byte in the buffer - - - - - Add an entry name to the buffer - - The name to add - The buffer to add to - The offset into the buffer from which to start adding - The number of header bytes to add - The index of the next free byte in the buffer - - - - Add a string to a buffer as a collection of ascii bytes. - - The string to add - The offset of the first character to add. - The buffer to add to. - The offset to start adding at. - The number of ascii characters to add. - The next free index in the buffer. - - - - Put an octal representation of a value into a buffer - - - the value to be converted to octal - - - buffer to store the octal string - - - The offset into the buffer where the value starts - - - The length of the octal string to create - - - The offset of the character next byte after the octal string - - - - - Put an octal or binary representation of a value into a buffer - - Value to be convert to octal - The buffer to update - The offset into the buffer to store the value - The length of the octal string. Must be 12. - Index of next byte - - - - Add the checksum integer to header buffer. - - - The header buffer to set the checksum for - The offset into the buffer for the checksum - The number of header bytes to update. - It's formatted differently from the other fields: it has 6 digits, a - null, then a space -- rather than digits, a space, then a null. - The final space is already there, from checksumming - - The modified buffer offset - - - - Compute the checksum for a tar entry header. - The checksum field must be all spaces prior to this happening - - The tar entry's header buffer. - The computed checksum. - - - - Make a checksum for a tar entry ignoring the checksum contents. - - The tar entry's header buffer. - The checksum for the buffer - - - - The TarInputStream reads a UNIX tar archive as an InputStream. - methods are provided to position at each successive entry in - the archive, and the read each entry as a normal input stream - using read(). - - - - - Construct a TarInputStream with default block factor - - stream to source data from - - - - Construct a TarInputStream with user specified block factor - - stream to source data from - block factor to apply to archive - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - Gets a value indicating whether the current stream supports reading - - - - - Gets a value indicating whether the current stream supports seeking - This property always returns false. - - - - - Gets a value indicating if the stream supports writing. - This property always returns false. - - - - - The length in bytes of the stream - - - - - Gets or sets the position within the stream. - Setting the Position is not supported and throws a NotSupportedExceptionNotSupportedException - - Any attempt to set position - - - - Flushes the baseInputStream - - - - - Set the streams position. This operation is not supported and will throw a NotSupportedException - - The offset relative to the origin to seek to. - The to start seeking from. - The new position in the stream. - Any access - - - - Sets the length of the stream - This operation is not supported and will throw a NotSupportedException - - The new stream length. - Any access - - - - Writes a block of bytes to this stream using data from a buffer. - This operation is not supported and will throw a NotSupportedException - - The buffer containing bytes to write. - The offset in the buffer of the frist byte to write. - The number of bytes to write. - Any access - - - - Writes a byte to the current position in the file stream. - This operation is not supported and will throw a NotSupportedException - - The byte value to write. - Any access - - - - Reads a byte from the current tar archive entry. - - A byte cast to an int; -1 if the at the end of the stream. - - - - Reads bytes from the current tar archive entry. - - This method is aware of the boundaries of the current - entry in the archive and will deal with them appropriately - - - The buffer into which to place bytes read. - - - The offset at which to place bytes read. - - - The number of bytes to read. - - - The number of bytes read, or 0 at end of stream/EOF. - - - - - Closes this stream. Calls the TarBuffer's close() method. - The underlying stream is closed by the TarBuffer. - - - - - Set the entry factory for this instance. - - The factory for creating new entries - - - - Get the record size being used by this stream's TarBuffer. - - - - - Get the record size being used by this stream's TarBuffer. - - - TarBuffer record size. - - - - - Get the available data that can be read from the current - entry in the archive. This does not indicate how much data - is left in the entire archive, only in the current entry. - This value is determined from the entry's size header field - and the amount of data already read from the current entry. - - - The number of available bytes for the current entry. - - - - - Skip bytes in the input buffer. This skips bytes in the - current entry's data, not the entire archive, and will - stop at the end of the current entry's data if the number - to skip extends beyond that point. - - - The number of bytes to skip. - - - - - Return a value of true if marking is supported; false otherwise. - - Currently marking is not supported, the return value is always false. - - - - Since we do not support marking just yet, we do nothing. - - - The limit to mark. - - - - - Since we do not support marking just yet, we do nothing. - - - - - Get the next entry in this tar archive. This will skip - over any remaining data in the current entry, if there - is one, and place the input stream at the header of the - next entry, and read the header and instantiate a new - TarEntry from the header bytes and return that entry. - If there are no more entries in the archive, null will - be returned to indicate that the end of the archive has - been reached. - - - The next TarEntry in the archive, or null. - - - - - Copies the contents of the current tar archive entry directly into - an output stream. - - - The OutputStream into which to write the entry's data. - - - - - This interface is provided, along with the method , to allow - the programmer to have their own subclass instantiated for the - entries return from . - - - - - Create an entry based on name alone - - - Name of the new EntryPointNotFoundException to create - - created TarEntry or descendant class - - - - Create an instance based on an actual file - - - Name of file to represent in the entry - - - Created TarEntry or descendant class - - - - - Create a tar entry based on the header information passed - - - Buffer containing header information to create an an entry from. - - - Created TarEntry or descendant class - - - - - Standard entry factory class creating instances of the class TarEntry - - - - - Create a based on named - - The name to use for the entry - A new - - - - Create a tar entry with details obtained from file - - The name of the file to retrieve details from. - A new - - - - Create an entry based on details in header - - The buffer containing entry details. - A new - - - - Flag set when last block has been read - - - - - Size of this entry as recorded in header - - - - - Number of bytes read for this entry so far - - - - - Buffer used with calls to Read() - - - - - Working buffer - - - - - Current entry being read - - - - - Factory used to create TarEntry or descendant class instance - - - - - Stream used as the source of input data. - - - - - The TarOutputStream writes a UNIX tar archive as an OutputStream. - Methods are provided to put entries, and then write their contents - by writing to this stream using write(). - - public - - - - Construct TarOutputStream using default block factor - - stream to write to - - - - Construct TarOutputStream with user specified block factor - - stream to write to - blocking factor - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - true if the stream supports reading; otherwise, false. - - - - - true if the stream supports seeking; otherwise, false. - - - - - true if stream supports writing; otherwise, false. - - - - - length of stream in bytes - - - - - gets or sets the position within the current stream. - - - - - set the position within the current stream - - The offset relative to the to seek to - The to seek from. - The new position in the stream. - - - - Set the length of the current stream - - The new stream length. - - - - Read a byte from the stream and advance the position within the stream - by one byte or returns -1 if at the end of the stream. - - The byte value or -1 if at end of stream - - - - read bytes from the current stream and advance the position within the - stream by the number of bytes read. - - The buffer to store read bytes in. - The index into the buffer to being storing bytes at. - The desired number of bytes to read. - The total number of bytes read, or zero if at the end of the stream. - The number of bytes may be less than the count - requested if data is not avialable. - - - - All buffered data is written to destination - - - - - Ends the TAR archive without closing the underlying OutputStream. - The result is that the EOF block of nulls is written. - - - - - Ends the TAR archive and closes the underlying OutputStream. - - This means that Finish() is called followed by calling the - TarBuffer's Close(). - - - - Get the record size being used by this stream's TarBuffer. - - - - - Get the record size being used by this stream's TarBuffer. - - - The TarBuffer record size. - - - - - Get a value indicating wether an entry is open, requiring more data to be written. - - - - - Put an entry on the output stream. This writes the entry's - header and positions the output stream for writing - the contents of the entry. Once this method is called, the - stream is ready for calls to write() to write the entry's - contents. Once the contents are written, closeEntry() - MUST be called to ensure that all buffered data - is completely written to the output stream. - - - The TarEntry to be written to the archive. - - - - - Close an entry. This method MUST be called for all file - entries that contain data. The reason is that we must - buffer data written to the stream in order to satisfy - the buffer's block based writes. Thus, there may be - data fragments still being assembled that must be written - to the output stream before this entry is closed and the - next entry written. - - - - - Writes a byte to the current tar archive entry. - This method simply calls Write(byte[], int, int). - - - The byte to be written. - - - - - Writes bytes to the current tar archive entry. This method - is aware of the current entry and will throw an exception if - you attempt to write bytes past the length specified for the - current entry. The method is also (painfully) aware of the - record buffering required by TarBuffer, and manages buffers - that are not a multiple of recordsize in length, including - assembling records from small buffers. - - - The buffer to write to the archive. - - - The offset in the buffer from which to get bytes. - - - The number of bytes to write. - - - - - Write an EOF (end of archive) block to the tar archive. - The end of the archive is indicated by two blocks consisting entirely of zero bytes. - - - - - bytes written for this entry so far - - - - - current 'Assembly' buffer length - - - - - Flag indicating wether this instance has been closed or not. - - - - - Size for the current entry - - - - - single block working buffer - - - - - 'Assembly' buffer used to assemble data before writing - - - - - TarBuffer used to provide correct blocking factor - - - - - the destination stream for the archive contents - - - - - This is the Deflater class. The deflater class compresses input - with the deflate algorithm described in RFC 1951. It has several - compression levels and three different strategies described below. - - This class is not thread safe. This is inherent in the API, due - to the split of deflate and setInput. - - author of the original java version : Jochen Hoenicke - - - - - The best and slowest compression level. This tries to find very - long and distant string repetitions. - - - - - The worst but fastest compression level. - - - - - The default compression level. - - - - - This level won't compress at all but output uncompressed blocks. - - - - - The compression method. This is the only method supported so far. - There is no need to use this constant at all. - - - - - Compression Level as an enum for safer use - - - - - The best and slowest compression level. This tries to find very - long and distant string repetitions. - - - - - The worst but fastest compression level. - - - - - The default compression level. - - - - - This level won't compress at all but output uncompressed blocks. - - - - - The compression method. This is the only method supported so far. - There is no need to use this constant at all. - - - - - Creates a new deflater with default compression level. - - - - - Creates a new deflater with given compression level. - - - the compression level, a value between NO_COMPRESSION - and BEST_COMPRESSION, or DEFAULT_COMPRESSION. - - if lvl is out of range. - - - - Creates a new deflater with given compression level. - - - the compression level, a value between NO_COMPRESSION - and BEST_COMPRESSION. - - - true, if we should suppress the Zlib/RFC1950 header at the - beginning and the adler checksum at the end of the output. This is - useful for the GZIP/PKZIP formats. - - if lvl is out of range. - - - - Resets the deflater. The deflater acts afterwards as if it was - just created with the same compression level and strategy as it - had before. - - - - - Gets the current adler checksum of the data that was processed so far. - - - - - Gets the number of input bytes processed so far. - - - - - Gets the number of output bytes so far. - - - - - Flushes the current input block. Further calls to deflate() will - produce enough output to inflate everything in the current input - block. This is not part of Sun's JDK so I have made it package - private. It is used by DeflaterOutputStream to implement - flush(). - - - - - Finishes the deflater with the current input block. It is an error - to give more input after this method was called. This method must - be called to force all bytes to be flushed. - - - - - Returns true if the stream was finished and no more output bytes - are available. - - - - - Returns true, if the input buffer is empty. - You should then call setInput(). - NOTE: This method can also return true when the stream - was finished. - - - - - Sets the data which should be compressed next. This should be only - called when needsInput indicates that more input is needed. - If you call setInput when needsInput() returns false, the - previous input that is still pending will be thrown away. - The given byte array should not be changed, before needsInput() returns - true again. - This call is equivalent to setInput(input, 0, input.length). - - - the buffer containing the input data. - - - if the buffer was finished() or ended(). - - - - - Sets the data which should be compressed next. This should be - only called when needsInput indicates that more input is needed. - The given byte array should not be changed, before needsInput() returns - true again. - - - the buffer containing the input data. - - - the start of the data. - - - the number of data bytes of input. - - - if the buffer was Finish()ed or if previous input is still pending. - - - - - Sets the compression level. There is no guarantee of the exact - position of the change, but if you call this when needsInput is - true the change of compression level will occur somewhere near - before the end of the so far given input. - - - the new compression level. - - - - - Get current compression level - - Returns the current compression level - - - - Sets the compression strategy. Strategy is one of - DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact - position where the strategy is changed, the same as for - SetLevel() applies. - - - The new compression strategy. - - - - - Deflates the current input block with to the given array. - - - The buffer where compressed data is stored - - - The number of compressed bytes added to the output, or 0 if either - IsNeedingInput() or IsFinished returns true or length is zero. - - - - - Deflates the current input block to the given array. - - - Buffer to store the compressed data. - - - Offset into the output array. - - - The maximum number of bytes that may be stored. - - - The number of compressed bytes added to the output, or 0 if either - needsInput() or finished() returns true or length is zero. - - - If Finish() was previously called. - - - If offset or length don't match the array length. - - - - - Sets the dictionary which should be used in the deflate process. - This call is equivalent to setDictionary(dict, 0, dict.Length). - - - the dictionary. - - - if SetInput () or Deflate () were already called or another dictionary was already set. - - - - - Sets the dictionary which should be used in the deflate process. - The dictionary is a byte array containing strings that are - likely to occur in the data which should be compressed. The - dictionary is not stored in the compressed output, only a - checksum. To decompress the output you need to supply the same - dictionary again. - - - The dictionary data - - - The index where dictionary information commences. - - - The number of bytes in the dictionary. - - - If SetInput () or Deflate() were already called or another dictionary was already set. - - - - - Compression level. - - - - - If true no Zlib/RFC1950 headers or footers are generated - - - - - The current state. - - - - - The total bytes of output written. - - - - - The pending output. - - - - - The deflater engine. - - - - - This class contains constants used for deflation. - - - - - Set to true to enable debugging - - - - - Written to Zip file to identify a stored block - - - - - Identifies static tree in Zip file - - - - - Identifies dynamic tree in Zip file - - - - - Header flag indicating a preset dictionary for deflation - - - - - Sets internal buffer sizes for Huffman encoding - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Internal compression engine constant - - - - - Strategies for deflater - - - - - The default strategy - - - - - This strategy will only allow longer string repetitions. It is - useful for random data with a small character set. - - - - - This strategy will not look for string repetitions at all. It - only encodes with Huffman trees (which means, that more common - characters get a smaller encoding. - - - - - Low level compression engine for deflate algorithm which uses a 32K sliding window - with secondary compression from Huffman/Shannon-Fano codes. - - - - - Construct instance with pending buffer - Adler calculation will be peformed - - - Pending buffer to use - - - - - Construct instance with pending buffer - - - Pending buffer to use - - - If no adler calculation should be performed - - - - - Deflate drives actual compression of data - - True to flush input buffers - Finish deflation with the current input. - Returns true if progress has been made. - - - - Sets input data to be deflated. Should only be called when NeedsInput() - returns true - - The buffer containing input data. - The offset of the first byte of data. - The number of bytes of data to use as input. - - - - Determines if more input is needed. - - Return true if input is needed via SetInput - - - - Set compression dictionary - - The buffer containing the dictionary data - The offset in the buffer for the first byte of data - The length of the dictionary data. - - - - Reset internal state - - - - - Reset Adler checksum - - - - - Get current value of Adler checksum - - - - - Total data processed - - - - - Get/set the deflate strategy - - - - - Set the deflate level (0-9) - - The value to set the level to. - - - - Fill the window - - - - - Inserts the current string in the head hash and returns the previous - value for this hash. - - The previous hash value - - - - Find the best (longest) string in the window matching the - string starting at strstart. - - Preconditions: - - strstart + DeflaterConstants.MAX_MATCH <= window.length. - - - True if a match greater than the minimum length is found - - - - Hashtable, hashing three characters to an index for window, so - that window[index]..window[index+2] have this hash code. - Note that the array should really be unsigned short, so you need - to and the values with 0xffff. - - - - - prev[index & WMASK] points to the previous index that has the - same hash code as the string starting at index. This way - entries with the same hash code are in a linked list. - Note that the array should really be unsigned short, so you need - to and the values with 0xffff. - - - - - Points to the current character in the window. - - - - - lookahead is the number of characters starting at strstart in - window that are valid. - So window[strstart] until window[strstart+lookahead-1] are valid - characters. - - - - - This array contains the part of the uncompressed stream that - is of relevance. The current character is indexed by strstart. - - - - - The current compression function. - - - - - The input data for compression. - - - - - The total bytes of input read. - - - - - The offset into inputBuf, where input data starts. - - - - - The end offset of the input data. - - - - - The adler checksum - - - - - This is the DeflaterHuffman class. - - This class is not thread safe. This is inherent in the API, due - to the split of Deflate and SetInput. - - author of the original java version : Jochen Hoenicke - - - - - Resets the internal state of the tree - - - - - Check that all frequencies are zero - - - At least one frequency is non-zero - - - - - Set static codes and length - - new codes - length for new codes - - - - Build dynamic codes and lengths - - - - - Get encoded length - - Encoded length, the sum of frequencies * lengths - - - - Scan a literal or distance tree to determine the frequencies of the codes - in the bit length tree. - - - - - Write tree values - - Tree to write - - - - Pending buffer to use - - - - - Construct instance with pending buffer - - Pending buffer to use - - - - Reset internal state - - - - - Write all trees to pending buffer - - The number/rank of treecodes to send. - - - - Compress current buffer writing data to pending buffer - - - - - Flush block to output with no compression - - Data to write - Index of first byte to write - Count of bytes to write - True if this is the last block - - - - Flush block to output with compression - - Data to flush - Index of first byte to flush - Count of bytes to flush - True if this is the last block - - - - Get value indicating if internal buffer is full - - true if buffer is full - - - - Add literal to buffer - - Literal value to add to buffer. - Value indicating internal buffer is full - - - - Add distance code and length to literal and distance trees - - Distance code - Length - Value indicating if internal buffer is full - - - - Reverse the bits of a 16 bit value. - - Value to reverse bits - Value with bits reversed - - - - This class stores the pending output of the Deflater. - - author of the original java version : Jochen Hoenicke - - - - - Construct instance with default buffer size - - - - - Inflater is used to decompress data that has been compressed according - to the "deflate" standard described in rfc1951. - - By default Zlib (rfc1950) headers and footers are expected in the input. - You can use constructor public Inflater(bool noHeader) passing true - if there is no Zlib header information - - The usage is as following. First you have to set some input with - SetInput(), then Inflate() it. If inflate doesn't - inflate any bytes there may be three reasons: -
    -
  • IsNeedingInput() returns true because the input buffer is empty. - You have to provide more input with SetInput(). - NOTE: IsNeedingInput() also returns true when, the stream is finished. -
  • -
  • IsNeedingDictionary() returns true, you have to provide a preset - dictionary with SetDictionary().
  • -
  • IsFinished returns true, the inflater has finished.
  • -
- Once the first output byte is produced, a dictionary will not be - needed at a later stage. - - author of the original java version : John Leuner, Jochen Hoenicke -
-
- - - Copy lengths for literal codes 257..285 - - - - - Extra bits for literal codes 257..285 - - - - - Copy offsets for distance codes 0..29 - - - - - Extra bits for distance codes - - - - - These are the possible states for an inflater - - - - - This variable contains the current state. - - - - - The adler checksum of the dictionary or of the decompressed - stream, as it is written in the header resp. footer of the - compressed stream. - Only valid if mode is DECODE_DICT or DECODE_CHKSUM. - - - - - The number of bits needed to complete the current state. This - is valid, if mode is DECODE_DICT, DECODE_CHKSUM, - DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS. - - - - - True, if the last block flag was set in the last block of the - inflated stream. This means that the stream ends after the - current block. - - - - - The total number of inflated bytes. - - - - - The total number of bytes set with setInput(). This is not the - value returned by the TotalIn property, since this also includes the - unprocessed input. - - - - - This variable stores the noHeader flag that was given to the constructor. - True means, that the inflated stream doesn't contain a Zlib header or - footer. - - - - - Creates a new inflater or RFC1951 decompressor - RFC1950/Zlib headers and footers will be expected in the input data - - - - - Creates a new inflater. - - - True if no RFC1950/Zlib header and footer fields are expected in the input data - - This is used for GZIPed/Zipped input. - - For compatibility with - Sun JDK you should provide one byte of input more than needed in - this case. - - - - - Resets the inflater so that a new stream can be decompressed. All - pending input and output will be discarded. - - - - - Decodes a zlib/RFC1950 header. - - - False if more input is needed. - - - The header is invalid. - - - - - Decodes the dictionary checksum after the deflate header. - - - False if more input is needed. - - - - - Decodes the huffman encoded symbols in the input stream. - - - false if more input is needed, true if output window is - full or the current block ends. - - - if deflated stream is invalid. - - - - - Decodes the adler checksum after the deflate stream. - - - false if more input is needed. - - - If checksum doesn't match. - - - - - Decodes the deflated stream. - - - false if more input is needed, or if finished. - - - if deflated stream is invalid. - - - - - Sets the preset dictionary. This should only be called, if - needsDictionary() returns true and it should set the same - dictionary, that was used for deflating. The getAdler() - function returns the checksum of the dictionary needed. - - - The dictionary. - - - - - Sets the preset dictionary. This should only be called, if - needsDictionary() returns true and it should set the same - dictionary, that was used for deflating. The getAdler() - function returns the checksum of the dictionary needed. - - - The dictionary. - - - The index into buffer where the dictionary starts. - - - The number of bytes in the dictionary. - - - No dictionary is needed. - - - The adler checksum for the buffer is invalid - - - - - Sets the input. This should only be called, if needsInput() - returns true. - - - the input. - - - - - Sets the input. This should only be called, if needsInput() - returns true. - - - The source of input data - - - The index into buffer where the input starts. - - - The number of bytes of input to use. - - - No input is needed. - - - The index and/or count are wrong. - - - - - Inflates the compressed stream to the output buffer. If this - returns 0, you should check, whether IsNeedingDictionary(), - IsNeedingInput() or IsFinished() returns true, to determine why no - further output is produced. - - - the output buffer. - - - The number of bytes written to the buffer, 0 if no further - output can be produced. - - - if buffer has length 0. - - - if deflated stream is invalid. - - - - - Inflates the compressed stream to the output buffer. If this - returns 0, you should check, whether needsDictionary(), - needsInput() or finished() returns true, to determine why no - further output is produced. - - - the output buffer. - - - the offset in buffer where storing starts. - - - the maximum number of bytes to output. - - - the number of bytes written to the buffer, 0 if no further output can be produced. - - - if count is less than 0. - - - if the index and / or count are wrong. - - - if deflated stream is invalid. - - - - - Returns true, if the input buffer is empty. - You should then call setInput(). - NOTE: This method also returns true when the stream is finished. - - - - - Returns true, if a preset dictionary is needed to inflate the input. - - - - - Returns true, if the inflater has finished. This means, that no - input is needed and no output can be produced. - - - - - Gets the adler checksum. This is either the checksum of all - uncompressed bytes returned by inflate(), or if needsDictionary() - returns true (and thus no output was yet produced) this is the - adler checksum of the expected dictionary. - - - the adler checksum. - - - - - Gets the total number of output bytes returned by Inflate(). - - - the total number of output bytes. - - - - - Gets the total number of processed compressed input bytes. - - - The total number of bytes of processed input bytes. - - - - - Gets the number of unprocessed input bytes. Useful, if the end of the - stream is reached and you want to further process the bytes after - the deflate stream. - - - The number of bytes of the input which have not been processed. - - - - - Continue decoding header from until more bits are needed or decoding has been completed - - Returns whether decoding could be completed - - - - Get literal/length huffman tree, must not be used before has returned true - - If hader has not been successfully read by the state machine - - - - Get distance huffman tree, must not be used before has returned true - - If hader has not been successfully read by the state machine - - - - Huffman tree used for inflation - - - - - Literal length tree - - - - - Distance tree - - - - - Constructs a Huffman tree from the array of code lengths. - - - the array of code lengths - - - - - Reads the next symbol from input. The symbol is encoded using the - huffman tree. - - - input the input source. - - - the next symbol, or -1 if not enough input is available. - - - - - This class is general purpose class for writing data to a buffer. - - It allows you to write bits as well as bytes - Based on DeflaterPending.java - - author of the original java version : Jochen Hoenicke - - - - - Internal work buffer - - - - - construct instance using default buffer size of 4096 - - - - - construct instance using specified buffer size - - - size to use for internal buffer - - - - - Clear internal state/buffers - - - - - Write a byte to buffer - - - The value to write - - - - - Write a short value to buffer LSB first - - - The value to write. - - - - - write an integer LSB first - - The value to write. - - - - Write a block of data to buffer - - data to write - offset of first byte to write - number of bytes to write - - - - The number of bits written to the buffer - - - - - Align internal buffer on a byte boundary - - - - - Write bits to internal buffer - - source of bits - number of bits to write - - - - Write a short value to internal buffer most significant byte first - - value to write - - - - Indicates if buffer has been flushed - - - - - Flushes the pending buffer into the given output array. If the - output array is to small, only a partial flush is done. - - The output array. - The offset into output array. - The maximum number of bytes to store. - The number of bytes flushed. - - - - Convert internal buffer to byte array. - Buffer is empty on completion - - - The internal buffer contents converted to a byte array. - - - - - A special stream deflating or compressing the bytes that are - written to it. It uses a Deflater to perform actual deflating.
- Authors of the original java version : Tom Tromey, Jochen Hoenicke -
-
- - - Creates a new DeflaterOutputStream with a default Deflater and default buffer size. - - - the output stream where deflated output should be written. - - - - - Creates a new DeflaterOutputStream with the given Deflater and - default buffer size. - - - the output stream where deflated output should be written. - - - the underlying deflater. - - - - - Creates a new DeflaterOutputStream with the given Deflater and - buffer size. - - - The output stream where deflated output is written. - - - The underlying deflater to use - - - The buffer size in bytes to use when deflating (minimum value 512) - - - bufsize is less than or equal to zero. - - - baseOutputStream does not support writing - - - deflater instance is null - - - - - Finishes the stream by calling finish() on the deflater. - - - Not all input is deflated - - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - Allows client to determine if an entry can be patched after its added - - - - - Returns the 10 byte AUTH CODE to be appended immediately following the AES data stream. - - - - - Get/set the password used for encryption. - - When set to null or if the password is empty no encryption is performed - - - - Encrypt a block of data - - - Data to encrypt. NOTE the original contents of the buffer are lost - - - Offset of first byte in buffer to encrypt - - - Number of bytes in buffer to encrypt - - - - - Initializes encryption keys based on given . - - The password. - - - - Initializes encryption keys based on given password. - - - - - Deflates everything in the input buffers. This will call - def.deflate() until all bytes from the input buffers - are processed. - - - - - Gets value indicating stream can be read from - - - - - Gets a value indicating if seeking is supported for this stream - This property always returns false - - - - - Get value indicating if this stream supports writing - - - - - Get current length of stream - - - - - Gets the current position within the stream. - - Any attempt to set position - - - - Sets the current position of this stream to the given value. Not supported by this class! - - The offset relative to the to seek. - The to seek from. - The new position in the stream. - Any access - - - - Sets the length of this stream to the given value. Not supported by this class! - - The new stream length. - Any access - - - - Read a byte from stream advancing position by one - - The byte read cast to an int. THe value is -1 if at the end of the stream. - Any access - - - - Read a block of bytes from stream - - The buffer to store read data in. - The offset to start storing at. - The maximum number of bytes to read. - The actual number of bytes read. Zero if end of stream is detected. - Any access - - - - Flushes the stream by calling Flush on the deflater and then - on the underlying stream. This ensures that all bytes are flushed. - - - - - Calls and closes the underlying - stream when is true. - - - - - Get the Auth code for AES encrypted entries - - - - - Writes a single byte to the compressed output stream. - - - The byte value. - - - - - Writes bytes from an array to the compressed stream. - - - The byte array - - - The offset into the byte array where to start. - - - The number of bytes to write. - - - - - This buffer is used temporarily to retrieve the bytes from the - deflater and write them to the underlying output stream. - - - - - The deflater which is used to deflate the stream. - - - - - Base stream the deflater depends on. - - - - - An input buffer customised for use by - - - The buffer supports decryption of incoming data. - - - - - Initialise a new instance of with a default buffer size - - The stream to buffer. - - - - Initialise a new instance of - - The stream to buffer. - The size to use for the buffer - A minimum buffer size of 1KB is permitted. Lower sizes are treated as 1KB. - - - - Get the length of bytes bytes in the - - - - - Get the contents of the raw data buffer. - - This may contain encrypted data. - - - - Get the number of useable bytes in - - - - - Get the contents of the clear text buffer. - - - - - Get/set the number of bytes available - - - - - Call passing the current clear text buffer contents. - - The inflater to set input for. - - - - Fill the buffer from the underlying input stream. - - - - - Read a buffer directly from the input stream - - The buffer to fill - Returns the number of bytes read. - - - - Read a buffer directly from the input stream - - The buffer to read into - The offset to start reading data into. - The number of bytes to read. - Returns the number of bytes read. - - - - Read clear text data from the input stream. - - The buffer to add data to. - The offset to start adding data at. - The number of bytes to read. - Returns the number of bytes actually read. - - - - Read a from the input stream. - - Returns the byte read. - - - - Read an in little endian byte order. - - The short value read case to an int. - - - - Read an in little endian byte order. - - The int value read. - - - - Read a in little endian byte order. - - The long value read. - - - - Get/set the to apply to any data. - - Set this value to null to have no transform applied. - - - - This filter stream is used to decompress data compressed using the "deflate" - format. The "deflate" format is described in RFC 1951. - - This stream may form the basis for other decompression filters, such - as the GZipInputStream. - - Author of the original java version : John Leuner. - - - - - Create an InflaterInputStream with the default decompressor - and a default buffer size of 4KB. - - - The InputStream to read bytes from - - - - - Create an InflaterInputStream with the specified decompressor - and a default buffer size of 4KB. - - - The source of input data - - - The decompressor used to decompress data read from baseInputStream - - - - - Create an InflaterInputStream with the specified decompressor - and the specified buffer size. - - - The InputStream to read bytes from - - - The decompressor to use - - - Size of the buffer to use - - - - - Gets or sets a flag indicating ownership of underlying stream. - When the flag is true will close the underlying stream also. - - The default value is true. - - - - Skip specified number of bytes of uncompressed data - - - Number of bytes to skip - - - The number of bytes skipped, zero if the end of - stream has been reached - - - The number of bytes to skip is less than or equal to zero. - - - - - Clear any cryptographic state. - - - - - Returns 0 once the end of the stream (EOF) has been reached. - Otherwise returns 1. - - - - - Fills the buffer with more data to decompress. - - - Stream ends early - - - - - Gets a value indicating whether the current stream supports reading - - - - - Gets a value of false indicating seeking is not supported for this stream. - - - - - Gets a value of false indicating that this stream is not writeable. - - - - - A value representing the length of the stream in bytes. - - - - - The current position within the stream. - Throws a NotSupportedException when attempting to set the position - - Attempting to set the position - - - - Flushes the baseInputStream - - - - - Sets the position within the current stream - Always throws a NotSupportedException - - The relative offset to seek to. - The defining where to seek from. - The new position in the stream. - Any access - - - - Set the length of the current stream - Always throws a NotSupportedException - - The new length value for the stream. - Any access - - - - Writes a sequence of bytes to stream and advances the current position - This method always throws a NotSupportedException - - Thew buffer containing data to write. - The offset of the first byte to write. - The number of bytes to write. - Any access - - - - Writes one byte to the current stream and advances the current position - Always throws a NotSupportedException - - The byte to write. - Any access - - - - Closes the input stream. When - is true the underlying stream is also closed. - - - - - Reads decompressed data into the provided buffer byte array - - - The array to read and decompress data into - - - The offset indicating where the data should be placed - - - The number of bytes to decompress - - The number of bytes read. Zero signals the end of stream - - Inflater needs a dictionary - - - - - Decompressor for this stream - - - - - Input buffer for this stream. - - - - - Base stream the inflater reads from. - - - - - The compressed size - - - - - Flag indicating wether this instance has been closed or not. - - - - - Contains the output from the Inflation process. - We need to have a window so that we can refer backwards into the output stream - to repeat stuff.
- Author of the original java version : John Leuner -
-
- - - Write a byte to this output window - - value to write - - if window is full - - - - - Append a byte pattern already in the window itself - - length of pattern to copy - distance from end of window pattern occurs - - If the repeated data overflows the window - - - - - Copy from input manipulator to internal window - - source of data - length of data to copy - the number of bytes copied - - - - Copy dictionary to window - - source dictionary - offset of start in source dictionary - length of dictionary - - If window isnt empty - - - - - Get remaining unfilled space in window - - Number of bytes left in window - - - - Get bytes available for output in window - - Number of bytes filled - - - - Copy contents of window to output - - buffer to copy to - offset to start at - number of bytes to count - The number of bytes copied - - If a window underflow occurs - - - - - Reset by clearing window so GetAvailable returns 0 - - - - - This class allows us to retrieve a specified number of bits from - the input buffer, as well as copy big byte blocks. - - It uses an int buffer to store up to 31 bits for direct - manipulation. This guarantees that we can get at least 16 bits, - but we only need at most 15, so this is all safe. - - There are some optimizations in this class, for example, you must - never peek more than 8 bits more than needed, and you must first - peek bits before you may drop them. This is not a general purpose - class but optimized for the behaviour of the Inflater. - - authors of the original java version : John Leuner, Jochen Hoenicke - - - - - Get the next sequence of bits but don't increase input pointer. bitCount must be - less or equal 16 and if this call succeeds, you must drop - at least n - 8 bits in the next call. - - The number of bits to peek. - - the value of the bits, or -1 if not enough bits available. */ - - - - - Tries to grab the next bits from the input and - sets to the value, adding . - - true if enough bits could be read, otherwise false - - - - Tries to grab the next bits from the input and - sets of to the value. - - true if enough bits could be read, otherwise false - - - - Drops the next n bits from the input. You should have called PeekBits - with a bigger or equal n before, to make sure that enough bits are in - the bit buffer. - - The number of bits to drop. - - - - Gets the next n bits and increases input pointer. This is equivalent - to followed by , except for correct error handling. - - The number of bits to retrieve. - - the value of the bits, or -1 if not enough bits available. - - - - - Gets the number of bits available in the bit buffer. This must be - only called when a previous PeekBits() returned -1. - - - the number of bits available. - - - - - Gets the number of bytes available. - - - The number of bytes available. - - - - - Skips to the next byte boundary. - - - - - Returns true when SetInput can be called - - - - - Copies bytes from input buffer to output buffer starting - at output[offset]. You have to make sure, that the buffer is - byte aligned. If not enough bytes are available, copies fewer - bytes. - - - The buffer to copy bytes to. - - - The offset in the buffer at which copying starts - - - The length to copy, 0 is allowed. - - - The number of bytes copied, 0 if no bytes were available. - - - Length is less than zero - - - Bit buffer isnt byte aligned - - - - - Resets state and empties internal buffers - - - - - Add more input for consumption. - Only call when IsNeedingInput returns true - - data to be input - offset of first byte of input - number of bytes of input to add. - - - - FastZipEvents supports all events applicable to FastZip operations. - - - - - Delegate to invoke when processing directories. - - - - - Delegate to invoke when processing files. - - - - - Delegate to invoke during processing of files. - - - - - Delegate to invoke when processing for a file has been completed. - - - - - Delegate to invoke when processing directory failures. - - - - - Delegate to invoke when processing file failures. - - - - - Raise the directory failure event. - - The directory causing the failure. - The exception for this event. - A boolean indicating if execution should continue or not. - - - - Fires the file failure handler delegate. - - The file causing the failure. - The exception for this failure. - A boolean indicating if execution should continue or not. - - - - Fires the ProcessFile delegate. - - The file being processed. - A boolean indicating if execution should continue or not. - - - - Fires the delegate - - The file whose processing has been completed. - A boolean indicating if execution should continue or not. - - - - Fires the process directory delegate. - - The directory being processed. - Flag indicating if the directory has matching files as determined by the current filter. - A of true if the operation should continue; false otherwise. - - - - The minimum timespan between events. - - The minimum period of time between events. - - The default interval is three seconds. - - - - FastZip provides facilities for creating and extracting zip files. - - - - - Defines the desired handling when overwriting files during extraction. - - - - - Prompt the user to confirm overwriting - - - - - Never overwrite files. - - - - - Always overwrite files. - - - - - Initialise a default instance of . - - - - - Initialise a new instance of - - The events to use during operations. - - - - Get/set a value indicating wether empty directories should be created. - - - - - Get / set the password value. - - - - - Get or set the active when creating Zip files. - - - - - - Get or set the active when creating Zip files. - - - - - Gets or sets the setting for Zip64 handling when writing. - - - The default value is dynamic which is not backwards compatible with old - programs and can cause problems with XP's built in compression which cant - read Zip64 archives. However it does avoid the situation were a large file - is added and cannot be completed correctly. - NOTE: Setting the size for entries before they are added is the best solution! - By default the EntryFactory used by FastZip will set fhe file size. - - - - - Get/set a value indicating wether file dates and times should - be restored when extracting files from an archive. - - The default value is false. - - - - Get/set a value indicating whether file attributes should - be restored during extract operations - - - - - Get/set the Compression Level that will be used - when creating the zip - - - - - Delegate called when confirming overwriting of files. - - - - - Create a zip file. - - The name of the zip file to create. - The directory to source files from. - True to recurse directories, false for no recursion. - The file filter to apply. - The directory filter to apply. - - - - Create a zip file/archive. - - The name of the zip file to create. - The directory to obtain files and directories from. - True to recurse directories, false for no recursion. - The file filter to apply. - - - - Create a zip archive sending output to the passed. - - The stream to write archive data to. - The directory to source files from. - True to recurse directories, false for no recursion. - The file filter to apply. - The directory filter to apply. - The is closed after creation. - - - - Extract the contents of a zip file. - - The zip file to extract from. - The directory to save extracted information in. - A filter to apply to files. - - - - Extract the contents of a zip file. - - The zip file to extract from. - The directory to save extracted information in. - The style of overwriting to apply. - A delegate to invoke when confirming overwriting. - A filter to apply to files. - A filter to apply to directories. - Flag indicating whether to restore the date and time for extracted files. - Allow parent directory traversal in file paths (e.g. ../file) - - - - Extract the contents of a zip file held in a stream. - - The seekable input stream containing the zip to extract from. - The directory to save extracted information in. - The style of overwriting to apply. - A delegate to invoke when confirming overwriting. - A filter to apply to files. - A filter to apply to directories. - Flag indicating whether to restore the date and time for extracted files. - Flag indicating whether the inputStream will be closed by this method. - Allow parent directory traversal in file paths (e.g. ../file) - - - - Defines factory methods for creating new values. - - - - - Create a for a file given its name - - The name of the file to create an entry for. - Returns a file entry based on the passed. - - - - Create a for a file given its name - - The name of the file to create an entry for. - If true get details from the file system if the file exists. - Returns a file entry based on the passed. - - - - Create a for a file given its actual name and optional override name - - The name of the file to create an entry for. - An alternative name to be used for the new entry. Null if not applicable. - If true get details from the file system if the file exists. - Returns a file entry based on the passed. - - - - Create a for a directory given its name - - The name of the directory to create an entry for. - Returns a directory entry based on the passed. - - - - Create a for a directory given its name - - The name of the directory to create an entry for. - If true get details from the file system for this directory if it exists. - Returns a directory entry based on the passed. - - - - Get/set the applicable. - - - - - WindowsNameTransform transforms names to windows compatible ones. - - - - - The maximum windows path name permitted. - - This may not valid for all windows systems - CE?, etc but I cant find the equivalent in the CLR. - - - - In this case we need Windows' invalid path characters. - Path.GetInvalidPathChars() only returns a subset invalid on all platforms. - - - - - Initialises a new instance of - - - Allow parent directory traversal in file paths (e.g. ../file) - - - - Initialise a default instance of - - - - - Gets or sets a value containing the target directory to prefix values with. - - - - - Allow parent directory traversal in file paths (e.g. ../file) - - - - - Gets or sets a value indicating wether paths on incoming values should be removed. - - - - - Transform a Zip directory name to a windows directory name. - - The directory name to transform. - The transformed name. - - - - Transform a Zip format file name to a windows style one. - - The file name to transform. - The transformed name. - - - - Test a name to see if it is a valid name for a windows filename as extracted from a Zip archive. - - The name to test. - Returns true if the name is a valid zip name; false otherwise. - The filename isnt a true windows path in some fundamental ways like no absolute paths, no rooted paths etc. - - - - Force a name to be valid by replacing invalid characters with a fixed value - - The name to make valid - The replacement character to use for any invalid characters. - Returns a valid name - - - - Gets or set the character to replace invalid characters during transformations. - - - - - Determines how entries are tested to see if they should use Zip64 extensions or not. - - - - - Zip64 will not be forced on entries during processing. - - An entry can have this overridden if required - - - - Zip64 should always be used. - - - - - #ZipLib will determine use based on entry values when added to archive. - - - - - The kind of compression used for an entry in an archive - - - - - A direct copy of the file contents is held in the archive - - - - - Common Zip compression method using a sliding dictionary - of up to 32KB and secondary compression from Huffman/Shannon-Fano trees - - - - - An extension to deflate with a 64KB window. Not supported by #Zip currently - - - - - BZip2 compression. Not supported by #Zip. - - - - - LZMA compression. Not supported by #Zip. - - - - - PPMd compression. Not supported by #Zip. - - - - - WinZip special for AES encryption, Now supported by #Zip. - - - - - Identifies the encryption algorithm used for an entry - - - - - No encryption has been used. - - - - - Encrypted using PKZIP 2.0 or 'classic' encryption. - - - - - DES encryption has been used. - - - - - RC2 encryption has been used for encryption. - - - - - Triple DES encryption with 168 bit keys has been used for this entry. - - - - - Triple DES with 112 bit keys has been used for this entry. - - - - - AES 128 has been used for encryption. - - - - - AES 192 has been used for encryption. - - - - - AES 256 has been used for encryption. - - - - - RC2 corrected has been used for encryption. - - - - - Blowfish has been used for encryption. - - - - - Twofish has been used for encryption. - - - - - RC4 has been used for encryption. - - - - - An unknown algorithm has been used for encryption. - - - - - Defines the contents of the general bit flags field for an archive entry. - - - - - Bit 0 if set indicates that the file is encrypted - - - - - Bits 1 and 2 - Two bits defining the compression method (only for Method 6 Imploding and 8,9 Deflating) - - - - - Bit 3 if set indicates a trailing data desciptor is appended to the entry data - - - - - Bit 4 is reserved for use with method 8 for enhanced deflation - - - - - Bit 5 if set indicates the file contains Pkzip compressed patched data. - Requires version 2.7 or greater. - - - - - Bit 6 if set indicates strong encryption has been used for this entry. - - - - - Bit 7 is currently unused - - - - - Bit 8 is currently unused - - - - - Bit 9 is currently unused - - - - - Bit 10 is currently unused - - - - - Bit 11 if set indicates the filename and - comment fields for this file must be encoded using UTF-8. - - - - - Bit 12 is documented as being reserved by PKware for enhanced compression. - - - - - Bit 13 if set indicates that values in the local header are masked to hide - their actual values, and the central directory is encrypted. - - - Used when encrypting the central directory contents. - - - - - Bit 14 is documented as being reserved for use by PKware - - - - - Bit 15 is documented as being reserved for use by PKware - - - - - This class contains constants used for Zip format files - - - - - The version made by field for entries in the central header when created by this library - - - This is also the Zip version for the library when comparing against the version required to extract - for an entry. See . - - - - - The version made by field for entries in the central header when created by this library - - - This is also the Zip version for the library when comparing against the version required to extract - for an entry. See ZipInputStream.CanDecompressEntry. - - - - - The minimum version required to support strong encryption - - - - - The minimum version required to support strong encryption - - - - - Version indicating AES encryption - - - - - The version required for Zip64 extensions (4.5 or higher) - - - - - Size of local entry header (excluding variable length fields at end) - - - - - Size of local entry header (excluding variable length fields at end) - - - - - Size of Zip64 data descriptor - - - - - Size of data descriptor - - - - - Size of data descriptor - - - - - Size of central header entry (excluding variable fields) - - - - - Size of central header entry - - - - - Size of end of central record (excluding variable fields) - - - - - Size of end of central record (excluding variable fields) - - - - - Size of 'classic' cryptographic header stored before any entry data - - - - - Size of cryptographic header stored before entry data - - - - - Signature for local entry header - - - - - Signature for local entry header - - - - - Signature for spanning entry - - - - - Signature for spanning entry - - - - - Signature for temporary spanning entry - - - - - Signature for temporary spanning entry - - - - - Signature for data descriptor - - - This is only used where the length, Crc, or compressed size isnt known when the - entry is created and the output stream doesnt support seeking. - The local entry cannot be 'patched' with the correct values in this case - so the values are recorded after the data prefixed by this header, as well as in the central directory. - - - - - Signature for data descriptor - - - This is only used where the length, Crc, or compressed size isnt known when the - entry is created and the output stream doesnt support seeking. - The local entry cannot be 'patched' with the correct values in this case - so the values are recorded after the data prefixed by this header, as well as in the central directory. - - - - - Signature for central header - - - - - Signature for central header - - - - - Signature for Zip64 central file header - - - - - Signature for Zip64 central file header - - - - - Signature for Zip64 central directory locator - - - - - Signature for archive extra data signature (were headers are encrypted). - - - - - Central header digitial signature - - - - - Central header digitial signature - - - - - End of central directory record signature - - - - - End of central directory record signature - - - - - Default encoding used for string conversion. 0 gives the default system OEM code page. - Using the default code page isnt the full solution neccessarily - there are many variable factors, codepage 850 is often a good choice for - European users, however be careful about compatability. - - - - Depracated wrapper for - - - Depracated wrapper for - - - Depracated wrapper for - - - Depracated wrapper for - - - Depracated wrapper for - - - Depracated wrapper for - - - - Defines known values for the property. - - - - - Host system = MSDOS - - - - - Host system = Amiga - - - - - Host system = Open VMS - - - - - Host system = Unix - - - - - Host system = VMCms - - - - - Host system = Atari ST - - - - - Host system = OS2 - - - - - Host system = Macintosh - - - - - Host system = ZSystem - - - - - Host system = Cpm - - - - - Host system = Windows NT - - - - - Host system = MVS - - - - - Host system = VSE - - - - - Host system = Acorn RISC - - - - - Host system = VFAT - - - - - Host system = Alternate MVS - - - - - Host system = BEOS - - - - - Host system = Tandem - - - - - Host system = OS400 - - - - - Host system = OSX - - - - - Host system = WinZIP AES - - - - - This class represents an entry in a zip archive. This can be a file - or a directory - ZipFile and ZipInputStream will give you instances of this class as - information about the members in an archive. ZipOutputStream - uses an instance of this class when creating an entry in a Zip file. -
-
Author of the original java version : Jochen Hoenicke -
-
- - - Creates a zip entry with the given name. - - - The name for this entry. Can include directory components. - The convention for names is 'unix' style paths with relative names only. - There are with no device names and path elements are separated by '/' characters. - - - The name passed is null - - - - - Creates a zip entry with the given name and version required to extract - - - The name for this entry. Can include directory components. - The convention for names is 'unix' style paths with no device names and - path elements separated by '/' characters. This is not enforced see CleanName - on how to ensure names are valid if this is desired. - - - The minimum 'feature version' required this entry - - - The name passed is null - - - - - Initializes an entry with the given name and made by information - - Name for this entry - Version and HostSystem Information - Minimum required zip feature version required to extract this entry - Compression method for this entry. - - The name passed is null - - - versionRequiredToExtract should be 0 (auto-calculate) or > 10 - - - This constructor is used by the ZipFile class when reading from the central header - It is not generally useful, use the constructor specifying the name only. - - - - - Creates a deep copy of the given zip entry. - - - The entry to copy. - - - - - Get a value indicating wether the entry has a CRC value available. - - - - - Get/Set flag indicating if entry is encrypted. - A simple helper routine to aid interpretation of flags - - This is an assistant that interprets the flags property. - - - - Get / set a flag indicating wether entry name and comment text are - encoded in unicode UTF8. - - This is an assistant that interprets the flags property. - - - - Value used during password checking for PKZIP 2.0 / 'classic' encryption. - - - - - Get/Set general purpose bit flag for entry - - - General purpose bit flag
-
- Bit 0: If set, indicates the file is encrypted
- Bit 1-2 Only used for compression type 6 Imploding, and 8, 9 deflating
- Imploding:
- Bit 1 if set indicates an 8K sliding dictionary was used. If clear a 4k dictionary was used
- Bit 2 if set indicates 3 Shannon-Fanno trees were used to encode the sliding dictionary, 2 otherwise
-
- Deflating:
- Bit 2 Bit 1
- 0 0 Normal compression was used
- 0 1 Maximum compression was used
- 1 0 Fast compression was used
- 1 1 Super fast compression was used
-
- Bit 3: If set, the fields crc-32, compressed size - and uncompressed size are were not able to be written during zip file creation - The correct values are held in a data descriptor immediately following the compressed data.
- Bit 4: Reserved for use by PKZIP for enhanced deflating
- Bit 5: If set indicates the file contains compressed patch data
- Bit 6: If set indicates strong encryption was used.
- Bit 7-10: Unused or reserved
- Bit 11: If set the name and comments for this entry are in unicode.
- Bit 12-15: Unused or reserved
-
- - -
- - - Get/Set index of this entry in Zip file - - This is only valid when the entry is part of a - - - - Get/set offset for use in central header - - - - - Get/Set external file attributes as an integer. - The values of this are operating system dependant see - HostSystem for details - - - - - Get the version made by for this entry or zero if unknown. - The value / 10 indicates the major version number, and - the value mod 10 is the minor version number - - - - - Get a value indicating this entry is for a DOS/Windows system. - - - - - Test the external attributes for this to - see if the external attributes are Dos based (including WINNT and variants) - and match the values - - The attributes to test. - Returns true if the external attributes are known to be DOS/Windows - based and have the same attributes set as the value passed. - - - - Gets the compatability information for the external file attribute - If the external file attributes are compatible with MS-DOS and can be read - by PKZIP for DOS version 2.04g then this value will be zero. Otherwise the value - will be non-zero and identify the host system on which the attributes are compatible. - - - - The values for this as defined in the Zip File format and by others are shown below. The values are somewhat - misleading in some cases as they are not all used as shown. You should consult the relevant documentation - to obtain up to date and correct information. The modified appnote by the infozip group is - particularly helpful as it documents a lot of peculiarities. The document is however a little dated. - - 0 - MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems) - 1 - Amiga - 2 - OpenVMS - 3 - Unix - 4 - VM/CMS - 5 - Atari ST - 6 - OS/2 HPFS - 7 - Macintosh - 8 - Z-System - 9 - CP/M - 10 - Windows NTFS - 11 - MVS (OS/390 - Z/OS) - 12 - VSE - 13 - Acorn Risc - 14 - VFAT - 15 - Alternate MVS - 16 - BeOS - 17 - Tandem - 18 - OS/400 - 19 - OS/X (Darwin) - 99 - WinZip AES - remainder - unused - - - - - - Get minimum Zip feature version required to extract this entry - - - Minimum features are defined as:
- 1.0 - Default value
- 1.1 - File is a volume label
- 2.0 - File is a folder/directory
- 2.0 - File is compressed using Deflate compression
- 2.0 - File is encrypted using traditional encryption
- 2.1 - File is compressed using Deflate64
- 2.5 - File is compressed using PKWARE DCL Implode
- 2.7 - File is a patch data set
- 4.5 - File uses Zip64 format extensions
- 4.6 - File is compressed using BZIP2 compression
- 5.0 - File is encrypted using DES
- 5.0 - File is encrypted using 3DES
- 5.0 - File is encrypted using original RC2 encryption
- 5.0 - File is encrypted using RC4 encryption
- 5.1 - File is encrypted using AES encryption
- 5.1 - File is encrypted using corrected RC2 encryption
- 5.1 - File is encrypted using corrected RC2-64 encryption
- 6.1 - File is encrypted using non-OAEP key wrapping
- 6.2 - Central directory encryption (not confirmed yet)
- 6.3 - File is compressed using LZMA
- 6.3 - File is compressed using PPMD+
- 6.3 - File is encrypted using Blowfish
- 6.3 - File is encrypted using Twofish
-
- -
- - - Get a value indicating whether this entry can be decompressed by the library. - - This is based on the and - wether the compression method is supported. - - - - Force this entry to be recorded using Zip64 extensions. - - - - - Get a value indicating wether Zip64 extensions were forced. - - A value of true if Zip64 extensions have been forced on; false if not. - - - - Gets a value indicating if the entry requires Zip64 extensions - to store the full entry values. - - A value of true if a local header requires Zip64 extensions; false if not. - - - - Get a value indicating wether the central directory entry requires Zip64 extensions to be stored. - - - - - Get/Set DosTime value. - - - The MS-DOS date format can only represent dates between 1/1/1980 and 12/31/2107. - - - - - Gets/Sets the time of last modification of the entry. - - - The property is updated to match this as far as possible. - - - - - Returns the entry name. - - - The unix naming convention is followed. - Path components in the entry should always separated by forward slashes ('/'). - Dos device names like C: should also be removed. - See the class, or - - - - - Gets/Sets the size of the uncompressed data. - - - The size or -1 if unknown. - - Setting the size before adding an entry to an archive can help - avoid compatability problems with some archivers which dont understand Zip64 extensions. - - - - Gets/Sets the size of the compressed data. - - - The compressed entry size or -1 if unknown. - - - - - Gets/Sets the crc of the uncompressed data. - - - Crc is not in the range 0..0xffffffffL - - - The crc value or -1 if unknown. - - - - - Gets/Sets the compression method. Only Deflated and Stored are supported. - - - The compression method for this entry - - - - - - - Gets the compression method for outputting to the local or central header. - Returns same value as CompressionMethod except when AES encrypting, which - places 99 in the method and places the real method in the extra data. - - - - - Gets/Sets the extra data. - - - Extra data is longer than 64KB (0xffff) bytes. - - - Extra data or null if not set. - - - - - For AES encrypted files returns or sets the number of bits of encryption (128, 192 or 256). - When setting, only 0 (off), 128 or 256 is supported. - - - - - AES Encryption strength for storage in extra data in entry header. - 1 is 128 bit, 2 is 192 bit, 3 is 256 bit. - - - - - Returns the length of the salt, in bytes - - - - - Number of extra bytes required to hold the AES Header fields (Salt, Pwd verify, AuthCode) - - - - - Process extra data fields updating the entry based on the contents. - - True if the extra data fields should be handled - for a local header, rather than for a central header. - - - - - Gets/Sets the entry comment. - - - If comment is longer than 0xffff. - - - The comment or null if not set. - - - A comment is only available for entries when read via the class. - The class doesnt have the comment data available. - - - - - Gets a value indicating if the entry is a directory. - however. - - - A directory is determined by an entry name with a trailing slash '/'. - The external file attributes can also indicate an entry is for a directory. - Currently only dos/windows attributes are tested in this manner. - The trailing slash convention should always be followed. - - - - - Get a value of true if the entry appears to be a file; false otherwise - - - This only takes account of DOS/Windows attributes. Other operating systems are ignored. - For linux and others the result may be incorrect. - - - - - Test entry to see if data can be extracted. - - Returns true if data can be extracted for this entry; false otherwise. - - - - Creates a copy of this zip entry. - - An that is a copy of the current instance. - - - - Gets a string representation of this ZipEntry. - - A readable textual representation of this - - - - Test a compression method to see if this library - supports extracting data compressed with that method - - The compression method to test. - Returns true if the compression method is supported; false otherwise - - - - Cleans a name making it conform to Zip file conventions. - Devices names ('c:\') and UNC share names ('\\server\share') are removed - and forward slashes ('\') are converted to back slashes ('/'). - Names are made relative by trimming leading slashes which is compatible - with the ZIP naming convention. - - The name to clean - The 'cleaned' name. - - The Zip name transform class is more flexible. - - - - - Basic implementation of - - - - - Defines the possible values to be used for the . - - - - - Use the recorded LastWriteTime value for the file. - - - - - Use the recorded LastWriteTimeUtc value for the file - - - - - Use the recorded CreateTime value for the file. - - - - - Use the recorded CreateTimeUtc value for the file. - - - - - Use the recorded LastAccessTime value for the file. - - - - - Use the recorded LastAccessTimeUtc value for the file. - - - - - Use a fixed value. - - The actual value used can be - specified via the constructor or - using the with the setting set - to which will use the when this class was constructed. - The property can also be used to set this value. - - - - Initialise a new instance of the class. - - A default , and the LastWriteTime for files is used. - - - - Initialise a new instance of using the specified - - The time setting to use when creating Zip entries. - - - - Initialise a new instance of using the specified - - The time to set all values to. - - - - Get / set the to be used when creating new values. - - - Setting this property to null will cause a default name transform to be used. - - - - - Get / set the in use. - - - - - Get / set the value to use when is set to - - - - - A bitmask defining the attributes to be retrieved from the actual file. - - The default is to get all possible attributes from the actual file. - - - - A bitmask defining which attributes are to be set on. - - By default no attributes are set on. - - - - Get set a value indicating wether unidoce text should be set on. - - - - - Make a new for a file. - - The name of the file to create a new entry for. - Returns a new based on the . - - - - Make a new for a file. - - The name of the file to create a new entry for. - If true entry detail is retrieved from the file system if the file exists. - Returns a new based on the . - - - - Make a new from a name. - - The name of the file to create a new entry for. - An alternative name to be used for the new entry. Null if not applicable. - If true entry detail is retrieved from the file system if the file exists. - Returns a new based on the . - - - - Make a new for a directory. - - The raw untransformed name for the new directory - Returns a new representing a directory. - - - - Make a new for a directory. - - The raw untransformed name for the new directory - If true entry detail is retrieved from the file system if the file exists. - Returns a new representing a directory. - - - - ZipException represents exceptions specific to Zip classes and code. - - - - - Initialise a new instance of . - - - - - Initialise a new instance of with its message string. - - A that describes the error. - - - - Initialise a new instance of . - - A that describes the error. - The that caused this exception. - - - - Initializes a new instance of the ZipException class with serialized data. - - - The System.Runtime.Serialization.SerializationInfo that holds the serialized - object data about the exception being thrown. - - - The System.Runtime.Serialization.StreamingContext that contains contextual information - about the source or destination. - - - - - ExtraData tagged value interface. - - - - - Get the ID for this tagged data value. - - - - - Set the contents of this instance from the data passed. - - The data to extract contents from. - The offset to begin extracting data from. - The number of bytes to extract. - - - - Get the data representing this instance. - - Returns the data for this instance. - - - - A raw binary tagged value - - - - - Initialise a new instance. - - The tag ID. - - - - Get the ID for this tagged data value. - - - - - Set the data from the raw values provided. - - The raw data to extract values from. - The index to start extracting values from. - The number of bytes available. - - - - Get the binary data representing this instance. - - The raw binary data representing this instance. - - - - Get /set the binary data representing this instance. - - The raw binary data representing this instance. - - - - The tag ID for this instance. - - - - - Class representing extended unix date time values. - - - - - Flags indicate which values are included in this instance. - - - - - The modification time is included - - - - - The access time is included - - - - - The create time is included. - - - - - Get the ID - - - - - Set the data from the raw values provided. - - The raw data to extract values from. - The index to start extracting values from. - The number of bytes available. - - - - Get the binary data representing this instance. - - The raw binary data representing this instance. - - - - Test a value to see if is valid and can be represented here. - - The value to test. - Returns true if the value is valid and can be represented; false if not. - The standard Unix time is a signed integer data type, directly encoding the Unix time number, - which is the number of seconds since 1970-01-01. - Being 32 bits means the values here cover a range of about 136 years. - The minimum representable time is 1901-12-13 20:45:52, - and the maximum representable time is 2038-01-19 03:14:07. - - - - - Get /set the Modification Time - - - - - - - Get / set the Access Time - - - - - - - Get / Set the Create Time - - - - - - - Get/set the values to include. - - - - - Class handling NT date time values. - - - - - Get the ID for this tagged data value. - - - - - Set the data from the raw values provided. - - The raw data to extract values from. - The index to start extracting values from. - The number of bytes available. - - - - Get the binary data representing this instance. - - The raw binary data representing this instance. - - - - Test a valuie to see if is valid and can be represented here. - - The value to test. - Returns true if the value is valid and can be represented; false if not. - - NTFS filetimes are 64-bit unsigned integers, stored in Intel - (least significant byte first) byte order. They determine the - number of 1.0E-07 seconds (1/10th microseconds!) past WinNT "epoch", - which is "01-Jan-1601 00:00:00 UTC". 28 May 60056 is the upper limit - - - - - Get/set the last modification time. - - - - - Get /set the create time - - - - - Get /set the last access time. - - - - - A factory that creates tagged data instances. - - - - - Get data for a specific tag value. - - The tag ID to find. - The data to search. - The offset to begin extracting data from. - The number of bytes to extract. - The located value found, or null if not found. - - - - - A class to handle the extra data field for Zip entries - - - Extra data contains 0 or more values each prefixed by a header tag and length. - They contain zero or more bytes of actual data. - The data is held internally using a copy on write strategy. This is more efficient but - means that for extra data created by passing in data can have the values modified by the caller - in some circumstances. - - - - - Initialise a default instance. - - - - - Initialise with known extra data. - - The extra data. - - - - Get the raw extra data value - - Returns the raw byte[] extra data this instance represents. - - - - Clear the stored data. - - - - - Gets the current extra data length. - - - - - Get a read-only for the associated tag. - - The tag to locate data for. - Returns a containing tag data or null if no tag was found. - - - - Get the tagged data for a tag. - - The tag to search for. - Returns a tagged value or null if none found. - - - - Get the length of the last value found by - - This is only valid if has previously returned true. - - - - Get the index for the current read value. - - This is only valid if has previously returned true. - Initially the result will be the index of the first byte of actual data. The value is updated after calls to - , and . - - - - Get the number of bytes remaining to be read for the current value; - - - - - Find an extra data value - - The identifier for the value to find. - Returns true if the value was found; false otherwise. - - - - Add a new entry to extra data. - - The value to add. - - - - Add a new entry to extra data - - The ID for this entry. - The data to add. - If the ID already exists its contents are replaced. - - - - Start adding a new entry. - - Add data using , , , or . - The new entry is completed and actually added by calling - - - - - Add entry data added since using the ID passed. - - The identifier to use for this entry. - - - - Add a byte of data to the pending new entry. - - The byte to add. - - - - - Add data to a pending new entry. - - The data to add. - - - - - Add a short value in little endian order to the pending new entry. - - The data to add. - - - - - Add an integer value in little endian order to the pending new entry. - - The data to add. - - - - - Add a long value in little endian order to the pending new entry. - - The data to add. - - - - - Delete an extra data field. - - The identifier of the field to delete. - Returns true if the field was found and deleted. - - - - Read a long in little endian form from the last found data value - - Returns the long value read. - - - - Read an integer in little endian form from the last found data value. - - Returns the integer read. - - - - Read a short value in little endian form from the last found data value. - - Returns the short value read. - - - - Read a byte from an extra data - - The byte value read or -1 if the end of data has been reached. - - - - Skip data during reading. - - The number of bytes to skip. - - - - Internal form of that reads data at any location. - - Returns the short value read. - - - - Dispose of this instance. - - - - - Arguments used with KeysRequiredEvent - - - - - Initialise a new instance of - - The name of the file for which keys are required. - - - - Initialise a new instance of - - The name of the file for which keys are required. - The current key value. - - - - Gets the name of the file for which keys are required. - - - - - Gets or sets the key value - - - - - The strategy to apply to testing. - - - - - Find the first error only. - - - - - Find all possible errors. - - - - - The operation in progress reported by a during testing. - - TestArchive - - - - Setting up testing. - - - - - Testing an individual entries header - - - - - Testing an individual entries data - - - - - Testing an individual entry has completed. - - - - - Running miscellaneous tests - - - - - Testing is complete - - - - - Status returned returned by during testing. - - TestArchive - - - - Initialise a new instance of - - The this status applies to. - - - - Get the current in progress. - - - - - Get the this status is applicable to. - - - - - Get the current/last entry tested. - - - - - Get the number of errors detected so far. - - - - - Get the number of bytes tested so far for the current entry. - - - - - Get a value indicating wether the last entry test was valid. - - - - - Delegate invoked during testing if supplied indicating current progress and status. - - If the message is non-null an error has occured. If the message is null - the operation as found in status has started. - - - - The possible ways of applying updates to an archive. - - - - - Perform all updates on temporary files ensuring that the original file is saved. - - - - - Update the archive directly, which is faster but less safe. - - - - - This class represents a Zip archive. You can ask for the contained - entries, or get an input stream for a file entry. The entry is - automatically decompressed. - - You can also update the archive adding or deleting entries. - - This class is thread safe for input: You can open input streams for arbitrary - entries in different threads. -
-
Author of the original java version : Jochen Hoenicke -
- - - using System; - using System.Text; - using System.Collections; - using System.IO; - - using ICSharpCode.SharpZipLib.Zip; - - class MainClass - { - static public void Main(string[] args) - { - using (ZipFile zFile = new ZipFile(args[0])) { - Console.WriteLine("Listing of : " + zFile.Name); - Console.WriteLine(""); - Console.WriteLine("Raw Size Size Date Time Name"); - Console.WriteLine("-------- -------- -------- ------ ---------"); - foreach (ZipEntry e in zFile) { - if ( e.IsFile ) { - DateTime d = e.DateTime; - Console.WriteLine("{0, -10}{1, -10}{2} {3} {4}", e.Size, e.CompressedSize, - d.ToString("dd-MM-yy"), d.ToString("HH:mm"), - e.Name); - } - } - } - } - } - - -
- - - Delegate for handling keys/password setting during compresion/decompression. - - - - - Event handler for handling encryption keys. - - - - - Handles getting of encryption keys when required. - - The file for which encryption keys are required. - - - - Get/set the encryption key value. - - - - - Password to be used for encrypting/decrypting files. - - Set to null if no password is required. - - - - Get a value indicating wether encryption keys are currently available. - - - - - Opens a Zip file with the given name for reading. - - The name of the file to open. - The argument supplied is null. - - An i/o error occurs - - - The file doesn't contain a valid zip archive. - - - - - Opens a Zip file reading the given . - - The to read archive data from. - The supplied argument is null. - - An i/o error occurs. - - - The file doesn't contain a valid zip archive. - - - - - Opens a Zip file reading the given . - - The to read archive data from. - true to leave the file open when the ZipFile is disposed, false to dispose of it - The supplied argument is null. - - An i/o error occurs. - - - The file doesn't contain a valid zip archive. - - - - - Opens a Zip file reading the given . - - The to read archive data from. - - An i/o error occurs - - - The stream doesn't contain a valid zip archive.
-
- - The stream doesnt support seeking. - - - The stream argument is null. - -
- - - Opens a Zip file reading the given . - - The to read archive data from. - true to leave the stream open when the ZipFile is disposed, false to dispose of it - - An i/o error occurs - - - The stream doesn't contain a valid zip archive.
-
- - The stream doesnt support seeking. - - - The stream argument is null. - -
- - - Initialises a default instance with no entries and no file storage. - - - - - Finalize this instance. - - - - - Closes the ZipFile. If the stream is owned then this also closes the underlying input stream. - Once closed, no further instance methods should be called. - - - An i/o error occurs. - - - - - Create a new whose data will be stored in a file. - - The name of the archive to create. - Returns the newly created - is null - - - - Create a new whose data will be stored on a stream. - - The stream providing data storage. - Returns the newly created - is null - doesnt support writing. - - - - Get/set a flag indicating if the underlying stream is owned by the ZipFile instance. - If the flag is true then the stream will be closed when Close is called. - - - The default value is true in all cases. - - - - - Get a value indicating wether - this archive is embedded in another file or not. - - - - - Get a value indicating that this archive is a new one. - - - - - Gets the comment for the zip file. - - - - - Gets the name of this zip file. - - - - - Gets the number of entries in this zip file. - - - The Zip file has been closed. - - - - - Get the number of entries contained in this . - - - - - Indexer property for ZipEntries - - - - - Gets an enumerator for the Zip entries in this Zip file. - - Returns an for this archive. - - The Zip file has been closed. - - - - - Return the index of the entry with a matching name - - Entry name to find - If true the comparison is case insensitive - The index position of the matching entry or -1 if not found - - The Zip file has been closed. - - - - - Searches for a zip entry in this archive with the given name. - String comparisons are case insensitive - - - The name to find. May contain directory components separated by slashes ('/'). - - - A clone of the zip entry, or null if no entry with that name exists. - - - The Zip file has been closed. - - - - - Gets an input stream for reading the given zip entry data in an uncompressed form. - Normally the should be an entry returned by GetEntry(). - - The to obtain a data for - An input containing data for this - - The ZipFile has already been closed - - - The compression method for the entry is unknown - - - The entry is not found in the ZipFile - - - - - Creates an input stream reading a zip entry - - The index of the entry to obtain an input stream for. - - An input containing data for this - - - The ZipFile has already been closed - - - The compression method for the entry is unknown - - - The entry is not found in the ZipFile - - - - - Test an archive for integrity/validity - - Perform low level data Crc check - true if all tests pass, false otherwise - Testing will terminate on the first error found. - - - - Test an archive for integrity/validity - - Perform low level data Crc check - The to apply. - The handler to call during testing. - true if all tests pass, false otherwise - The object has already been closed. - - - - Test a local header against that provided from the central directory - - - The entry to test against - - The type of tests to carry out. - The offset of the entries data in the file - - - - The kind of update to apply. - - - - - Get / set the to apply to names when updating. - - - - - Get/set the used to generate values - during updates. - - - - - Get /set the buffer size to be used when updating this zip file. - - - - - Get a value indicating an update has been started. - - - - - Get / set a value indicating how Zip64 Extension usage is determined when adding entries. - - - - - Begin updating this archive. - - The archive storage for use during the update. - The data source to utilise during updating. - ZipFile has been closed. - One of the arguments provided is null - ZipFile has been closed. - - - - Begin updating to this archive. - - The storage to use during the update. - - - - Begin updating this archive. - - - - - - - - Commit current updates, updating this archive. - - - - ZipFile has been closed. - - - - Abort updating leaving the archive unchanged. - - - - - - - Set the file comment to be recorded when the current update is commited. - - The comment to record. - ZipFile has been closed. - - - - Add a new entry to the archive. - - The name of the file to add. - The compression method to use. - Ensure Unicode text is used for name and comment for this entry. - Argument supplied is null. - ZipFile has been closed. - Compression method is not supported. - - - - Add a new entry to the archive. - - The name of the file to add. - The compression method to use. - ZipFile has been closed. - The compression method is not supported. - - - - Add a file to the archive. - - The name of the file to add. - Argument supplied is null. - - - - Add a file to the archive. - - The name of the file to add. - The name to use for the on the Zip file created. - Argument supplied is null. - - - - Add a file entry with data. - - The source of the data for this entry. - The name to give to the entry. - - - - Add a file entry with data. - - The source of the data for this entry. - The name to give to the entry. - The compression method to use. - - - - Add a file entry with data. - - The source of the data for this entry. - The name to give to the entry. - The compression method to use. - Ensure Unicode text is used for name and comments for this entry. - - - - Add a that contains no data. - - The entry to add. - This can be used to add directories, volume labels, or empty file entries. - - - - Add a with data. - - The source of the data for this entry. - The entry to add. - This can be used to add file entries with a custom data source. - - - - Add a directory entry to the archive. - - The directory to add. - - - - Delete an entry by name - - The filename to delete - True if the entry was found and deleted; false otherwise. - - - - Delete a from the archive. - - The entry to delete. - - - - Write an unsigned short in little endian byte order. - - - - - Write an int in little endian byte order. - - - - - Write an unsigned int in little endian byte order. - - - - - Write a long in little endian byte order. - - - - - Get a raw memory buffer. - - Returns a raw memory buffer. - - - - Get the size of the source descriptor for a . - - The update to get the size for. - The descriptor size, zero if there isnt one. - - - - Get an output stream for the specified - - The entry to get an output stream for. - The output stream obtained for the entry. - - - - Class used to sort updates. - - - - - Compares two objects and returns a value indicating whether one is - less than, equal to or greater than the other. - - First object to compare - Second object to compare. - Compare result. - - - - Represents a pending update to a Zip file. - - - - - Copy an existing entry. - - The existing entry to copy. - - - - Get the for this update. - - This is the source or original entry. - - - - Get the that will be written to the updated/new file. - - - - - Get the command for this update. - - - - - Get the filename if any for this update. Null if none exists. - - - - - Get/set the location of the size patch for this update. - - - - - Get /set the location of the crc patch for this update. - - - - - Get/set the size calculated by offset. - Specifically, the difference between this and next entry's starting offset. - - - - - Releases the unmanaged resources used by the this instance and optionally releases the managed resources. - - true to release both managed and unmanaged resources; - false to release only unmanaged resources. - - - - Read an unsigned short in little endian byte order. - - Returns the value read. - - The stream ends prematurely - - - - - Read a uint in little endian byte order. - - Returns the value read. - - An i/o error occurs. - - - The file ends prematurely - - - - - Search for and read the central directory of a zip file filling the entries array. - - - An i/o error occurs. - - - The central directory is malformed or cannot be found - - - - - Locate the data for a given entry. - - - The start offset of the data. - - - The stream ends prematurely - - - The local header signature is invalid, the entry and central header file name lengths are different - or the local and entry compression methods dont match - - - - - Represents a string from a which is stored as an array of bytes. - - - - - Initialise a with a string. - - The textual string form. - - - - Initialise a using a string in its binary 'raw' form. - - - - - - Get a value indicating the original source of data for this instance. - True if the source was a string; false if the source was binary data. - - - - - Get the length of the comment when represented as raw bytes. - - - - - Get the comment in its 'raw' form as plain bytes. - - - - - Reset the comment to its initial state. - - - - - Implicit conversion of comment to a string. - - The to convert to a string. - The textual equivalent for the input value. - - - - An enumerator for Zip entries - - - - - An is a stream that you can write uncompressed data - to and flush, but cannot read, seek or do anything else to. - - - - - Gets a value indicating whether the current stream supports reading. - - - - - Write any buffered data to underlying storage. - - - - - Gets a value indicating whether the current stream supports writing. - - - - - Gets a value indicating whether the current stream supports seeking. - - - - - Get the length in bytes of the stream. - - - - - Gets or sets the position within the current stream. - - - - - Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. - - An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - - The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - - The sum of offset and count is larger than the buffer length. - Methods were called after the stream was closed. - The stream does not support reading. - buffer is null. - An I/O error occurs. - offset or count is negative. - - - - Sets the position within the current stream. - - A byte offset relative to the origin parameter. - A value of type indicating the reference point used to obtain the new position. - - The new position within the current stream. - - An I/O error occurs. - The stream does not support seeking, such as if the stream is constructed from a pipe or console output. - Methods were called after the stream was closed. - - - - Sets the length of the current stream. - - The desired length of the current stream in bytes. - The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. - An I/O error occurs. - Methods were called after the stream was closed. - - - - Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. - - An array of bytes. This method copies count bytes from buffer to the current stream. - The zero-based byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - An I/O error occurs. - The stream does not support writing. - Methods were called after the stream was closed. - buffer is null. - The sum of offset and count is greater than the buffer length. - offset or count is negative. - - - - A is an - whose data is only a part or subsection of a file. - - - - - Initialise a new instance of the class. - - The containing the underlying stream to use for IO. - The start of the partial data. - The length of the partial data. - - - - Read a byte from this stream. - - Returns the byte read or -1 on end of stream. - - - - Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. - - An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - - The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - - The sum of offset and count is larger than the buffer length. - Methods were called after the stream was closed. - The stream does not support reading. - buffer is null. - An I/O error occurs. - offset or count is negative. - - - - Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. - - An array of bytes. This method copies count bytes from buffer to the current stream. - The zero-based byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - An I/O error occurs. - The stream does not support writing. - Methods were called after the stream was closed. - buffer is null. - The sum of offset and count is greater than the buffer length. - offset or count is negative. - - - - When overridden in a derived class, sets the length of the current stream. - - The desired length of the current stream in bytes. - The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. - An I/O error occurs. - Methods were called after the stream was closed. - - - - When overridden in a derived class, sets the position within the current stream. - - A byte offset relative to the origin parameter. - A value of type indicating the reference point used to obtain the new position. - - The new position within the current stream. - - An I/O error occurs. - The stream does not support seeking, such as if the stream is constructed from a pipe or console output. - Methods were called after the stream was closed. - - - - Clears all buffers for this stream and causes any buffered data to be written to the underlying device. - - An I/O error occurs. - - - - Gets or sets the position within the current stream. - - - The current position within the stream. - An I/O error occurs. - The stream does not support seeking. - Methods were called after the stream was closed. - - - - Gets the length in bytes of the stream. - - - A long value representing the length of the stream in bytes. - A class derived from Stream does not support seeking. - Methods were called after the stream was closed. - - - - Gets a value indicating whether the current stream supports writing. - - false - true if the stream supports writing; otherwise, false. - - - - Gets a value indicating whether the current stream supports seeking. - - true - true if the stream supports seeking; otherwise, false. - - - - Gets a value indicating whether the current stream supports reading. - - true. - true if the stream supports reading; otherwise, false. - - - - Gets a value that determines whether the current stream can time out. - - - A value that determines whether the current stream can time out. - - - - Provides a static way to obtain a source of data for an entry. - - - - - Get a source of data by creating a new stream. - - Returns a to use for compression input. - Ideally a new stream is created and opened to achieve this, to avoid locking problems. - - - - Represents a source of data that can dynamically provide - multiple data sources based on the parameters passed. - - - - - Get a data source. - - The to get a source for. - The name for data if known. - Returns a to use for compression input. - Ideally a new stream is created and opened to achieve this, to avoid locking problems. - - - - Default implementation of a for use with files stored on disk. - - - - - Initialise a new instnace of - - The name of the file to obtain data from. - - - - Get a providing data. - - Returns a provising data. - - - - Default implementation of for files stored on disk. - - - - - Get a providing data for an entry. - - The entry to provide data for. - The file name for data if known. - Returns a stream providing data; or null if not available - - - - Defines facilities for data storage when updating Zip Archives. - - - - - Get the to apply during updates. - - - - - Get an empty that can be used for temporary output. - - Returns a temporary output - - - - - Convert a temporary output stream to a final stream. - - The resulting final - - - - - Make a temporary copy of the original stream. - - The to copy. - Returns a temporary output that is a copy of the input. - - - - Return a stream suitable for performing direct updates on the original source. - - The current stream. - Returns a stream suitable for direct updating. - This may be the current stream passed. - - - - Dispose of this instance. - - - - - An abstract suitable for extension by inheritance. - - - - - Initializes a new instance of the class. - - The update mode. - - - - Gets a temporary output - - Returns the temporary output stream. - - - - - Converts the temporary to its final form. - - Returns a that can be used to read - the final storage for the archive. - - - - - Make a temporary copy of a . - - The to make a copy of. - Returns a temporary output that is a copy of the input. - - - - Return a stream suitable for performing direct updates on the original source. - - The to open for direct update. - Returns a stream suitable for direct updating. - - - - Disposes this instance. - - - - - Gets the update mode applicable. - - The update mode. - - - - An implementation suitable for hard disks. - - - - - Initializes a new instance of the class. - - The file. - The update mode. - - - - Initializes a new instance of the class. - - The file. - - - - Gets a temporary output for performing updates on. - - Returns the temporary output stream. - - - - Converts a temporary to its final form. - - Returns a that can be used to read - the final storage for the archive. - - - - Make a temporary copy of a stream. - - The to copy. - Returns a temporary output that is a copy of the input. - - - - Return a stream suitable for performing direct updates on the original source. - - The current stream. - Returns a stream suitable for direct updating. - If the is not null this is used as is. - - - - Disposes this instance. - - - - - An implementation suitable for in memory streams. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The to use - This constructor is for testing as memory streams dont really require safe mode. - - - - Get the stream returned by if this was in fact called. - - - - - Gets the temporary output - - Returns the temporary output stream. - - - - Converts the temporary to its final form. - - Returns a that can be used to read - the final storage for the archive. - - - - Make a temporary copy of the original stream. - - The to copy. - Returns a temporary output that is a copy of the input. - - - - Return a stream suitable for performing direct updates on the original source. - - The original source stream - Returns a stream suitable for direct updating. - If the passed is not null this is used; - otherwise a new is returned. - - - - Disposes this instance. - - - - - Holds data pertinent to a data descriptor. - - - - - Get /set the compressed size of data. - - - - - Get / set the uncompressed size of data - - - - - Get /set the crc value. - - - - - This class assists with writing/reading from Zip files. - - - - - Initialise an instance of this class. - - The name of the file to open. - - - - Initialise a new instance of . - - The stream to use. - - - - Get / set a value indicating wether the the underlying stream is owned or not. - - If the stream is owned it is closed when this instance is closed. - - - - Close the stream. - - - The underlying stream is closed only if is true. - - - - - Locates a block with the desired . - - The signature to find. - Location, marking the end of block. - Minimum size of the block. - The maximum variable data. - Eeturns the offset of the first byte after the signature; -1 if not found - - - - Write Zip64 end of central directory records (File header and locator). - - The number of entries in the central directory. - The size of entries in the central directory. - The offset of the dentral directory. - - - - Write the required records to end the central directory. - - The number of entries in the directory. - The size of the entries in the directory. - The start of the central directory. - The archive comment. (This can be null). - - - - Read an unsigned short in little endian byte order. - - Returns the value read. - - An i/o error occurs. - - - The file ends prematurely - - - - - Read an int in little endian byte order. - - Returns the value read. - - An i/o error occurs. - - - The file ends prematurely - - - - - Read a long in little endian byte order. - - The value read. - - - - Write an unsigned short in little endian byte order. - - The value to write. - - - - Write a ushort in little endian byte order. - - The value to write. - - - - Write an int in little endian byte order. - - The value to write. - - - - Write a uint in little endian byte order. - - The value to write. - - - - Write a long in little endian byte order. - - The value to write. - - - - Write a ulong in little endian byte order. - - The value to write. - - - - Write a data descriptor. - - The entry to write a descriptor for. - Returns the number of descriptor bytes written. - - - - Read data descriptor at the end of compressed data. - - if set to true [zip64]. - The data to fill in. - Returns the number of bytes read in the descriptor. - - - - This is an InflaterInputStream that reads the files baseInputStream an zip archive - one after another. It has a special method to get the zip entry of - the next file. The zip entry contains information about the file name - size, compressed size, Crc, etc. - It includes support for Stored and Deflated entries. -
-
Author of the original java version : Jochen Hoenicke -
- - This sample shows how to read a zip file - - using System; - using System.Text; - using System.IO; - - using ICSharpCode.SharpZipLib.Zip; - - class MainClass - { - public static void Main(string[] args) - { - using ( ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) { - - ZipEntry theEntry; - const int size = 2048; - byte[] data = new byte[2048]; - - while ((theEntry = s.GetNextEntry()) != null) { - if ( entry.IsFile ) { - Console.Write("Show contents (y/n) ?"); - if (Console.ReadLine() == "y") { - while (true) { - size = s.Read(data, 0, data.Length); - if (size > 0) { - Console.Write(new ASCIIEncoding().GetString(data, 0, size)); - } else { - break; - } - } - } - } - } - } - } - } - - -
- - - Delegate for reading bytes from a stream. - - - - - The current reader this instance. - - - - - Creates a new Zip input stream, for reading a zip archive. - - The underlying providing data. - - - - Creates a new Zip input stream, for reading a zip archive. - - The underlying providing data. - Size of the buffer. - - - - Optional password used for encryption when non-null - - A password for all encrypted entries in this - - - - Gets a value indicating if there is a current entry and it can be decompressed - - - The entry can only be decompressed if the library supports the zip features required to extract it. - See the ZipEntry Version property for more details. - - - - - Advances to the next entry in the archive - - - The next entry in the archive or null if there are no more entries. - - - If the previous entry is still open CloseEntry is called. - - - Input stream is closed - - - Password is not set, password is invalid, compression method is invalid, - version required to extract is not supported - - - - - Read data descriptor at the end of compressed data. - - - - - Complete cleanup as the final part of closing. - - True if the crc value should be tested - - - - Closes the current zip entry and moves to the next one. - - - The stream is closed - - - The Zip stream ends early - - - - - Returns 1 if there is an entry available - Otherwise returns 0. - - - - - Returns the current size that can be read from the current entry if available - - Thrown if the entry size is not known. - Thrown if no entry is currently available. - - - - Reads a byte from the current zip entry. - - - The byte or -1 if end of stream is reached. - - - - - Handle attempts to read by throwing an . - - The destination array to store data in. - The offset at which data read should be stored. - The maximum number of bytes to read. - Returns the number of bytes actually read. - - - - Handle attempts to read from this entry by throwing an exception - - - - - Perform the initial read on an entry which may include - reading encryption headers and setting up inflation. - - The destination to fill with data read. - The offset to start reading at. - The maximum number of bytes to read. - The actual number of bytes read. - - - - Read a block of bytes from the stream. - - The destination for the bytes. - The index to start storing data. - The number of bytes to attempt to read. - Returns the number of bytes read. - Zero bytes read means end of stream. - - - - Reads a block of bytes from the current zip entry. - - - The number of bytes read (this may be less than the length requested, even before the end of stream), or 0 on end of stream. - - - An i/o error occured. - - - The deflated stream is corrupted. - - - The stream is not open. - - - - - Closes the zip input stream - - - - - ZipNameTransform transforms names as per the Zip file naming convention. - - The use of absolute names is supported although its use is not valid - according to Zip naming conventions, and should not be used if maximum compatability is desired. - - - - Initialize a new instance of - - - - - Initialize a new instance of - - The string to trim from the front of paths if found. - - - - Static constructor. - - - - - Transform a windows directory name according to the Zip file naming conventions. - - The directory name to transform. - The transformed name. - - - - Transform a windows file name according to the Zip file naming conventions. - - The file name to transform. - The transformed name. - - - - Get/set the path prefix to be trimmed from paths if present. - - The prefix is trimmed before any conversion from - a windows path is done. - - - - Force a name to be valid by replacing invalid characters with a fixed value - - The name to force valid - The replacement character to use. - Returns a valid name - - - - Test a name to see if it is a valid name for a zip entry. - - The name to test. - If true checking is relaxed about windows file names and absolute paths. - Returns true if the name is a valid zip name; false otherwise. - Zip path names are actually in Unix format, and should only contain relative paths. - This means that any path stored should not contain a drive or - device letter, or a leading slash. All slashes should forward slashes '/'. - An empty name is valid for a file where the input comes from standard input. - A null name is not considered valid. - - - - - Test a name to see if it is a valid name for a zip entry. - - The name to test. - Returns true if the name is a valid zip name; false otherwise. - Zip path names are actually in unix format, - and should only contain relative paths if a path is present. - This means that the path stored should not contain a drive or - device letter, or a leading slash. All slashes should forward slashes '/'. - An empty name is valid where the input comes from standard input. - A null name is not considered valid. - - - - - This is a DeflaterOutputStream that writes the files into a zip - archive one after another. It has a special method to start a new - zip entry. The zip entries contains information about the file name - size, compressed size, CRC, etc. - - It includes support for Stored and Deflated entries. - This class is not thread safe. -
-
Author of the original java version : Jochen Hoenicke -
- This sample shows how to create a zip file - - using System; - using System.IO; - - using ICSharpCode.SharpZipLib.Core; - using ICSharpCode.SharpZipLib.Zip; - - class MainClass - { - public static void Main(string[] args) - { - string[] filenames = Directory.GetFiles(args[0]); - byte[] buffer = new byte[4096]; - - using ( ZipOutputStream s = new ZipOutputStream(File.Create(args[1])) ) { - - s.SetLevel(9); // 0 - store only to 9 - means best compression - - foreach (string file in filenames) { - ZipEntry entry = new ZipEntry(file); - s.PutNextEntry(entry); - - using (FileStream fs = File.OpenRead(file)) { - StreamUtils.Copy(fs, s, buffer); - } - } - } - } - } - - -
- - - Creates a new Zip output stream, writing a zip archive. - - - The output stream to which the archive contents are written. - - - - - Creates a new Zip output stream, writing a zip archive. - - The output stream to which the archive contents are written. - Size of the buffer to use. - - - - Gets a flag value of true if the central header has been added for this archive; false if it has not been added. - - No further entries can be added once this has been done. - - - - Set the zip file comment. - - - The comment text for the entire archive. - - - The converted comment is longer than 0xffff bytes. - - - - - Sets the compression level. The new level will be activated - immediately. - - The new compression level (1 to 9). - - Level specified is not supported. - - - - - - Get the current deflater compression level - - The current compression level - - - - Get / set a value indicating how Zip64 Extension usage is determined when adding entries. - - Older archivers may not understand Zip64 extensions. - If backwards compatability is an issue be careful when adding entries to an archive. - Setting this property to off is workable but less desirable as in those circumstances adding a file - larger then 4GB will fail. - - - - Write an unsigned short in little endian byte order. - - - - - Write an int in little endian byte order. - - - - - Write an int in little endian byte order. - - - - - Starts a new Zip entry. It automatically closes the previous - entry if present. - All entry elements bar name are optional, but must be correct if present. - If the compression method is stored and the output is not patchable - the compression for that entry is automatically changed to deflate level 0 - - - the entry. - - - if entry passed is null. - - - if an I/O error occured. - - - if stream was finished - - - Too many entries in the Zip file
- Entry name is too long
- Finish has already been called
-
-
- - - Closes the current entry, updating header and footer information as required - - - An I/O error occurs. - - - No entry is active. - - - - - Writes the given buffer to the current entry. - - The buffer containing data to write. - The offset of the first byte to write. - The number of bytes to write. - Archive size is invalid - No entry is active. - - - - Finishes the stream. This will write the central directory at the - end of the zip file and flush the stream. - - - This is automatically called when the stream is closed. - - - An I/O error occurs. - - - Comment exceeds the maximum length
- Entry name exceeds the maximum length -
-
- - - The entries for the archive. - - - - - Used to track the crc of data added to entries. - - - - - The current entry being added. - - - - - Used to track the size of data for an entry during writing. - - - - - Offset to be recorded for each entry in the central header. - - - - - Comment for the entire archive recorded in central header. - - - - - Flag indicating that header patching is required for the current entry. - - - - - Position to patch crc - - - - - Position to patch size. - - - - - This static class contains functions for encoding and decoding zip file strings - - - - Code page backing field - - The original Zip specification (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) states - that file names should only be encoded with IBM Code Page 437 or UTF-8. - In practice, most zip apps use OEM or system encoding (typically cp437 on Windows). - Let's be good citizens and default to UTF-8 http://utf8everywhere.org/ - - - - Automatically select codepage while opening archive - see https://github.com/icsharpcode/SharpZipLib/pull/280#issuecomment-433608324 - - - - - Encoding used for string conversion. Setting this to 65001 (UTF-8) will - also set the Language encoding flag to indicate UTF-8 encoded file names. - - - - - Attempt to get the operating system default codepage, or failing that, to - the fallback code page IBM 437. - - - - - Get wether the default codepage is set to UTF-8. Setting this property to false will - set the to - - - /// Get OEM codepage from NetFX, which parses the NLP file with culture info table etc etc. - But sometimes it yields the special value of 1 which is nicknamed CodePageNoOEM in sources (might also mean CP_OEMCP, but Encoding puts it so). - This was observed on Ukranian and Hindu systems. - Given this value, throws an . - So replace it with , (IBM 437 which is the default code page in a default Windows installation console. - - - - - Convert a portion of a byte array to a string using - - - Data to convert to string - - - Number of bytes to convert starting from index 0 - - - data[0]..data[count - 1] converted to a string - - - - - Convert a byte array to a string using - - - Byte array to convert - - - dataconverted to a string - - - - - Convert a byte array to a string using - - The applicable general purpose bits flags - - Byte array to convert - - The number of bytes to convert. - - dataconverted to a string - - - - - Convert a byte array to a string using - - - Byte array to convert - - The applicable general purpose bits flags - - dataconverted to a string - - - - - Convert a string to a byte array using - - - String to convert to an array - - Converted array - - - - Convert a string to a byte array using - - The applicable general purpose bits flags - - String to convert to an array - - Converted array - -
-
diff --git a/Assets/TEngine/Config~/Tools/excel2json/Newtonsoft.Json.dll b/Assets/TEngine/Config~/Tools/excel2json/Newtonsoft.Json.dll deleted file mode 100644 index e4a63399..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/Newtonsoft.Json.dll and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/Newtonsoft.Json.xml b/Assets/TEngine/Config~/Tools/excel2json/Newtonsoft.Json.xml deleted file mode 100644 index aa245c5e..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/Newtonsoft.Json.xml +++ /dev/null @@ -1,11262 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a BSON Oid (object id). - - - - - Gets or sets the value of the Oid. - - The value of the Oid. - - - - Initializes a new instance of the class. - - The Oid value. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data. - - - - - Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary. - - - true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. - - - - - Gets or sets a value indicating whether the root object will be read as a JSON array. - - - true if the root object will be read as a JSON array; otherwise, false. - - - - - Gets or sets the used when reading values from BSON. - - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the reader's state to . - If is set to true, the underlying is also closed. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data. - - - - - Gets or sets the used when writing values to BSON. - When set to no conversion will occur. - - The used when writing values to BSON. - - - - Initializes a new instance of the class. - - The to write to. - - - - Initializes a new instance of the class. - - The to write to. - - - - Flushes whatever is in the buffer to the underlying and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes the beginning of a JSON array. - - - - - Writes the beginning of a JSON object. - - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Closes this writer. - If is set to true, the underlying is also closed. - If is set to true, the JSON is auto-completed. - - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value that represents a BSON object id. - - The Object ID value to write. - - - - Writes a BSON regex. - - The regex pattern. - The regex options. - - - - Specifies how constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a parameterized constructor. - - - - - Converts a binary value to and from a base 64 string value. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Creates a custom object. - - The object type to convert. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Creates an object which will then be populated by the serializer. - - Type of the object. - The created object. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Provides a base class for converting a to and from JSON. - - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a F# discriminated union type to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an Entity Framework to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z"). - - - - - Gets or sets the date time styles used when converting a date to and from JSON. - - The date time styles used when converting a date to and from JSON. - - - - Gets or sets the date time format used when converting a date to and from JSON. - - The date time format used when converting a date to and from JSON. - - - - Gets or sets the culture used when converting a date to and from JSON. - - The culture used when converting a date to and from JSON. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from its name string value. - - - - - Gets or sets a value indicating whether the written enum text should be camel case. - The default value is false. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets the naming strategy used to resolve how enum text is written. - - The naming strategy used to resolve how enum text is written. - - - - Gets or sets a value indicating whether integer values are allowed when serializing and deserializing. - The default value is true. - - true if integers are allowed when serializing and deserializing; otherwise, false. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - true if the written enum text will be camel case; otherwise, false. - - - - Initializes a new instance of the class. - - The naming strategy used to resolve how enum text is written. - true if integers are allowed when serializing and deserializing; otherwise, false. - - - - Initializes a new instance of the class. - - The of the used to write enum text. - - - - Initializes a new instance of the class. - - The of the used to write enum text. - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - - Initializes a new instance of the class. - - The of the used to write enum text. - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - true if integers are allowed when serializing and deserializing; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from Unix epoch time - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts a to and from a string (e.g. "1.2.3.4"). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts XML to and from JSON. - - - - - Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements. - - The name of the deserialized root element. - - - - Gets or sets a value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - true if the array attribute is written to the XML; otherwise, false. - - - - Gets or sets a value indicating whether to write the root JSON object. - - true if the JSON root object is omitted; otherwise, false. - - - - Gets or sets a value indicating whether to encode special characters when converting JSON to XML. - If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify - XML namespaces, attributes or processing directives. Instead special characters are encoded and written - as part of the XML element name. - - true if special characters are encoded; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The calling serializer. - The value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Checks if the is a namespace attribute. - - Attribute name to test. - The attribute name prefix if it has one, otherwise an empty string. - true if attribute name is for a namespace attribute, otherwise false. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Specifies how dates are formatted when writing JSON text. - - - - - Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". - - - - - Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". - - - - - Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. - - - - - Date formatted strings are not parsed to a date type and are read as strings. - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Specifies how to treat the time value when converting between string and . - - - - - Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. - - - - - Treat as a UTC. If the object represents a local time, it is converted to a UTC. - - - - - Treat as a local time if a is being converted to a string. - If a string is being converted to , convert to a local time if a time zone is specified. - - - - - Time zone information should be preserved when converting. - - - - - The default JSON name table implementation. - - - - - Initializes a new instance of the class. - - - - - Gets a string containing the same characters as the specified range of characters in the given array. - - The character array containing the name to find. - The zero-based index into the array specifying the first character of the name. - The number of characters in the name. - A string containing the same characters as the specified range of characters in the given array. - - - - Adds the specified string into name table. - - The string to add. - This method is not thread-safe. - The resolved string. - - - - Specifies default value handling options for the . - - - - - - - - - Include members where the member value is the same as the member's default value when serializing objects. - Included members are written to JSON. Has no effect when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - so that it is not written to JSON. - This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, - decimals and floating point numbers; and false for booleans). The default value ignored can be changed by - placing the on the property. - - - - - Members with a default value but no JSON will be set to their default value when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - and set members to their default value when deserializing. - - - - - Specifies float format handling options when writing special floating point numbers, e.g. , - and with . - - - - - Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". - - - - - Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. - Note that this will produce non-valid JSON. - - - - - Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property. - - - - - Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Floating point numbers are parsed to . - - - - - Floating point numbers are parsed to . - - - - - Specifies formatting options for the . - - - - - No special formatting is applied. This is the default. - - - - - Causes child objects to be indented according to the and settings. - - - - - Provides an interface for using pooled arrays. - - The array type content. - - - - Rent an array from the pool. This array must be returned when it is no longer needed. - - The minimum required length of the array. The returned array may be longer. - The rented array from the pool. This array must be returned when it is no longer needed. - - - - Return an array to the pool. - - The array that is being returned. - - - - Provides an interface to enable a class to return line and position information. - - - - - Gets a value indicating whether the class can return line information. - - - true if and can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, when returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, when returns false). - - - - Instructs the how to serialize the collection. - - - - - Gets or sets a value indicating whether null items are allowed in the collection. - - true if null items are allowed in the collection; otherwise, false. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with a flag indicating whether the array can contain null items. - - A flag indicating whether the array can contain null items. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - Instructs the how to serialize the object. - - - - - Gets or sets the id. - - The id. - - - - Gets or sets the title. - - The title. - - - - Gets or sets the description. - - The description. - - - - Gets or sets the collection's items converter. - - The collection's items converter. - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets the of the . - - The of the . - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets a value that indicates whether to preserve object references. - - - true to keep object reference; otherwise, false. The default is false. - - - - - Gets or sets a value that indicates whether to preserve collection's items references. - - - true to keep collection's items object references; otherwise, false. The default is false. - - - - - Gets or sets the reference loop handling used when serializing the collection's items. - - The reference loop handling. - - - - Gets or sets the type name handling used when serializing the collection's items. - - The type name handling. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Provides methods for converting between .NET types and JSON types. - - - - - - - - Gets or sets a function that creates default . - Default settings are automatically used by serialization methods on , - and and on . - To serialize without using any default settings create a with - . - - - - - Represents JavaScript's boolean value true as a string. This field is read-only. - - - - - Represents JavaScript's boolean value false as a string. This field is read-only. - - - - - Represents JavaScript's null as a string. This field is read-only. - - - - - Represents JavaScript's undefined as a string. This field is read-only. - - - - - Represents JavaScript's positive infinity as a string. This field is read-only. - - - - - Represents JavaScript's negative infinity as a string. This field is read-only. - - - - - Represents JavaScript's NaN as a string. This field is read-only. - - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - The time zone handling when the date is converted to a string. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - The string escape handling. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Serializes the specified object to a JSON string. - - The object to serialize. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using formatting. - - The object to serialize. - Indicates how the output should be formatted. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - A collection of converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using formatting and a collection of . - - The object to serialize. - Indicates how the output should be formatted. - A collection of converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a type, formatting and . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be used. - - The type of the value being serialized. - This parameter is used when is to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using formatting and . - - The object to serialize. - Indicates how the output should be formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a type, formatting and . - - The object to serialize. - Indicates how the output should be formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - The type of the value being serialized. - This parameter is used when is to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - A JSON string representation of the object. - - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - The deserialized object from the JSON string. - - - - Deserializes the JSON to a .NET object using . - - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The of object being deserialized. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the given anonymous type. - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be inferred from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the given anonymous type using . - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be inferred from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the specified .NET type using a collection of . - - The type of the object to deserialize to. - The JSON to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using . - - The type of the object to deserialize to. - The object to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using a collection of . - - The JSON to deserialize. - The type of the object to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using . - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - - - Populates the object with values from the JSON string using . - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - - - Serializes the to a JSON string. - - The node to serialize. - A JSON string of the . - - - - Serializes the to a JSON string using formatting. - - The node to serialize. - Indicates how the output should be formatted. - A JSON string of the . - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output should be formatted. - Omits writing the root object. - A JSON string of the . - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by - and writes a Json.NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by , - writes a Json.NET array attribute for collections, and encodes special characters. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - - A value to indicate whether to encode special characters when converting JSON to XML. - If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify - XML namespaces, attributes or processing directives. Instead special characters are encoded and written - as part of the XML element name. - - The deserialized . - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the . - - - - Serializes the to a JSON string using formatting. - - The node to convert to JSON. - Indicates how the output should be formatted. - A JSON string of the . - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output should be formatted. - Omits writing the root object. - A JSON string of the . - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by - and writes a Json.NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by , - writes a Json.NET array attribute for collections, and encodes special characters. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - - A value to indicate whether to encode special characters when converting JSON to XML. - If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify - XML namespaces, attributes or processing directives. Instead special characters are encoded and written - as part of the XML element name. - - The deserialized . - - - - Converts an object to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can read JSON. - - true if this can read JSON; otherwise, false. - - - - Gets a value indicating whether this can write JSON. - - true if this can write JSON; otherwise, false. - - - - Converts an object to and from JSON. - - The object type to convert. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. If there is no existing value then null will be used. - The existing value has a value. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Instructs the to use the specified when serializing the member or class. - - - - - Gets the of the . - - The of the . - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - - - - - Initializes a new instance of the class. - - Type of the . - - - - Initializes a new instance of the class. - - Type of the . - Parameter list to use when constructing the . Can be null. - - - - Represents a collection of . - - - - - Instructs the how to serialize the collection. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - The exception thrown when an error occurs during JSON serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Instructs the to deserialize properties with no matching class member into the specified collection - and write values during serialization. - - - - - Gets or sets a value that indicates whether to write extension data when serializing the object. - - - true to write extension data when serializing the object; otherwise, false. The default is true. - - - - - Gets or sets a value that indicates whether to read extension data when deserializing the object. - - - true to read extension data when deserializing the object; otherwise, false. The default is true. - - - - - Initializes a new instance of the class. - - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - Base class for a table of atomized string objects. - - - - - Gets a string containing the same characters as the specified range of characters in the given array. - - The character array containing the name to find. - The zero-based index into the array specifying the first character of the name. - The number of characters in the name. - A string containing the same characters as the specified range of characters in the given array. - - - - Instructs the how to serialize the object. - - - - - Gets or sets the member serialization. - - The member serialization. - - - - Gets or sets the missing member handling used when deserializing this object. - - The missing member handling. - - - - Gets or sets how the object's properties with null values are handled during serialization and deserialization. - - How the object's properties with null values are handled during serialization and deserialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified member serialization. - - The member serialization. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Instructs the to always serialize the member with the specified name. - - - - - Gets or sets the type used when serializing the property's collection items. - - The collection's items type. - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets the of the . - - The of the . - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets the null value handling used when serializing this property. - - The null value handling. - - - - Gets or sets the default value handling used when serializing this property. - - The default value handling. - - - - Gets or sets the reference loop handling used when serializing this property. - - The reference loop handling. - - - - Gets or sets the object creation handling used when deserializing this property. - - The object creation handling. - - - - Gets or sets the type name handling used when serializing this property. - - The type name handling. - - - - Gets or sets whether this property's value is serialized as a reference. - - Whether this property's value is serialized as a reference. - - - - Gets or sets the order of serialization of a member. - - The numeric order of serialization. - - - - Gets or sets a value indicating whether this property is required. - - - A value indicating whether this property is required. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified name. - - Name of the property. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Asynchronously reads the next JSON token from the source. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns true if the next token was read successfully; false if there are no more tokens to read. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously skips the children of the current token. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a []. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the []. This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Specifies the state of the reader. - - - - - A read method has not been called. - - - - - The end of the file has been reached successfully. - - - - - Reader is at a property. - - - - - Reader is at the start of an object. - - - - - Reader is in an object. - - - - - Reader is at the start of an array. - - - - - Reader is in an array. - - - - - The method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader is in a constructor. - - - - - An error occurred that prevents the read operation from continuing. - - - - - The end of the file has been reached successfully. - - - - - Gets the current reader state. - - The current reader state. - - - - Gets or sets a value indicating whether the source should be closed when this reader is closed. - - - true to close the source when this reader is closed; otherwise false. The default is true. - - - - - Gets or sets a value indicating whether multiple pieces of JSON content can - be read from a continuous stream without erroring. - - - true to support reading multiple pieces of JSON content; otherwise false. - The default is false. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - Gets or sets how time zones are handled when reading JSON. - - - - - Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Gets or sets how custom date formatted strings are parsed when reading JSON. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets the type of the current JSON token. - - - - - Gets the text value of the current JSON token. - - - - - Gets the .NET type for the current JSON token. - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Initializes a new instance of the class. - - - - - Reads the next JSON token from the source. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a []. - - A [] or null if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Skips the children of the current token. - - - - - Sets the current token. - - The new token. - - - - Sets the current token and value. - - The new token. - The value. - - - - Sets the current token and value. - - The new token. - The value. - A flag indicating whether the position index inside an array should be updated. - - - - Sets the state based on current token type. - - - - - Releases unmanaged and - optionally - managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the reader's state to . - If is set to true, the source is also closed. - - - - - The exception thrown when an error occurs while reading JSON text. - - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Initializes a new instance of the class - with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The path to the JSON where the error occurred. - The line number indicating where the error occurred. - The line position indicating where the error occurred. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Instructs the to always serialize the member, and to require that the member has a value. - - - - - The exception thrown when an error occurs during JSON serialization or deserialization. - - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Initializes a new instance of the class - with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The path to the JSON where the error occurred. - The line number indicating where the error occurred. - The line position indicating where the error occurred. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Serializes and deserializes objects into and from the JSON format. - The enables you to control how objects are encoded into JSON. - - - - - Occurs when the errors during serialization and deserialization. - - - - - Gets or sets the used by the serializer when resolving references. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets the used by the serializer when writing trace messages. - - The trace writer. - - - - Gets or sets the equality comparer used by the serializer when comparing references. - - The equality comparer. - - - - Gets or sets how type name writing and reading is handled by the serializer. - The default value is . - - - should be used with caution when your application deserializes JSON from an external source. - Incoming types should be validated with a custom - when deserializing with a value other than . - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - The default value is . - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - The default value is . - - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - The default value is . - - - - - Gets or sets how null values are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how default values are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how objects are created during deserialization. - The default value is . - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - The default value is . - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - The default value is . - - The metadata properties handling. - - - - Gets a collection that will be used during serialization. - - Collection that will be used during serialization. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Indicates how JSON text output is formatted. - The default value is . - - - - - Gets or sets how dates are written to JSON text. - The default value is . - - - - - Gets or sets how time zones are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - The default value is . - - - - - Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - The default value is . - - - - - Gets or sets how special floating point numbers, e.g. , - and , - are written as JSON text. - The default value is . - - - - - Gets or sets how strings are escaped when writing JSON text. - The default value is . - - - - - Gets or sets how and values are formatted when writing JSON text, - and the expected date format when reading JSON text. - The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". - - - - - Gets or sets the culture used when reading JSON. - The default value is . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - A null value means there is no maximum. - The default value is null. - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - The default value is false. - - - true if there will be a check for additional JSON content after deserializing an object; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Creates a new instance. - The will not use default settings - from . - - - A new instance. - The will not use default settings - from . - - - - - Creates a new instance using the specified . - The will not use default settings - from . - - The settings to be applied to the . - - A new instance using the specified . - The will not use default settings - from . - - - - - Creates a new instance. - The will use default settings - from . - - - A new instance. - The will use default settings - from . - - - - - Creates a new instance using the specified . - The will use default settings - from as well as the specified . - - The settings to be applied to the . - - A new instance using the specified . - The will use default settings - from as well as the specified . - - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to read values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to read values from. - The target object to populate values onto. - - - - Deserializes the JSON structure contained by the specified . - - The that contains the JSON structure to deserialize. - The being deserialized. - - - - Deserializes the JSON structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Deserializes the JSON structure contained by the specified - into an instance of the specified type. - - The containing the object. - The type of the object to deserialize. - The instance of being deserialized. - - - - Deserializes the JSON structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - The type of the value being serialized. - This parameter is used when is to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - The type of the value being serialized. - This parameter is used when is Auto to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Specifies the settings on a object. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) are handled. - The default value is . - - Reference loop handling. - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - The default value is . - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - The default value is . - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - The default value is . - - Null value handling. - - - - Gets or sets how default values are handled during serialization and deserialization. - The default value is . - - The default value handling. - - - - Gets or sets a collection that will be used during serialization. - - The converters. - - - - Gets or sets how object references are preserved by the serializer. - The default value is . - - The preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - The default value is . - - - should be used with caution when your application deserializes JSON from an external source. - Incoming types should be validated with a custom - when deserializing with a value other than . - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - The default value is . - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - The default value is . - - The constructor handling. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - The contract resolver. - - - - Gets or sets the equality comparer used by the serializer when comparing references. - - The equality comparer. - - - - Gets or sets the used by the serializer when resolving references. - - The reference resolver. - - - - Gets or sets a function that creates the used by the serializer when resolving references. - - A function that creates the used by the serializer when resolving references. - - - - Gets or sets the used by the serializer when writing trace messages. - - The trace writer. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the error handler called during serialization and deserialization. - - The error handler called during serialization and deserialization. - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Gets or sets how and values are formatted when writing JSON text, - and the expected date format when reading JSON text. - The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - A null value means there is no maximum. - The default value is null. - - - - - Indicates how JSON text output is formatted. - The default value is . - - - - - Gets or sets how dates are written to JSON text. - The default value is . - - - - - Gets or sets how time zones are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - The default value is . - - - - - Gets or sets how special floating point numbers, e.g. , - and , - are written as JSON. - The default value is . - - - - - Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - The default value is . - - - - - Gets or sets how strings are escaped when writing JSON text. - The default value is . - - - - - Gets or sets the culture used when reading JSON. - The default value is . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - The default value is false. - - - true if there will be a check for additional content after deserializing an object; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Represents a reader that provides fast, non-cached, forward-only access to JSON text data. - - - - - Asynchronously reads the next JSON token from the source. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns true if the next token was read successfully; false if there are no more tokens to read. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a []. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the []. This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Initializes a new instance of the class with the specified . - - The containing the JSON data to read. - - - - Gets or sets the reader's property name table. - - - - - Gets or sets the reader's character buffer pool. - - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a []. - - A [] or null if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Changes the reader's state to . - If is set to true, the underlying is also closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if and can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, returns false). - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the JSON value delimiter. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the specified end token. - - The end token to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously closes this writer. - If is set to true, the destination is also closed. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of the current JSON object or array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes indent characters. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes an indent space. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes raw JSON without changing the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a null value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the beginning of a JSON array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the beginning of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the start of a constructor with the given name. - - The name of the constructor. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes an undefined value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the given white space. - - The string of white space characters. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a [] value. - - The [] value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of an array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of a constructor. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Gets or sets the writer's character array pool. - - - - - Gets or sets how many s to write for each level in the hierarchy when is set to . - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to . - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Initializes a new instance of the class using the specified . - - The to write to. - - - - Flushes whatever is in the buffer to the underlying and also flushes the underlying . - - - - - Closes this writer. - If is set to true, the underlying is also closed. - If is set to true, the JSON is auto-completed. - - - - - Writes the beginning of a JSON object. - - - - - Writes the beginning of a JSON array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the specified end token. - - The end token to write. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a value. - - The value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the given white space. - - The string of white space characters. - - - - Specifies the type of JSON token. - - - - - This is returned by the if a read method has not been called. - - - - - An object start token. - - - - - An array start token. - - - - - A constructor start token. - - - - - An object property name. - - - - - A comment. - - - - - Raw JSON. - - - - - An integer. - - - - - A float. - - - - - A string. - - - - - A boolean. - - - - - A null token. - - - - - An undefined token. - - - - - An object end token. - - - - - An array end token. - - - - - A constructor end token. - - - - - A Date. - - - - - Byte data. - - - - - - Represents a reader that provides validation. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Sets an event handler for receiving schema validation errors. - - - - - Gets the text value of the current JSON token. - - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - - Gets the type of the current JSON token. - - - - - - Gets the .NET type for the current JSON token. - - - - - - Initializes a new instance of the class that - validates the content returned from the given . - - The to read from while validating. - - - - Gets or sets the schema. - - The schema. - - - - Gets the used to construct this . - - The specified in the constructor. - - - - Changes the reader's state to . - If is set to true, the underlying is also closed. - - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a []. - - - A [] or null if the next JSON token is null. - - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Asynchronously closes this writer. - If is set to true, the destination is also closed. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the specified end token. - - The end token to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes indent characters. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the JSON value delimiter. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes an indent space. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes raw JSON without changing the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of the current JSON object or array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of an array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of a constructor. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a null value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the beginning of a JSON array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the start of a constructor with the given name. - - The name of the constructor. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the beginning of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the current token. - - The to read the token from. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the current token. - - The to read the token from. - A flag indicating whether the current token's children should be written. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the token and its value. - - The to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the token and its value. - - The to write. - - The value to write. - A value is only required for tokens that have an associated value, e.g. the property name for . - null can be passed to the method for tokens that don't have a value, e.g. . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a [] value. - - The [] value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes an undefined value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the given white space. - - The string of white space characters. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously ets the state of the . - - The being written. - The value being written. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Gets or sets a value indicating whether the destination should be closed when this writer is closed. - - - true to close the destination when this writer is closed; otherwise false. The default is true. - - - - - Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed. - - - true to auto-complete the JSON when this writer is closed; otherwise false. The default is true. - - - - - Gets the top. - - The top. - - - - Gets the state of the writer. - - - - - Gets the path of the writer. - - - - - Gets or sets a value indicating how JSON text output should be formatted. - - - - - Gets or sets how dates are written to JSON text. - - - - - Gets or sets how time zones are handled when writing JSON text. - - - - - Gets or sets how strings are escaped when writing JSON text. - - - - - Gets or sets how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Gets or sets how and values are formatted when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the destination and also flushes the destination. - - - - - Closes this writer. - If is set to true, the destination is also closed. - If is set to true, the JSON is auto-completed. - - - - - Writes the beginning of a JSON object. - - - - - Writes the end of a JSON object. - - - - - Writes the beginning of a JSON array. - - - - - Writes the end of an array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end constructor. - - - - - Writes the property name of a name/value pair of a JSON object. - - The name of the property. - - - - Writes the property name of a name/value pair of a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - - - - Writes the end of the current JSON object or array. - - - - - Writes the current token and its children. - - The to read the token from. - - - - Writes the current token. - - The to read the token from. - A flag indicating whether the current token's children should be written. - - - - Writes the token and its value. - - The to write. - - The value to write. - A value is only required for tokens that have an associated value, e.g. the property name for . - null can be passed to the method for tokens that don't have a value, e.g. . - - - - - Writes the token. - - The to write. - - - - Writes the specified end token. - - The end token to write. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON without changing the writer's state. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the given white space. - - The string of white space characters. - - - - Releases unmanaged and - optionally - managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Sets the state of the . - - The being written. - The value being written. - - - - The exception thrown when an error occurs while writing JSON text. - - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Initializes a new instance of the class - with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The path to the JSON where the error occurred. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Specifies how JSON comments are handled when loading JSON. - - - - - Ignore comments. - - - - - Load comments as a with type . - - - - - Specifies how duplicate property names are handled when loading JSON. - - - - - Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used. - - - - - Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used. - - - - - Throw a when a duplicate property is encountered. - - - - - Contains the LINQ to JSON extension methods. - - - - - Returns a collection of tokens that contains the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the ancestors of every token in the source collection. - - - - Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains every token in the source collection, the ancestors of every token in the source collection. - - - - Returns a collection of tokens that contains the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the descendants of every token in the source collection. - - - - Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains every token in the source collection, and the descendants of every token in the source collection. - - - - Returns a collection of child properties of every object in the source collection. - - An of that contains the source collection. - An of that contains the properties of every object in the source collection. - - - - Returns a collection of child values of every object in the source collection with the given key. - - An of that contains the source collection. - The token key. - An of that contains the values of every token in the source collection with the given key. - - - - Returns a collection of child values of every object in the source collection. - - An of that contains the source collection. - An of that contains the values of every token in the source collection. - - - - Returns a collection of converted child values of every object in the source collection with the given key. - - The type to convert the values to. - An of that contains the source collection. - The token key. - An that contains the converted values of every token in the source collection with the given key. - - - - Returns a collection of converted child values of every object in the source collection. - - The type to convert the values to. - An of that contains the source collection. - An that contains the converted values of every token in the source collection. - - - - Converts the value. - - The type to convert the value to. - A cast as a of . - A converted value. - - - - Converts the value. - - The source collection type. - The type to convert the value to. - A cast as a of . - A converted value. - - - - Returns a collection of child tokens of every array in the source collection. - - The source collection type. - An of that contains the source collection. - An of that contains the values of every token in the source collection. - - - - Returns a collection of converted child tokens of every array in the source collection. - - An of that contains the source collection. - The type to convert the values to. - The source collection type. - An that contains the converted values of every token in the source collection. - - - - Returns the input typed as . - - An of that contains the source collection. - The input typed as . - - - - Returns the input typed as . - - The source collection type. - An of that contains the source collection. - The input typed as . - - - - Represents a collection of objects. - - The type of token. - - - - Gets the of with the specified key. - - - - - - Represents a JSON array. - - - - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous load. The property contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous load. The property contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the node type for this . - - The type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Loads an from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - - - - Load a from a string that contains JSON. - - A that contains JSON. - The used to load the JSON. - If this is null, default load settings will be used. - A populated from the string that contains JSON. - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object. - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the at the specified index. - - - - - - Determines the index of a specific item in the . - - The object to locate in the . - - The index of if found in the list; otherwise, -1. - - - - - Inserts an item to the at the specified index. - - The zero-based index at which should be inserted. - The object to insert into the . - - is not a valid index in the . - - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - - - - - Returns an enumerator that iterates through the collection. - - - A of that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - - - - Removes all items from the . - - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies the elements of the to an array, starting at a particular array index. - - The array. - Index of the array. - - - - Gets a value indicating whether the is read-only. - - true if the is read-only; otherwise, false. - - - - Removes the first occurrence of a specific object from the . - - The object to remove from the . - - true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . - - - - - Represents a JSON constructor. - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets or sets the name of this constructor. - - The constructor name. - - - - Gets the node type for this . - - The type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name. - - The constructor name. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified key. - - The with the specified key. - - - - Loads a from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - - - Represents a token that can contain other tokens. - - - - - Occurs when the list changes or an item in the list changes. - - - - - Occurs before an item is added to the collection. - - - - - Occurs when the items list of the collection has changed, or the collection is reset. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Get the first child token of this token. - - - A containing the first child token of the . - - - - - Get the last child token of this token. - - - A containing the last child token of the . - - - - - Returns a collection of the child tokens of this token, in document order. - - - An of containing the child tokens of this , in document order. - - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - - A containing the child values of this , in document order. - - - - - Returns a collection of the descendant tokens for this token in document order. - - An of containing the descendant tokens of the . - - - - Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. - - An of containing this token, and all the descendant tokens of the . - - - - Adds the specified content as children of this . - - The content to be added. - - - - Adds the specified content as the first children of this . - - The content to be added. - - - - Creates a that can be used to add tokens to the . - - A that is ready to have content written to it. - - - - Replaces the child nodes of this token with the specified content. - - The content. - - - - Removes the child nodes from this token. - - - - - Merge the specified content into this . - - The content to be merged. - - - - Merge the specified content into this using . - - The content to be merged. - The used to merge the content. - - - - Gets the count of child JSON tokens. - - The count of child JSON tokens. - - - - Represents a collection of objects. - - The type of token. - - - - An empty collection of objects. - - - - - Initializes a new instance of the struct. - - The enumerable. - - - - Returns an enumerator that can be used to iterate through the collection. - - - A that can be used to iterate through the collection. - - - - - Gets the of with the specified key. - - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Represents a JSON object. - - - - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Occurs when a property value changes. - - - - - Occurs when a property value is changing. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Gets the node type for this . - - The type. - - - - Gets an of of this object's properties. - - An of of this object's properties. - - - - Gets a with the specified name. - - The property name. - A with the specified name or null. - - - - Gets the with the specified name. - The exact name will be searched for first and if no matching property is found then - the will be used to match a property. - - The property name. - One of the enumeration values that specifies how the strings will be compared. - A matched with the specified name or null. - - - - Gets a of of this object's property values. - - A of of this object's property values. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the with the specified property name. - - - - - - Loads a from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - is not valid JSON. - - - - - Loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - is not valid JSON. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - is not valid JSON. - - - - - - - - Load a from a string that contains JSON. - - A that contains JSON. - The used to load the JSON. - If this is null, default load settings will be used. - A populated from the string that contains JSON. - - is not valid JSON. - - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object. - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified property name. - - Name of the property. - The with the specified property name. - - - - Gets the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - One of the enumeration values that specifies how the strings will be compared. - The with the specified property name. - - - - Tries to get the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - The value. - One of the enumeration values that specifies how the strings will be compared. - true if a value was successfully retrieved; otherwise, false. - - - - Adds the specified property name. - - Name of the property. - The value. - - - - Determines whether the JSON object has the specified property name. - - Name of the property. - true if the JSON object has the specified property name; otherwise, false. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries to get the with the specified property name. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that can be used to iterate through the collection. - - - A that can be used to iterate through the collection. - - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Represents a JSON property. - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous creation. The - property returns a that contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous creation. The - property returns a that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the property name. - - The property name. - - - - Gets or sets the property value. - - The property value. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Gets the node type for this . - - The type. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads a from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - - - Represents a view of a . - - - - - Initializes a new instance of the class. - - The name. - - - - When overridden in a derived class, returns whether resetting an object changes its value. - - - true if resetting the component changes its value; otherwise, false. - - The component to test for reset capability. - - - - When overridden in a derived class, gets the current value of the property on a component. - - - The value of a property for a given component. - - The component with the property for which to retrieve the value. - - - - When overridden in a derived class, resets the value for this property of the component to the default value. - - The component with the property value that is to be reset to the default value. - - - - When overridden in a derived class, sets the value of the component to a different value. - - The component with the property value that is to be set. - The new value. - - - - When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. - - - true if the property should be persisted; otherwise, false. - - The component with the property to be examined for persistence. - - - - When overridden in a derived class, gets the type of the component this property is bound to. - - - A that represents the type of component this property is bound to. - When the or - - methods are invoked, the object specified might be an instance of this type. - - - - - When overridden in a derived class, gets a value indicating whether this property is read-only. - - - true if the property is read-only; otherwise, false. - - - - - When overridden in a derived class, gets the type of the property. - - - A that represents the type of the property. - - - - - Gets the hash code for the name of the member. - - - - The hash code for the name of the member. - - - - - Represents a raw JSON string. - - - - - Asynchronously creates an instance of with the content of the reader's current token. - - The reader. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous creation. The - property returns an instance of with the content of the reader's current token. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The raw json. - - - - Creates an instance of with the content of the reader's current token. - - The reader. - An instance of with the content of the reader's current token. - - - - Specifies the settings used when loading JSON. - - - - - Initializes a new instance of the class. - - - - - Gets or sets how JSON comments are handled when loading JSON. - The default value is . - - The JSON comment handling. - - - - Gets or sets how JSON line info is handled when loading JSON. - The default value is . - - The JSON line info handling. - - - - Gets or sets how duplicate property names in JSON objects are handled when loading JSON. - The default value is . - - The JSON duplicate property name handling. - - - - Specifies the settings used when merging JSON. - - - - - Initializes a new instance of the class. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Gets or sets how null value properties are merged. - - How null value properties are merged. - - - - Gets or sets the comparison used to match property names while merging. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - The comparison used to match property names while merging. - - - - Represents an abstract JSON token. - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Writes this token to a asynchronously. - - A into which this method will write. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously creates a from a . - - An positioned at the token to read into this . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains - the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Asynchronously creates a from a . - - An positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains - the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Asynchronously creates a from a . - - A positioned at the token to read into this . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Asynchronously creates a from a . - - A positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Gets a comparer that can compare two tokens for value equality. - - A that can compare two nodes for value equality. - - - - Gets or sets the parent. - - The parent. - - - - Gets the root of this . - - The root of this . - - - - Gets the node type for this . - - The type. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Compares the values of two tokens, including the values of all descendant tokens. - - The first to compare. - The second to compare. - true if the tokens are equal; otherwise false. - - - - Gets the next sibling token of this node. - - The that contains the next sibling token. - - - - Gets the previous sibling token of this node. - - The that contains the previous sibling token. - - - - Gets the path of the JSON token. - - - - - Adds the specified content immediately after this token. - - A content object that contains simple content or a collection of content objects to be added after this token. - - - - Adds the specified content immediately before this token. - - A content object that contains simple content or a collection of content objects to be added before this token. - - - - Returns a collection of the ancestor tokens of this token. - - A collection of the ancestor tokens of this token. - - - - Returns a collection of tokens that contain this token, and the ancestors of this token. - - A collection of tokens that contain this token, and the ancestors of this token. - - - - Returns a collection of the sibling tokens after this token, in document order. - - A collection of the sibling tokens after this tokens, in document order. - - - - Returns a collection of the sibling tokens before this token, in document order. - - A collection of the sibling tokens before this token, in document order. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets the with the specified key converted to the specified type. - - The type to convert the token to. - The token key. - The converted token value. - - - - Get the first child token of this token. - - A containing the first child token of the . - - - - Get the last child token of this token. - - A containing the last child token of the . - - - - Returns a collection of the child tokens of this token, in document order. - - An of containing the child tokens of this , in document order. - - - - Returns a collection of the child tokens of this token, in document order, filtered by the specified type. - - The type to filter the child tokens on. - A containing the child tokens of this , in document order. - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - A containing the child values of this , in document order. - - - - Removes this token from its parent. - - - - - Replaces this token with the specified token. - - The value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Returns the indented JSON for this token. - - - ToString() returns a non-JSON string value for tokens with a type of . - If you want the JSON for all token types then you should use . - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output should be formatted. - A collection of s which will be used when writing the token. - The JSON for this token using the given formatting and converters. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to []. - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from [] to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Creates a for this token. - - A that can be used to read this token and its descendants. - - - - Creates a from an object. - - The object that will be used to create . - A with the value of the specified object. - - - - Creates a from an object using the specified . - - The object that will be used to create . - The that will be used when reading the object. - A with the value of the specified object. - - - - Creates an instance of the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates an instance of the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates an instance of the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates an instance of the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates a from a . - - A positioned at the token to read into this . - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Creates a from a . - - An positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Load a from a string that contains JSON. - - A that contains JSON. - The used to load the JSON. - If this is null, default load settings will be used. - A populated from the string that contains JSON. - - - - Creates a from a . - - A positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Creates a from a . - - A positioned at the token to read into this . - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Selects a using a JSONPath expression. Selects the token that matches the object path. - - - A that contains a JSONPath expression. - - A , or null. - - - - Selects a using a JSONPath expression. Selects the token that matches the object path. - - - A that contains a JSONPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - A . - - - - Selects a collection of elements using a JSONPath expression. - - - A that contains a JSONPath expression. - - An of that contains the selected elements. - - - - Selects a collection of elements using a JSONPath expression. - - - A that contains a JSONPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An of that contains the selected elements. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Creates a new instance of the . All child tokens are recursively cloned. - - A new instance of the . - - - - Adds an object to the annotation list of this . - - The annotation to add. - - - - Get the first annotation object of the specified type from this . - - The type of the annotation to retrieve. - The first annotation object that matches the specified type, or null if no annotation is of the specified type. - - - - Gets the first annotation object of the specified type from this . - - The of the annotation to retrieve. - The first annotation object that matches the specified type, or null if no annotation is of the specified type. - - - - Gets a collection of annotations of the specified type for this . - - The type of the annotations to retrieve. - An that contains the annotations for this . - - - - Gets a collection of annotations of the specified type for this . - - The of the annotations to retrieve. - An of that contains the annotations that match the specified type for this . - - - - Removes the annotations of the specified type from this . - - The type of annotations to remove. - - - - Removes the annotations of the specified type from this . - - The of annotations to remove. - - - - Compares tokens to determine whether they are equal. - - - - - Determines whether the specified objects are equal. - - The first object of type to compare. - The second object of type to compare. - - true if the specified objects are equal; otherwise, false. - - - - - Returns a hash code for the specified object. - - The for which a hash code is to be returned. - A hash code for the specified object. - The type of is a reference type and is null. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Gets the at the reader's current position. - - - - - Initializes a new instance of the class. - - The token to read from. - - - - Initializes a new instance of the class. - - The token to read from. - The initial path of the token. It is prepended to the returned . - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Gets the path of the current JSON token. - - - - - Specifies the type of token. - - - - - No token type has been set. - - - - - A JSON object. - - - - - A JSON array. - - - - - A JSON constructor. - - - - - A JSON object property. - - - - - A comment. - - - - - An integer value. - - - - - A float value. - - - - - A string value. - - - - - A boolean value. - - - - - A null value. - - - - - An undefined value. - - - - - A date value. - - - - - A raw JSON value. - - - - - A collection of bytes value. - - - - - A Guid value. - - - - - A Uri value. - - - - - A TimeSpan value. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Gets the at the writer's current position. - - - - - Gets the token being written. - - The token being written. - - - - Initializes a new instance of the class writing to the given . - - The container being written to. - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the underlying . - - - - - Closes this writer. - If is set to true, the JSON is auto-completed. - - - Setting to true has no additional effect, since the underlying is a type that cannot be closed. - - - - - Writes the beginning of a JSON object. - - - - - Writes the beginning of a JSON array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end. - - The token. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Writes a value. - An error will be raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Represents a value in JSON (string, integer, date, etc). - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Creates a comment with the given value. - - The value. - A comment with the given value. - - - - Creates a string with the given value. - - The value. - A string with the given value. - - - - Creates a null value. - - A null value. - - - - Creates a undefined value. - - A undefined value. - - - - Gets the node type for this . - - The type. - - - - Gets or sets the underlying token value. - - The underlying token value. - - - - Writes this token to a . - - A into which this method will write. - A collection of s which will be used when writing the token. - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - ToString() returns a non-JSON string value for tokens with a type of . - If you want the JSON for all token types then you should use . - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format provider. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - The format provider. - - A that represents this instance. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. - - An object to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: - Value - Meaning - Less than zero - This instance is less than . - Zero - This instance is equal to . - Greater than zero - This instance is greater than . - - - is not of the same type as this instance. - - - - - Specifies how line information is handled when loading JSON. - - - - - Ignore line information. - - - - - Load line information. - - - - - Specifies how JSON arrays are merged together. - - - - Concatenate arrays. - - - Union arrays, skipping items that already exist. - - - Replace all array items. - - - Merge array items together, matched by index. - - - - Specifies how null value properties are merged. - - - - - The content's null value properties will be ignored during merging. - - - - - The content's null value properties will be merged. - - - - - Specifies the member serialization options for the . - - - - - All public members are serialized by default. Members can be excluded using or . - This is the default member serialization mode. - - - - - Only members marked with or are serialized. - This member serialization mode can also be set by marking the class with . - - - - - All public and private fields are serialized. Members can be excluded using or . - This member serialization mode can also be set by marking the class with - and setting IgnoreSerializableAttribute on to false. - - - - - Specifies metadata property handling options for the . - - - - - Read metadata properties located at the start of a JSON object. - - - - - Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. - - - - - Do not try to read metadata properties. - - - - - Specifies missing member handling options for the . - - - - - Ignore a missing member and do not attempt to deserialize it. - - - - - Throw a when a missing member is encountered during deserialization. - - - - - Specifies null value handling options for the . - - - - - - - - - Include null values when serializing and deserializing objects. - - - - - Ignore null values when serializing and deserializing objects. - - - - - Specifies how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - Specifies reference handling options for the . - Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement . - - - - - - - - Do not preserve references when serializing types. - - - - - Preserve references when serializing into a JSON object structure. - - - - - Preserve references when serializing into a JSON array structure. - - - - - Preserve references when serializing. - - - - - Specifies reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - Indicating whether a property is required. - - - - - The property is not required. The default state. - - - - - The property must be defined in JSON but can be a null value. - - - - - The property must be defined in JSON and cannot be a null value. - - - - - The property is not required but it cannot be a null value. - - - - - - Contains the JSON schema extension methods. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - - true if the specified is valid; otherwise, false. - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - When this method returns, contains any error messages generated while validating. - - true if the specified is valid; otherwise, false. - - - - - - Validates the specified . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - - - - - Validates the specified . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - The validation event handler. - - - - - An in-memory representation of a JSON Schema. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets or sets the id. - - - - - Gets or sets the title. - - - - - Gets or sets whether the object is required. - - - - - Gets or sets whether the object is read-only. - - - - - Gets or sets whether the object is visible to users. - - - - - Gets or sets whether the object is transient. - - - - - Gets or sets the description of the object. - - - - - Gets or sets the types of values allowed by the object. - - The type. - - - - Gets or sets the pattern. - - The pattern. - - - - Gets or sets the minimum length. - - The minimum length. - - - - Gets or sets the maximum length. - - The maximum length. - - - - Gets or sets a number that the value should be divisible by. - - A number that the value should be divisible by. - - - - Gets or sets the minimum. - - The minimum. - - - - Gets or sets the maximum. - - The maximum. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute (). - - A flag indicating whether the value can not equal the number defined by the minimum attribute (). - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute (). - - A flag indicating whether the value can not equal the number defined by the maximum attribute (). - - - - Gets or sets the minimum number of items. - - The minimum number of items. - - - - Gets or sets the maximum number of items. - - The maximum number of items. - - - - Gets or sets the of items. - - The of items. - - - - Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . - - - true if items are validated using their array position; otherwise, false. - - - - - Gets or sets the of additional items. - - The of additional items. - - - - Gets or sets a value indicating whether additional items are allowed. - - - true if additional items are allowed; otherwise, false. - - - - - Gets or sets whether the array items must be unique. - - - - - Gets or sets the of properties. - - The of properties. - - - - Gets or sets the of additional properties. - - The of additional properties. - - - - Gets or sets the pattern properties. - - The pattern properties. - - - - Gets or sets a value indicating whether additional properties are allowed. - - - true if additional properties are allowed; otherwise, false. - - - - - Gets or sets the required property if this property is present. - - The required property if this property is present. - - - - Gets or sets the a collection of valid enum values allowed. - - A collection of valid enum values allowed. - - - - Gets or sets disallowed types. - - The disallowed types. - - - - Gets or sets the default value. - - The default value. - - - - Gets or sets the collection of that this schema extends. - - The collection of that this schema extends. - - - - Gets or sets the format. - - The format. - - - - Initializes a new instance of the class. - - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The object representing the JSON Schema. - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The to use when resolving schema references. - The object representing the JSON Schema. - - - - Load a from a string that contains JSON Schema. - - A that contains JSON Schema. - A populated from the string that contains JSON Schema. - - - - Load a from a string that contains JSON Schema using the specified . - - A that contains JSON Schema. - The resolver. - A populated from the string that contains JSON Schema. - - - - Writes this schema to a . - - A into which this method will write. - - - - Writes this schema to a using the specified . - - A into which this method will write. - The resolver used. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - - Returns detailed information about the schema exception. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - - Generates a from a specified . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets or sets how undefined schemas are handled by the serializer. - - - - - Gets or sets the contract resolver. - - The contract resolver. - - - - Generate a from the specified type. - - The type to generate a from. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - - Resolves from an id. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets or sets the loaded schemas. - - The loaded schemas. - - - - Initializes a new instance of the class. - - - - - Gets a for the specified reference. - - The id. - A for the specified reference. - - - - - The value types allowed by the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - No type specified. - - - - - String type. - - - - - Float type. - - - - - Integer type. - - - - - Boolean type. - - - - - Object type. - - - - - Array type. - - - - - Null type. - - - - - Any type. - - - - - - Specifies undefined schema Id handling options for the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Do not infer a schema Id. - - - - - Use the .NET type name as the schema Id. - - - - - Use the assembly qualified .NET type name as the schema Id. - - - - - - Returns detailed information related to the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets the associated with the validation error. - - The JsonSchemaException associated with the validation error. - - - - Gets the path of the JSON location where the validation error occurred. - - The path of the JSON location where the validation error occurred. - - - - Gets the text description corresponding to the validation error. - - The text description. - - - - - Represents the callback method that will handle JSON schema validation events and the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - A camel case naming strategy. - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - A flag indicating whether extension data names should be processed. - - - - - Initializes a new instance of the class. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Resolves member mappings for a type, camel casing property names. - - - - - Initializes a new instance of the class. - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Used by to resolve a for a given . - - - - - Gets a value indicating whether members are being get and set using dynamic code generation. - This value is determined by the runtime permissions available. - - - true if using dynamic code generation; otherwise, false. - - - - - Gets or sets the default members search flags. - - The default members search flags. - - - - Gets or sets a value indicating whether compiler generated members should be serialized. - - - true if serialized compiler generated members; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. - - - true if the interface will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. - - - true if the attribute will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types. - - - true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types. - - - true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized. - - The naming strategy used to resolve how property names and dictionary keys are serialized. - - - - Initializes a new instance of the class. - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Gets the serializable members for the type. - - The type to get serializable members for. - The serializable members for the type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates the constructor parameters. - - The constructor to create properties for. - The type's member properties. - Properties for the given . - - - - Creates a for the given . - - The matching member property. - The constructor parameter. - A created for the given . - - - - Resolves the default for the contract. - - Type of the object. - The contract's default . - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Determines which contract type is created for the given type. - - Type of the object. - A for the given type. - - - - Creates properties for the given . - - The type to create properties for. - /// The member serialization mode for the type. - Properties for the given . - - - - Creates the used by the serializer to get and set values from a member. - - The member. - The used by the serializer to get and set values from a member. - - - - Creates a for the given . - - The member's parent . - The member to create a for. - A created for the given . - - - - Resolves the name of the property. - - Name of the property. - Resolved name of the property. - - - - Resolves the name of the extension data. By default no changes are made to extension data names. - - Name of the extension data. - Resolved name of the extension data. - - - - Resolves the key of the dictionary. By default is used to resolve dictionary keys. - - Key of the dictionary. - Resolved key of the dictionary. - - - - Gets the resolved name of the property. - - Name of the property. - Name of the property. - - - - The default naming strategy. Property names and dictionary keys are unchanged. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - The default serialization binder used when resolving and loading classes from type names. - - - - - Initializes a new instance of the class. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - The type of the object the formatter creates a new instance of. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Represents a trace writer that writes to the application's instances. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of will exclude messages and include , - and messages. - - - The that will be used to filter the trace messages passed to the writer. - - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Get and set values for a using dynamic methods. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Provides information surrounding an error. - - - - - Gets the error. - - The error. - - - - Gets the original object that caused the error. - - The original object that caused the error. - - - - Gets the member that caused the error. - - The member that caused the error. - - - - Gets the path of the JSON location where the error occurred. - - The path of the JSON location where the error occurred. - - - - Gets or sets a value indicating whether this is handled. - - true if handled; otherwise, false. - - - - Provides data for the Error event. - - - - - Gets the current object the error event is being raised against. - - The current object the error event is being raised against. - - - - Gets the error context. - - The error context. - - - - Initializes a new instance of the class. - - The current object. - The error context. - - - - Get and set values for a using dynamic methods. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Provides methods to get attributes. - - - - - Returns a collection of all of the attributes, or an empty collection if there are no attributes. - - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. - - The type of the attributes. - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Used by to resolve a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Used to resolve references when serializing and deserializing JSON by the . - - - - - Resolves a reference to its object. - - The serialization context. - The reference to resolve. - The object that was resolved from the reference. - - - - Gets the reference for the specified object. - - The serialization context. - The object to get a reference for. - The reference to the object. - - - - Determines whether the specified object is referenced. - - The serialization context. - The object to test for a reference. - - true if the specified object is referenced; otherwise, false. - - - - - Adds a reference to the specified object. - - The serialization context. - The reference. - The object to reference. - - - - Allows users to control class loading and mandate what class to load. - - - - - When implemented, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object - The type of the object the formatter creates a new instance of. - - - - When implemented, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Represents a trace writer. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of will exclude messages and include , - and messages. - - The that will be used to filter the trace messages passed to the writer. - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Provides methods to get and set values. - - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Contract details for a used by the . - - - - - Gets the of the collection items. - - The of the collection items. - - - - Gets a value indicating whether the collection type is a multidimensional array. - - true if the collection type is a multidimensional array; otherwise, false. - - - - Gets or sets the function used to create the object. When set this function will override . - - The function used to create the object. - - - - Gets a value indicating whether the creator has a parameter with the collection values. - - true if the creator has a parameter with the collection values; otherwise, false. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets or sets the default collection items . - - The converter. - - - - Gets or sets a value indicating whether the collection items preserve object references. - - true if collection items preserve object references; otherwise, false. - - - - Gets or sets the collection item reference loop handling. - - The reference loop handling. - - - - Gets or sets the collection item type name handling. - - The type name handling. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Handles serialization callback events. - - The object that raised the callback event. - The streaming context. - - - - Handles serialization error callback events. - - The object that raised the callback event. - The streaming context. - The error context. - - - - Sets extension data for an object during deserialization. - - The object to set extension data on. - The extension data key. - The extension data value. - - - - Gets extension data for an object during serialization. - - The object to set extension data on. - - - - Contract details for a used by the . - - - - - Gets the underlying type for the contract. - - The underlying type for the contract. - - - - Gets or sets the type created during deserialization. - - The type created during deserialization. - - - - Gets or sets whether this type contract is serialized as a reference. - - Whether this type contract is serialized as a reference. - - - - Gets or sets the default for this contract. - - The converter. - - - - Gets the internally resolved for the contract's type. - This converter is used as a fallback converter when no other converter is resolved. - Setting will always override this converter. - - - - - Gets or sets all methods called immediately after deserialization of the object. - - The methods called immediately after deserialization of the object. - - - - Gets or sets all methods called during deserialization of the object. - - The methods called during deserialization of the object. - - - - Gets or sets all methods called after serialization of the object graph. - - The methods called after serialization of the object graph. - - - - Gets or sets all methods called before serialization of the object. - - The methods called before serialization of the object. - - - - Gets or sets all method called when an error is thrown during the serialization of the object. - - The methods called when an error is thrown during the serialization of the object. - - - - Gets or sets the default creator method used to create the object. - - The default creator method used to create the object. - - - - Gets or sets a value indicating whether the default creator is non-public. - - true if the default object creator is non-public; otherwise, false. - - - - Contract details for a used by the . - - - - - Gets or sets the dictionary key resolver. - - The dictionary key resolver. - - - - Gets the of the dictionary keys. - - The of the dictionary keys. - - - - Gets the of the dictionary values. - - The of the dictionary values. - - - - Gets or sets the function used to create the object. When set this function will override . - - The function used to create the object. - - - - Gets a value indicating whether the creator has a parameter with the dictionary values. - - true if the creator has a parameter with the dictionary values; otherwise, false. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets the object's properties. - - The object's properties. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets or sets the object constructor. - - The object constructor. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - Gets or sets the missing member handling used when deserializing this object. - - The missing member handling. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Gets or sets how the object's properties with null values are handled during serialization and deserialization. - - How the object's properties with null values are handled during serialization and deserialization. - - - - Gets the object's properties. - - The object's properties. - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the function used to create the object. When set this function will override . - This function is called with a collection of arguments which are defined by the collection. - - The function used to create the object. - - - - Gets or sets the extension data setter. - - - - - Gets or sets the extension data getter. - - - - - Gets or sets the extension data value type. - - - - - Gets or sets the extension data name resolver. - - The extension data name resolver. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Maps a JSON property to a .NET member or constructor parameter. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the type that declared this property. - - The type that declared this property. - - - - Gets or sets the order of serialization of a member. - - The numeric order of serialization. - - - - Gets or sets the name of the underlying member or parameter. - - The name of the underlying member or parameter. - - - - Gets the that will get and set the during serialization. - - The that will get and set the during serialization. - - - - Gets or sets the for this property. - - The for this property. - - - - Gets or sets the type of the property. - - The type of the property. - - - - Gets or sets the for the property. - If set this converter takes precedence over the contract converter for the property type. - - The converter. - - - - Gets or sets the member converter. - - The member converter. - - - - Gets or sets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets or sets a value indicating whether this is readable. - - true if readable; otherwise, false. - - - - Gets or sets a value indicating whether this is writable. - - true if writable; otherwise, false. - - - - Gets or sets a value indicating whether this has a member attribute. - - true if has a member attribute; otherwise, false. - - - - Gets the default value. - - The default value. - - - - Gets or sets a value indicating whether this is required. - - A value indicating whether this is required. - - - - Gets a value indicating whether has a value specified. - - - - - Gets or sets a value indicating whether this property preserves object references. - - - true if this instance is reference; otherwise, false. - - - - - Gets or sets the property null value handling. - - The null value handling. - - - - Gets or sets the property default value handling. - - The default value handling. - - - - Gets or sets the property reference loop handling. - - The reference loop handling. - - - - Gets or sets the property object creation handling. - - The object creation handling. - - - - Gets or sets or sets the type name handling. - - The type name handling. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets a predicate used to determine whether the property should be deserialized. - - A predicate used to determine whether the property should be deserialized. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets an action used to set whether the property has been deserialized. - - An action used to set whether the property has been deserialized. - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Gets or sets the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - A collection of objects. - - - - - Initializes a new instance of the class. - - The type. - - - - When implemented in a derived class, extracts the key from the specified element. - - The element from which to extract the key. - The key for the specified element. - - - - Adds a object. - - The property to add to the collection. - - - - Gets the closest matching object. - First attempts to get an exact case match of and then - a case insensitive match. - - Name of the property. - A matching property if found. - - - - Gets a property by property name. - - The name of the property to get. - Type property name string comparison. - A matching property if found. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Lookup and create an instance of the type described by the argument. - - The type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. - If null, the default constructor is used. - - - - A kebab case naming strategy. - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - A flag indicating whether extension data names should be processed. - - - - - Initializes a new instance of the class. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Represents a trace writer that writes to memory. When the trace message limit is - reached then old trace messages will be removed as new messages are added. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of will exclude messages and include , - and messages. - - - The that will be used to filter the trace messages passed to the writer. - - - - - Initializes a new instance of the class. - - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Returns an enumeration of the most recent trace messages. - - An enumeration of the most recent trace messages. - - - - Returns a of the most recent trace messages. - - - A of the most recent trace messages. - - - - - A base class for resolving how property names and dictionary keys are serialized. - - - - - A flag indicating whether dictionary keys should be processed. - Defaults to false. - - - - - A flag indicating whether extension data names should be processed. - Defaults to false. - - - - - A flag indicating whether explicitly specified property names, - e.g. a property name customized with a , should be processed. - Defaults to false. - - - - - Gets the serialized name for a given property name. - - The initial property name. - A flag indicating whether the property has had a name explicitly specified. - The serialized property name. - - - - Gets the serialized name for a given extension data name. - - The initial extension data name. - The serialized extension data name. - - - - Gets the serialized key for a given dictionary key. - - The initial dictionary key. - The serialized dictionary key. - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Hash code calculation - - - - - - Object equality implementation - - - - - - - Compare to another NamingStrategy - - - - - - - Represents a method that constructs an object. - - The object type to create. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Provides methods to get attributes from a , , or . - - - - - Initializes a new instance of the class. - - The instance to get attributes for. This parameter should be a , , or . - - - - Returns a collection of all of the attributes, or an empty collection if there are no attributes. - - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. - - The type of the attributes. - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Get and set values for a using reflection. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - A snake case naming strategy. - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - A flag indicating whether extension data names should be processed. - - - - - Initializes a new instance of the class. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Specifies how strings are escaped when writing JSON text. - - - - - Only control characters (e.g. newline) are escaped. - - - - - All non-ASCII and control characters (e.g. newline) are escaped. - - - - - HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. - - - - - Indicates the method that will be used during deserialization for locating and loading assemblies. - - - - - In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly. - - - - - In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly. - - - - - Specifies type name handling options for the . - - - should be used with caution when your application deserializes JSON from an external source. - Incoming types should be validated with a custom - when deserializing with a value other than . - - - - - Do not include the .NET type name when serializing types. - - - - - Include the .NET type name when serializing into a JSON object structure. - - - - - Include the .NET type name when serializing into a JSON array structure. - - - - - Always include the .NET type name when serializing. - - - - - Include the .NET type name when the type of the object being serialized is not the same as its declared type. - Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON - you must specify a root type object with - or . - - - - - Determines whether the collection is null or empty. - - The collection. - - true if the collection is null or empty; otherwise, false. - - - - - Adds the elements of the specified collection to the specified generic . - - The list to add to. - The collection of elements to add. - - - - Converts the value to the specified type. If the value is unable to be converted, the - value is checked whether it assignable to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert or cast the value to. - - The converted type. If conversion was unsuccessful, the initial value - is returned if assignable to the target type. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Returns a Restrictions object which includes our current restrictions merged - with a restriction limiting our type - - - - - Helper class for serializing immutable collections. - Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed - https://github.com/JamesNK/Newtonsoft.Json/issues/652 - - - - - Gets the type of the typed collection's items. - - The type. - The type of the typed collection's items. - - - - Gets the member's underlying type. - - The member. - The underlying type of the member. - - - - Determines whether the property is an indexed property. - - The property. - - true if the property is an indexed property; otherwise, false. - - - - - Gets the member's value on the object. - - The member. - The target object. - The member's value on the object. - - - - Sets the member's value on the target object. - - The member. - The target. - The value. - - - - Determines whether the specified MemberInfo can be read. - - The MemberInfo to determine whether can be read. - /// if set to true then allow the member to be gotten non-publicly. - - true if the specified MemberInfo can be read; otherwise, false. - - - - - Determines whether the specified MemberInfo can be set. - - The MemberInfo to determine whether can be set. - if set to true then allow the member to be set non-publicly. - if set to true then allow the member to be set if read-only. - - true if the specified MemberInfo can be set; otherwise, false. - - - - - Builds a string. Unlike this class lets you reuse its internal buffer. - - - - - Determines whether the string is all white space. Empty string will return false. - - The string to test whether it is all white space. - - true if the string is all white space; otherwise, false. - - - - - Specifies the state of the . - - - - - An exception has been thrown, which has left the in an invalid state. - You may call the method to put the in the Closed state. - Any other method calls result in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - An array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - Specifies that an output will not be null even if the corresponding type allows it. - - - Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. - - - Initializes the attribute with the specified return value condition. - - The return value condition. If the method returns this value, the associated parameter will not be null. - - - - Gets the return value condition. - - - Specifies that an output may be null even if the corresponding type disallows it. - - - Specifies that null is allowed as an input even if the corresponding type disallows it. - - - - Specifies that the method will not return if the associated Boolean parameter is passed the specified value. - - - - - Initializes a new instance of the class. - - - The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to - the associated parameter matches this value. - - - - Gets the condition parameter value. - - - diff --git a/Assets/TEngine/Config~/Tools/excel2json/excel2json.exe b/Assets/TEngine/Config~/Tools/excel2json/excel2json.exe deleted file mode 100644 index 37ee60b0..00000000 Binary files a/Assets/TEngine/Config~/Tools/excel2json/excel2json.exe and /dev/null differ diff --git a/Assets/TEngine/Config~/Tools/excel2json/excel2json.exe.config b/Assets/TEngine/Config~/Tools/excel2json/excel2json.exe.config deleted file mode 100644 index 9c05822f..00000000 --- a/Assets/TEngine/Config~/Tools/excel2json/excel2json.exe.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Assets/TEngine/Config~/gen_client_cfg.bat b/Assets/TEngine/Config~/gen_client_cfg.bat deleted file mode 100644 index 0dc342c1..00000000 --- a/Assets/TEngine/Config~/gen_client_cfg.bat +++ /dev/null @@ -1,15 +0,0 @@ -@SET EXCEL_FOLDER=xls -@SET JSON_FOLDER=..\..\TResources\Config -@SET EXE= Tools\excel2json\excel2json.exe -@SET CsharpPath=..\..\ConfigStruct - -@ECHO Del old Config... -del %JSON_FOLDER% /S /Q -del %CsharpPath% /S /Q - -@ECHO Converting excel files in folder %EXCEL_FOLDER% ... -for /f "delims=" %%i in ('dir /b /a-d /s %EXCEL_FOLDER%\*.xlsx') do ( - @echo processing %%~nxi - @CALL %EXE% --excel %EXCEL_FOLDER%\%%~nxi --json %JSON_FOLDER%\%%~ni.json --p %CsharpPath%\%%~ni.cs --header 3 --cell_json true --exclude_prefix # -) -pause \ No newline at end of file diff --git a/Assets/TEngine/Config~/gen_client_cfg_list.bat b/Assets/TEngine/Config~/gen_client_cfg_list.bat deleted file mode 100644 index 403a379c..00000000 --- a/Assets/TEngine/Config~/gen_client_cfg_list.bat +++ /dev/null @@ -1,15 +0,0 @@ -@SET EXCEL_FOLDER=xls -@SET JSON_FOLDER=..\..\TResources\Config -@SET EXE= Tools\excel2json\excel2json.exe -@SET CsharpPath=..\..\ConfigStruct - -@ECHO Del old Config... -del %JSON_FOLDER% /S /Q -del %CsharpPath% /S /Q - -@ECHO Converting excel files in folder %EXCEL_FOLDER% ... -for /f "delims=" %%i in ('dir /b /a-d /s %EXCEL_FOLDER%\*.xlsx') do ( - @echo processing %%~nxi - @CALL %EXE% --excel %EXCEL_FOLDER%\%%~nxi --json %JSON_FOLDER%\%%~ni.json --p %CsharpPath%\%%~ni.cs --header 3 --cell_json true --a --exclude_prefix # -) -pause \ No newline at end of file diff --git a/Assets/TEngine/Config~/xls/AttrReg.xlsx b/Assets/TEngine/Config~/xls/AttrReg.xlsx deleted file mode 100644 index 367fbc40..00000000 Binary files a/Assets/TEngine/Config~/xls/AttrReg.xlsx and /dev/null differ diff --git a/Assets/TEngine/Config~/xls/BuffConfig.xlsx b/Assets/TEngine/Config~/xls/BuffConfig.xlsx deleted file mode 100644 index cd3a8775..00000000 Binary files a/Assets/TEngine/Config~/xls/BuffConfig.xlsx and /dev/null differ diff --git a/Assets/TEngine/Config~/xls/FeatureConfig.xlsx b/Assets/TEngine/Config~/xls/FeatureConfig.xlsx deleted file mode 100644 index d1cb2024..00000000 Binary files a/Assets/TEngine/Config~/xls/FeatureConfig.xlsx and /dev/null differ diff --git a/Assets/TEngine/Config~/xls/Localization.xlsx b/Assets/TEngine/Config~/xls/Localization.xlsx deleted file mode 100644 index 4a97f25e..00000000 Binary files a/Assets/TEngine/Config~/xls/Localization.xlsx and /dev/null differ diff --git a/Assets/TEngine/Editor/About.meta b/Assets/TEngine/Editor/About.meta deleted file mode 100644 index 3931ea34..00000000 --- a/Assets/TEngine/Editor/About.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3a961840f9d2c2e48939e73a15549d5c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Editor/About/TEnginePackageWindow.cs b/Assets/TEngine/Editor/About/TEnginePackageWindow.cs deleted file mode 100644 index 0ab0592e..00000000 --- a/Assets/TEngine/Editor/About/TEnginePackageWindow.cs +++ /dev/null @@ -1,421 +0,0 @@ -using System; -using System.IO; -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; -using LitJson; -using UnityEngine.Networking; - -namespace TEngine.Editor -{ - public class PackageManagerInternal : EditorWindow - { - private const string OnlineUrl = "http://1.12.241.46:8081/TEngine/"; - - [MenuItem("TEngine/模块商店|在线Package Manager", priority = 1500)] - private static void Open() - { - var window = GetWindow("在线模块商店|Package Manager"); - window.minSize = new Vector2(600f, 400f); - window.Show(); - } - - /// - /// 资源包数据结构 - /// - [Serializable] - private class PackageTemplate - { - /// - /// 名称 - /// - public string name = string.Empty; - /// - /// 作者 - /// - public string author = string.Empty; - /// - /// 版本 - /// - public string version = string.Empty; - /// - /// 发布日期 - /// - public string releasedDate = string.Empty; - /// - /// 简介 - /// - public string description = string.Empty; - /// - /// 依赖项 - /// - public string[] dependencies = null; - } - - //资源包信息列表 - private List> packages; - //折叠状态 - private Dictionary foldoutDic; - //列表滚动视图 - private Vector2 listScroll; - //最后更新日期 - private string lastUpdateDate; - //当前选中的资源包信息 - private PackageTemplate currentSelected; - //搜索内容 - private string searchContent; - - private void OnEnable() - { - packages = new List>(); - foldoutDic = new Dictionary(); - EditorCoroutineRunner.StartEditorCoroutine(GetPackagesInfo()); - } - - private void OnGUI() - { - //水平布局 - GUILayout.BeginHorizontal("Toolbar"); - { - //搜索 - OnSearchGUI(); - } - GUILayout.EndHorizontal(); - - //水平布局 - GUILayout.BeginHorizontal(GUILayout.ExpandHeight(true)); - { - //垂直布局 设置左侧列表宽度 - GUILayout.BeginVertical(GUILayout.Width(200f)); - { - //绘制列表 - OnListGUI(); - } - GUILayout.EndVertical(); - - //分割线 - GUILayout.Box(string.Empty, "EyeDropperVerticalLine", GUILayout.ExpandHeight(true), GUILayout.Width(1f)); - - //垂直布局 - GUILayout.BeginVertical(GUILayout.ExpandHeight(true)); - { - //绘制详情 - OnDetailGUI(); - } - GUILayout.EndVertical(); - } - GUILayout.EndHorizontal(); - } - - private void OnSearchGUI() - { - var newSearchContent = GUILayout.TextField(searchContent, "SearchTextField"); - if (newSearchContent != searchContent) - { - searchContent = newSearchContent; - currentSelected = null; - Repaint(); - } - if (UnityEngine.Event.current.type == EventType.MouseDown && !GUILayoutUtility.GetLastRect().Contains(UnityEngine.Event.current.mousePosition)) - { - GUI.FocusControl(null); - } - } - - private void OnListGUI() - { - //滚动视图 - listScroll = GUILayout.BeginScrollView(listScroll); - { - GUIStyle versionStyle = new GUIStyle(GUI.skin.label) { fontStyle = FontStyle.Italic }; - for (int i = 0; i < packages.Count; i++) - { - List list = packages[i]; - PackageTemplate first = list[0]; - if (!string.IsNullOrEmpty(searchContent) && !first.name.ToLower().Contains(searchContent.ToLower())) continue; - if (foldoutDic[first.name]) - { - foldoutDic[first.name] = EditorGUILayout.Foldout(foldoutDic[first.name], first.name); - for (int n = 0; n < list.Count; n++) - { - GUILayout.BeginHorizontal(currentSelected == list[n] ? "SelectionRect" : "IN Title"); - GUILayout.FlexibleSpace(); - GUILayout.Label(list[n].version, versionStyle); - GUILayout.Space(30f); - GUILayout.EndHorizontal(); - - if (GUILayoutUtility.GetLastRect().Contains(UnityEngine.Event.current.mousePosition) && UnityEngine.Event.current.type == EventType.MouseDown) - { - currentSelected = list[n]; - UnityEngine.Event.current.Use(); - } - } - } - else - { - GUILayout.BeginHorizontal(currentSelected == first ? "SelectionRect" : "Toolbar"); - { - foldoutDic[first.name] = EditorGUILayout.Foldout(foldoutDic[first.name], first.name); - GUILayout.FlexibleSpace(); - GUILayout.Label(first.version, versionStyle); - } - GUILayout.EndHorizontal(); - - //鼠标点击选中 - if (GUILayoutUtility.GetLastRect().Contains(UnityEngine.Event.current.mousePosition) && UnityEngine.Event.current.type == EventType.MouseDown) - { - currentSelected = first; - UnityEngine.Event.current.Use(); - } - } - } - } - GUILayout.EndScrollView(); - - //分割线 - GUILayout.Box(string.Empty, "EyeDropperHorizontalLine", GUILayout.ExpandWidth(true), GUILayout.Height(1f)); - - //水平布局 设置高度 - GUILayout.BeginHorizontal(GUILayout.Height(23f)); - { - //最后更新日期 - GUILayout.Label(lastUpdateDate); - //刷新按钮 - if (GUILayout.Button(EditorGUIUtility.IconContent("Refresh"), GUILayout.Width(30f))) - { - //清空当前的资源包信息列表 - packages.Clear(); - //清空折叠栏信息 - foldoutDic.Clear(); - //当前选中的资源包设为空 - currentSelected = null; - //发起网络请求 - EditorCoroutineRunner.StartEditorCoroutine(GetPackagesInfo()); - } - } - GUILayout.EndHorizontal(); - } - private void OnDetailGUI() - { - if (currentSelected != null) - { - //名称 - GUILayout.Label(currentSelected.name, new GUIStyle(GUI.skin.label) { fontSize = 25, fontStyle = FontStyle.Bold }); - EditorGUILayout.Space(); - //作者 - GUILayout.Label(currentSelected.author, new GUIStyle(GUI.skin.label) { fontSize = 12 }); - EditorGUILayout.Space(); - //版本 + 发布日期 - GUILayout.Label($"Version {currentSelected.version} - {currentSelected.releasedDate}", new GUIStyle(GUI.skin.label) { fontSize = 14, fontStyle = FontStyle.Bold }); - EditorGUILayout.Space(); - - //分割线 - GUILayout.Box(string.Empty, GUILayout.ExpandWidth(true), GUILayout.Height(1f)); - - //简介 - GUILayout.Label(currentSelected.description); - } - GUILayout.FlexibleSpace(); - - //分割线 - GUILayout.Box(string.Empty, "EyeDropperHorizontalLine", GUILayout.ExpandWidth(true), GUILayout.Height(1f)); - - //水平布局 设置高度 - GUILayout.BeginHorizontal(GUILayout.Height(21f)); - { - GUILayout.FlexibleSpace(); - //下载并导入 - if (GUILayout.Button("Import", GUILayout.Width(50f))) - { - if (currentSelected != null) - { - EditorCoroutineRunner.StartEditorCoroutine(DownloadPackage(currentSelected)); - } - } - } - GUILayout.EndHorizontal(); - } - - //获取资源包信息 - private IEnumerator GetPackagesInfo() - { - string url = $"{OnlineUrl}packages.json"; - UnityWebRequest www = UnityWebRequest.Get(url); - UnityWebRequestAsyncOperation request = www.SendWebRequest(); - while (true) - { - if (request.isDone) - break; - } - yield return request.isDone; - if (www.error == null) - { - List list = JsonMapper.ToObject>(www.downloadHandler.text); - - for (int i = 0; i < list.Count; i++) - { - var package = list[i] as PackageTemplate; - //查找列表中是否已经存在该资源包其他版本 - int index = packages.FindIndex(m => m != null && m.Count > 0 && m[0].name == package.name); - if (index == -1) - { - var newList = new List { package }; - packages.Add(newList); - foldoutDic.Add(package.name, false); - } - else - { - packages[index].Add(package); - } - } - //更新最后刷新日期 - lastUpdateDate = DateTime.Now.ToString(); - } - else - { - Debug.LogError(www.error); - } - } - //下载并导入资源包 - private IEnumerator DownloadPackage(PackageTemplate package) - { - string url = $"{OnlineUrl}packages/{package.name}/{package.version}/{package.name}.unitypackage"; - //Debug.Log(url); - UnityWebRequest www = UnityWebRequest.Get(url); - UnityWebRequestAsyncOperation request = www.SendWebRequest(); - while (true) - { - if (request.isDone) - break; - } - yield return request.isDone; - if (www.error == null) - { - byte[] bytes = www.downloadHandler.data; - string path = $"{Application.dataPath}/{package.name}-{package.version}.unitypackage"; - //写入本地 - using (FileStream fs = new FileStream(path, FileMode.Create)) - { - fs.Write(bytes, 0, bytes.Length); - } - //导入 - AssetDatabase.ImportPackage(path, false); - //删除 - File.Delete(path); - } - else - { - Debug.LogError(www.error); - } - } - } - - public static class EditorCoroutineRunner - { - private class EditorCoroutine : IEnumerator - { - private Stack executionStack; - - public EditorCoroutine(IEnumerator iterator) - { - executionStack = new Stack(); - executionStack.Push(iterator); - } - - public bool MoveNext() - { - IEnumerator i = executionStack.Peek(); - - if (i.MoveNext()) - { - object result = i.Current; - if (result != null && result is IEnumerator) - { - executionStack.Push((IEnumerator)result); - } - - return true; - } - else - { - if (executionStack.Count > 1) - { - executionStack.Pop(); - return true; - } - } - - return false; - } - - public void Reset() - { - throw new NotSupportedException("This Operation Is Not Supported."); - } - - public object Current - { - get { return executionStack.Peek().Current; } - } - - public bool Find(IEnumerator iterator) - { - return executionStack.Contains(iterator); - } - } - - private static List editorCoroutineList; - private static List buffer; - - public static IEnumerator StartEditorCoroutine(IEnumerator iterator) - { - if (editorCoroutineList == null) - { - editorCoroutineList = new List(); - } - if (buffer == null) - { - buffer = new List(); - } - if (editorCoroutineList.Count == 0) - { - EditorApplication.update += Update; - } - buffer.Add(iterator); - return iterator; - } - - private static bool Find(IEnumerator iterator) - { - foreach (EditorCoroutine editorCoroutine in editorCoroutineList) - { - if (editorCoroutine.Find(iterator)) - { - return true; - } - } - return false; - } - - private static void Update() - { - editorCoroutineList.RemoveAll(coroutine => { return coroutine.MoveNext() == false; }); - if (buffer.Count > 0) - { - foreach (IEnumerator iterator in buffer) - { - if (!Find(iterator)) - { - editorCoroutineList.Add(new EditorCoroutine(iterator)); - } - } - buffer.Clear(); - } - if (editorCoroutineList.Count == 0) - { - EditorApplication.update -= Update; - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Editor/About/TEngineWindow.cs b/Assets/TEngine/Editor/About/TEngineWindow.cs deleted file mode 100644 index 80fab714..00000000 --- a/Assets/TEngine/Editor/About/TEngineWindow.cs +++ /dev/null @@ -1,78 +0,0 @@ -using UnityEditor; -using UnityEngine; - -namespace TEngine.Editor -{ - public class TEngineWindow : EditorWindow - { - public enum ModuleType - { - /// - /// 存在Package中 - /// - InPackage, - /// - /// 存在项目中 - /// - InProject - } - public static ModuleType showModuleType; - - [MenuItem("TEngine/管理面板|TEngine管理面板", priority = 1500)] - private static void Open() - { - var window = GetWindow("管理面板|TEngine管理面板"); - window.minSize = new Vector2(900, 600); - window.maxSize = new Vector2(900, 600); - window.Show(); - } - - private void OnEnable() - { - showModuleType = (ModuleType)EditorPrefs.GetInt("showModuleType", 0); - - } - - private void OnGUI() - { - //水平布局 - GUILayout.BeginHorizontal("Toolbar"); - { - //搜索 - - } - GUILayout.EndHorizontal(); - - - GUILayout.BeginHorizontal(); - - - GUILayout.EndHorizontal(); - - //水平布局 - GUILayout.BeginHorizontal(GUILayout.ExpandHeight(true)); - { - //垂直布局 设置左侧列表宽度 - GUILayout.BeginVertical(GUILayout.Width(200f)); - { - //绘制列表 - - } - GUILayout.EndVertical(); - - //分割线 - GUILayout.Box(string.Empty, "EyeDropperVerticalLine", GUILayout.ExpandHeight(true), GUILayout.Width(1f)); - - //垂直布局 - GUILayout.BeginVertical(GUILayout.ExpandHeight(true)); - { - //绘制详情 - - } - GUILayout.EndVertical(); - } - GUILayout.EndHorizontal(); - } - } - -} diff --git a/Assets/TEngine/Editor/Inspector/MemPoolInspector.cs b/Assets/TEngine/Editor/Inspector/MemPoolInspector.cs deleted file mode 100644 index bd90bd70..00000000 --- a/Assets/TEngine/Editor/Inspector/MemPoolInspector.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using UnityEditor; -using UnityEngine; - -namespace TEngine.Editor -{ - [CustomEditor(typeof(MemPoolComponent))] - internal sealed class MemPoolInspector : TEngineInspector - { - private readonly HashSet m_OpenedItems = new HashSet(); - - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - - if (!EditorApplication.isPlaying) - { - EditorGUILayout.HelpBox("Available during runtime only.", MessageType.Info); - return; - } - - MemPoolComponent t = (MemPoolComponent)target; - - if (IsPrefabInHierarchy(t.gameObject)) - { - EditorGUILayout.LabelField("Object Pool Count", t.Count.ToString()); - - var objectPools = t.GetAllObjectPools(); - foreach (var objectPool in objectPools) - { - DrawObjectPool(objectPool); - } - } - - Repaint(); - } - - private void OnEnable() - { - } - - private void DrawObjectPool(IMemPoolBase objectPool) - { - bool lastState = m_OpenedItems.Contains(objectPool.GetName()); - bool currentState = EditorGUILayout.Foldout(lastState, objectPool.GetName()); - if (currentState != lastState) - { - if (currentState) - { - m_OpenedItems.Add(objectPool.GetName()); - } - else - { - m_OpenedItems.Remove(objectPool.GetName()); - } - } - - if (currentState) - { - EditorGUILayout.BeginVertical("box"); - { - EditorGUILayout.LabelField("Name", objectPool.GetName()); - EditorGUILayout.LabelField("Type", objectPool.GetName()); - EditorGUILayout.LabelField("Capacity", objectPool.GetPoolItemCount().ToString()); - EditorGUILayout.LabelField("Used Count", objectPool.GetPoolItemCount().ToString()); - EditorGUILayout.LabelField("Can Release Count", objectPool.GetPoolItemCount().ToString()); - } - EditorGUILayout.EndVertical(); - - EditorGUILayout.Separator(); - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Editor/Localize.meta b/Assets/TEngine/Editor/Localize.meta deleted file mode 100644 index bbea8cf4..00000000 --- a/Assets/TEngine/Editor/Localize.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1880c17ce06270c469d4353eedf9fd03 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Editor/Localize/LocalizeTextEditor.cs b/Assets/TEngine/Editor/Localize/LocalizeTextEditor.cs deleted file mode 100644 index f5989d83..00000000 --- a/Assets/TEngine/Editor/Localize/LocalizeTextEditor.cs +++ /dev/null @@ -1,28 +0,0 @@ -using UnityEditor; -using UnityEditor.UI; - -namespace TEngine -{ - [CustomEditor(typeof(LocalizeText), true)] - [CanEditMultipleObjects] - public class LocalizeTextEditor : TextEditor - { - public SerializedProperty Key; - - protected override void OnEnable() - { - UnityEngine.Debug.Log(serializedObject.FindProperty("Key")); - base.OnEnable(); - Key = serializedObject.FindProperty("Key"); - } - - public override void OnInspectorGUI() - { - EditorGUILayout.Space(); - serializedObject.Update(); - EditorGUILayout.PropertyField(Key); - serializedObject.ApplyModifiedProperties(); - base.OnInspectorGUI(); - } - } -} diff --git a/Assets/TEngine/Editor/Localize/LocalizeTextEditor.cs.meta b/Assets/TEngine/Editor/Localize/LocalizeTextEditor.cs.meta deleted file mode 100644 index df6058d7..00000000 --- a/Assets/TEngine/Editor/Localize/LocalizeTextEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 934a3a22bbb07c649b7f5e40e0d960e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/FileServer~/FileSys.js b/Assets/TEngine/FileServer~/FileSys.js deleted file mode 100644 index 2d37bf02..00000000 --- a/Assets/TEngine/FileServer~/FileSys.js +++ /dev/null @@ -1,98 +0,0 @@ -//----------------------------------------------------------------------- -// Copyright (c) TEngine. All rights reserved. -// Author: TangXiao -// Date: 2022/5/14 16:29:13 -//----------------------------------------------------------------------- -const http = require("http"); -const url = require("url"); -const fs = require("fs"); -const path = require("path"); -const mime = { - css: "text/css", - gif: "image/gif", - html: "text/html", - ico: "image/x-icon", - jpeg: "image/jpeg", - jpg: "image/jpeg", - js: "text/javascript", - json: "application/json", - pdf: "application/pdf", - png: "image/png", - svg: "image/svg+xml", - swf: "application/x-shockwave-flash", - tiff: "image/tiff", - txt: "text/plain", - wav: "audio/x-wav", - wma: "audio/x-ms-wma", - wmv: "video/x-ms-wmv", - xml: "text/xml", -}; -const port = 8081; - -const httpServer = http.createServer((request, response) => { - const requestUrl = request.url; - let pathName = url.parse(requestUrl).pathname; - - // 对路径解码,防止中文乱码 - pathName = decodeURI(pathName); - - // 绝对路径 - const filePath = path.resolve(__dirname + pathName); - - // 扩展名 - let ext = path.extname(pathName); - ext = ext ? ext.slice(1) : "unknown"; - - // 未知的类型一律用"text/plain"类型 - const contentType = mime[ext] || "text/plain"; - - // fs.stat()方法用于判断给定的路径是否存在 - fs.stat(filePath, (err, stats) => { - // 路径不存在,则返回404 - if (err) { - response.writeHead(404, { "content-type": "text/html" }); - response.end("

404 Not Found

"); - } - // 如果是文件 - if (!err && stats.isFile()) { - response.writeHead(200, { "content-type": contentType }); - // 建立流对象,读文件 - const stream = fs.createReadStream(filePath); - // 错误处理 - stream.on("error", function() { - response.writeHead(500, { "content-type": contentType }); - - response.end("

500 Server Error

"); - }); - // 读取文件 - stream.pipe(response); - //response.end(); // 这个地方有坑,加了会关闭对话,看不到内容了 - } - // 如果是路径 - if (!err && stats.isDirectory()) { - let html = " "; - // 读取该路径下文件 - fs.readdir(filePath, (err, files) => { - if (err) { - response.writeHead(500, { "content-type": contentType }); - response.end("

路径读取失败!

"); - } else { - for (const file of files) { - if (file === "index.html") { - response.writeHead(200, { "content-type": "text/html" }); - response.end(file); - break; - } - html += ``; - } - response.writeHead(200, { "content-type": "text/html" }); - response.end(html); - } - }); - } - }); -}); - -httpServer.listen(port, function() { - console.log(`File Service: ${port}`); -}); \ No newline at end of file diff --git a/Assets/TEngine/FileServer~/start.bat b/Assets/TEngine/FileServer~/start.bat deleted file mode 100644 index babde2c4..00000000 --- a/Assets/TEngine/FileServer~/start.bat +++ /dev/null @@ -1 +0,0 @@ -node FileSys.js \ No newline at end of file diff --git a/Assets/TEngine/FileServer~/start.sh b/Assets/TEngine/FileServer~/start.sh deleted file mode 100644 index babde2c4..00000000 --- a/Assets/TEngine/FileServer~/start.sh +++ /dev/null @@ -1 +0,0 @@ -node FileSys.js \ No newline at end of file diff --git a/Assets/TEngine/Images.meta b/Assets/TEngine/Images.meta deleted file mode 100644 index 0d0cc42d..00000000 --- a/Assets/TEngine/Images.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 41d7a9e682596714196b30c34dba80fc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Images/Icons Spritesheet.png b/Assets/TEngine/Images/Icons Spritesheet.png deleted file mode 100644 index ba00a87c..00000000 Binary files a/Assets/TEngine/Images/Icons Spritesheet.png and /dev/null differ diff --git a/Assets/TEngine/Images/Icons Spritesheet.png.meta b/Assets/TEngine/Images/Icons Spritesheet.png.meta deleted file mode 100644 index 2a53ebcf..00000000 --- a/Assets/TEngine/Images/Icons Spritesheet.png.meta +++ /dev/null @@ -1,872 +0,0 @@ -fileFormatVersion: 2 -guid: 0fd21678280ad9c47aa2d32baf438c5d -TextureImporter: - internalIDToNameTable: - - first: - 213: 21300000 - second: spinner_square - - first: - 213: 21300002 - second: spinner_square_thin - - first: - 213: 21300004 - second: square - - first: - 213: 21300006 - second: stopwatch_arrow - - first: - 213: 21300008 - second: stopwatch - - first: - 213: 21300010 - second: sword - - first: - 213: 21300012 - second: dot - - first: - 213: 21300014 - second: triangle - - first: - 213: 21300016 - second: circle_half - - first: - 213: 21300018 - second: circle_half_fading - - first: - 213: 21300020 - second: circle_half_fading_2 - - first: - 213: 21300022 - second: circle_half_fading_3 - - first: - 213: 21300024 - second: circle_half_fading_4 - - first: - 213: 21300026 - second: circle_half_fading_thick - - first: - 213: 21300028 - second: circle_half_fading_thick_2 - - first: - 213: 21300030 - second: circle_half_opacity - - first: - 213: 21300032 - second: circle - - first: - 213: 21300034 - second: circle_open - - first: - 213: 21300036 - second: circle_quarter - - first: - 213: 21300038 - second: circle_quarter_2 - - first: - 213: 21300040 - second: circle_quarter_2_opacity - - first: - 213: 21300042 - second: circle_quarter_3 - - first: - 213: 21300044 - second: circle_quarter_opacity - - first: - 213: 21300046 - second: cog - - first: - 213: 21300048 - second: cog_inside - - first: - 213: 21300050 - second: pickaxe - - first: - 213: 21300052 - second: rectangle - - first: - 213: 21300054 - second: rock - - first: - 213: 21300056 - second: spinner_circle - - first: - 213: 21300058 - second: spinner - - first: - 213: 21300060 - second: spinner_rounded_corners - - first: - 213: 21300062 - second: spinner_rounded_corners_thin - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 16 - mipBias: -100 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 2 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - applyGammaDecoding: 1 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 1 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: - - serializedVersion: 2 - name: spinner_square - rect: - serializedVersion: 2 - x: 0 - y: 1706.6666 - width: 341.33334 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.49999982} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 02305410000000000800000000000000 - internalID: 21300000 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: spinner_square_thin - rect: - serializedVersion: 2 - x: 341 - y: 1707 - width: 340 - height: 341 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 22305410000000000800000000000000 - internalID: 21300002 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: square - rect: - serializedVersion: 2 - x: 682 - y: 1706.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 42305410000000000800000000000000 - internalID: 21300004 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: stopwatch_arrow - rect: - serializedVersion: 2 - x: 1027 - y: 1709 - width: 334 - height: 336 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 62305410000000000800000000000000 - internalID: 21300006 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: stopwatch - rect: - serializedVersion: 2 - x: 1364 - y: 1706.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 82305410000000000800000000000000 - internalID: 21300008 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: sword - rect: - serializedVersion: 2 - x: 1705 - y: 1706.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: a2305410000000000800000000000000 - internalID: 21300010 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: dot - rect: - serializedVersion: 2 - x: 0 - y: 1365.6666 - width: 341.33334 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: c2305410000000000800000000000000 - internalID: 21300012 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: triangle - rect: - serializedVersion: 2 - x: 343 - y: 1366 - width: 339 - height: 339 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: e2305410000000000800000000000000 - internalID: 21300014 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half - rect: - serializedVersion: 2 - x: 685 - y: 1368 - width: 337 - height: 336 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 03305410000000000800000000000000 - internalID: 21300016 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_fading - rect: - serializedVersion: 2 - x: 1023 - y: 1365.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 23305410000000000800000000000000 - internalID: 21300018 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_fading_2 - rect: - serializedVersion: 2 - x: 1364 - y: 1365.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 43305410000000000800000000000000 - internalID: 21300020 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_fading_3 - rect: - serializedVersion: 2 - x: 1705 - y: 1365.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 63305410000000000800000000000000 - internalID: 21300022 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_fading_4 - rect: - serializedVersion: 2 - x: 0 - y: 1024.6666 - width: 341.33334 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 83305410000000000800000000000000 - internalID: 21300024 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_fading_thick - rect: - serializedVersion: 2 - x: 341 - y: 1024.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: a3305410000000000800000000000000 - internalID: 21300026 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_fading_thick_2 - rect: - serializedVersion: 2 - x: 682 - y: 1024.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: c3305410000000000800000000000000 - internalID: 21300028 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_half_opacity - rect: - serializedVersion: 2 - x: 1026 - y: 1026 - width: 337 - height: 338 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: e3305410000000000800000000000000 - internalID: 21300030 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle - rect: - serializedVersion: 2 - x: 1364 - y: 1024.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 04305410000000000800000000000000 - internalID: 21300032 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_open - rect: - serializedVersion: 2 - x: 1705 - y: 1024.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 24305410000000000800000000000000 - internalID: 21300034 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_quarter - rect: - serializedVersion: 2 - x: 0 - y: 683.6666 - width: 341.33334 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 44305410000000000800000000000000 - internalID: 21300036 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_quarter_2 - rect: - serializedVersion: 2 - x: 341 - y: 683.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 64305410000000000800000000000000 - internalID: 21300038 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_quarter_2_opacity - rect: - serializedVersion: 2 - x: 682 - y: 683.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 84305410000000000800000000000000 - internalID: 21300040 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_quarter_3 - rect: - serializedVersion: 2 - x: 1023 - y: 683.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: a4305410000000000800000000000000 - internalID: 21300042 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: circle_quarter_opacity - rect: - serializedVersion: 2 - x: 1364 - y: 683.6666 - width: 341.33337 - height: 341.33337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: c4305410000000000800000000000000 - internalID: 21300044 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: cog - rect: - serializedVersion: 2 - x: 1708 - y: 685 - width: 338 - height: 337 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: e4305410000000000800000000000000 - internalID: 21300046 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: cog_inside - rect: - serializedVersion: 2 - x: 0 - y: 341 - width: 341 - height: 342 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 1, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 05305410000000000800000000000000 - internalID: 21300048 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: pickaxe - rect: - serializedVersion: 2 - x: 341 - y: 342.66666 - width: 341.33337 - height: 341.33334 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 25305410000000000800000000000000 - internalID: 21300050 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: rectangle - rect: - serializedVersion: 2 - x: 682 - y: 342.66666 - width: 341.33337 - height: 341.33334 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 45305410000000000800000000000000 - internalID: 21300052 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: rock - rect: - serializedVersion: 2 - x: 1023 - y: 342.66666 - width: 341.33337 - height: 341.33334 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 65305410000000000800000000000000 - internalID: 21300054 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: spinner_circle - rect: - serializedVersion: 2 - x: 1364 - y: 342.66666 - width: 341.33337 - height: 341.33334 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: 85305410000000000800000000000000 - internalID: 21300056 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: spinner - rect: - serializedVersion: 2 - x: 1705 - y: 343 - width: 341 - height: 338 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: a5305410000000000800000000000000 - internalID: 21300058 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: spinner_rounded_corners - rect: - serializedVersion: 2 - x: 0 - y: 1.6666565 - width: 341.33334 - height: 341.33334 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: c5305410000000000800000000000000 - internalID: 21300060 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: spinner_rounded_corners_thin - rect: - serializedVersion: 2 - x: 341 - y: 1.6666565 - width: 341.33337 - height: 341.33334 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: e5305410000000000800000000000000 - internalID: 21300062 - vertices: [] - indices: - edges: [] - weights: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Images/Pulsing 4.meta b/Assets/TEngine/Images/Pulsing 4.meta deleted file mode 100644 index 527c098f..00000000 --- a/Assets/TEngine/Images/Pulsing 4.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5f30142cce1e8ff4ba8f043eaac4dcdc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Images/Pulsing 4/pulsing_4_1.anim b/Assets/TEngine/Images/Pulsing 4/pulsing_4_1.anim deleted file mode 100644 index 63e459ed..00000000 --- a/Assets/TEngine/Images/Pulsing 4/pulsing_4_1.anim +++ /dev/null @@ -1,329 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: pulsing_4_1 - serializedVersion: 6 - m_Legacy: 1 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: [] - m_ScaleCurves: [] - m_FloatCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 55 - inSlope: 180 - outSlope: 180 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.16666667 - value: 85 - inSlope: 44.999996 - outSlope: 44.999996 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: 55 - inSlope: -45.000004 - outSlope: -45.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.8333334 - value: 55 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.x - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 55 - inSlope: 180 - outSlope: 180 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.16666667 - value: 85 - inSlope: 44.999996 - outSlope: 44.999996 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: 55 - inSlope: -45.000004 - outSlope: -45.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.8333334 - value: 55 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.y - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0.5 - inSlope: 3 - outSlope: 3 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.16666667 - value: 1 - inSlope: 0.74999994 - outSlope: 0.74999994 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: 0.5 - inSlope: -0.75000006 - outSlope: -0.75000006 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.8333334 - value: 0.5 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Alpha - path: - classID: 225 - script: {fileID: 0} - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 2 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: [] - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1.8333334 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 0 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 55 - inSlope: 180 - outSlope: 180 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.16666667 - value: 85 - inSlope: 44.999996 - outSlope: 44.999996 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: 55 - inSlope: -45.000004 - outSlope: -45.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.8333334 - value: 55 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.x - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 55 - inSlope: 180 - outSlope: 180 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.16666667 - value: 85 - inSlope: 44.999996 - outSlope: 44.999996 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: 55 - inSlope: -45.000004 - outSlope: -45.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.8333334 - value: 55 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.y - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0.5 - inSlope: 3 - outSlope: 3 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.16666667 - value: 1 - inSlope: 0.74999994 - outSlope: 0.74999994 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: 0.5 - inSlope: -0.75000006 - outSlope: -0.75000006 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.8333334 - value: 0.5 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Alpha - path: - classID: 225 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/TEngine/Images/Pulsing 4/pulsing_4_1.anim.meta b/Assets/TEngine/Images/Pulsing 4/pulsing_4_1.anim.meta deleted file mode 100644 index 04a4fb6c..00000000 --- a/Assets/TEngine/Images/Pulsing 4/pulsing_4_1.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f0d4227845083f9498777503da980310 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Images/Pulsing 4/pulsing_4_2.anim b/Assets/TEngine/Images/Pulsing 4/pulsing_4_2.anim deleted file mode 100644 index ef71919b..00000000 --- a/Assets/TEngine/Images/Pulsing 4/pulsing_4_2.anim +++ /dev/null @@ -1,329 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: pulsing_4_2 - serializedVersion: 6 - m_Legacy: 1 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: [] - m_ScaleCurves: [] - m_FloatCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.083333336 - value: 85 - inSlope: 112 - outSlope: 112 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 113 - inSlope: 14 - outSlope: 14 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.6666667 - value: 85 - inSlope: -42 - outSlope: -42 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.9166666 - value: 85 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.x - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.083333336 - value: 85 - inSlope: 112 - outSlope: 112 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 113 - inSlope: 14 - outSlope: 14 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.6666667 - value: 85 - inSlope: -42 - outSlope: -42 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.9166666 - value: 85 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.y - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.083333336 - value: 0.25 - inSlope: 3 - outSlope: 3 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 1 - inSlope: 0.375 - outSlope: 0.375 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.6666667 - value: 0.25 - inSlope: -1.125 - outSlope: -1.125 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.9166666 - value: 0.25 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Alpha - path: - classID: 225 - script: {fileID: 0} - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 2 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: [] - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1.9166666 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 0 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.083333336 - value: 85 - inSlope: 112 - outSlope: 112 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 113 - inSlope: 14 - outSlope: 14 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.6666667 - value: 85 - inSlope: -42 - outSlope: -42 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.9166666 - value: 85 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.x - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.083333336 - value: 85 - inSlope: 112 - outSlope: 112 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 113 - inSlope: 14 - outSlope: 14 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.6666667 - value: 85 - inSlope: -42 - outSlope: -42 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.9166666 - value: 85 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.y - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.083333336 - value: 0.25 - inSlope: 3 - outSlope: 3 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.33333334 - value: 1 - inSlope: 0.375 - outSlope: 0.375 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.6666667 - value: 0.25 - inSlope: -1.125 - outSlope: -1.125 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.9166666 - value: 0.25 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Alpha - path: - classID: 225 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/TEngine/Images/Pulsing 4/pulsing_4_2.anim.meta b/Assets/TEngine/Images/Pulsing 4/pulsing_4_2.anim.meta deleted file mode 100644 index 0caf1218..00000000 --- a/Assets/TEngine/Images/Pulsing 4/pulsing_4_2.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9872cb868c4da1242b6f02e1a430beec -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Images/Pulsing 4/pulsing_4_3.anim b/Assets/TEngine/Images/Pulsing 4/pulsing_4_3.anim deleted file mode 100644 index ea5499ad..00000000 --- a/Assets/TEngine/Images/Pulsing 4/pulsing_4_3.anim +++ /dev/null @@ -1,329 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: pulsing_4_3 - serializedVersion: 6 - m_Legacy: 1 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: [] - m_ScaleCurves: [] - m_FloatCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.16666667 - value: 0.15 - inSlope: 3.4000003 - outSlope: 3.4000003 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41666666 - value: 1 - inSlope: 0.4250002 - outSlope: 0.4250002 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 0.15 - inSlope: -1.425 - outSlope: -1.425 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0833334 - value: 0.05 - inSlope: -0.14999999 - outSlope: -0.14999999 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.6666666 - value: 0.05 - inSlope: 0.14999999 - outSlope: 0.14999999 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 2 - value: 0.15 - inSlope: 0.29999998 - outSlope: 0.29999998 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Alpha - path: - classID: 225 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.16666667 - value: 120 - inSlope: 80.00001 - outSlope: 80.00001 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41666666 - value: 140 - inSlope: 10.000004 - outSlope: 10.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 120 - inSlope: -60 - outSlope: -60 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.x - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.16666667 - value: 120 - inSlope: 80.00001 - outSlope: 80.00001 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41666666 - value: 140 - inSlope: 10.000004 - outSlope: 10.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 120 - inSlope: -60 - outSlope: -60 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.y - path: - classID: 224 - script: {fileID: 0} - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 2 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: [] - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 2 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 0 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.16666667 - value: 0.15 - inSlope: 3.4000003 - outSlope: 3.4000003 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41666666 - value: 1 - inSlope: 0.4250002 - outSlope: 0.4250002 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 0.15 - inSlope: -1.425 - outSlope: -1.425 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.0833334 - value: 0.05 - inSlope: -0.14999999 - outSlope: -0.14999999 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1.6666666 - value: 0.05 - inSlope: 0.14999999 - outSlope: 0.14999999 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 2 - value: 0.15 - inSlope: 0.29999998 - outSlope: 0.29999998 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Alpha - path: - classID: 225 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.16666667 - value: 120 - inSlope: 80.00001 - outSlope: 80.00001 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41666666 - value: 140 - inSlope: 10.000004 - outSlope: 10.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 120 - inSlope: -60 - outSlope: -60 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.x - path: - classID: 224 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0.16666667 - value: 120 - inSlope: 80.00001 - outSlope: 80.00001 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41666666 - value: 140 - inSlope: 10.000004 - outSlope: 10.000004 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 120 - inSlope: -60 - outSlope: -60 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_SizeDelta.y - path: - classID: 224 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/TEngine/Images/Pulsing 4/pulsing_4_3.anim.meta b/Assets/TEngine/Images/Pulsing 4/pulsing_4_3.anim.meta deleted file mode 100644 index 102db4f9..00000000 --- a/Assets/TEngine/Images/Pulsing 4/pulsing_4_3.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 65d69a13d3f3f9e45aab048438948a51 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Images/TEngine512.png b/Assets/TEngine/Images/TEngine512.png deleted file mode 100644 index e53e135a..00000000 Binary files a/Assets/TEngine/Images/TEngine512.png and /dev/null differ diff --git a/Assets/TEngine/Images/TEngine512.png.meta b/Assets/TEngine/Images/TEngine512.png.meta deleted file mode 100644 index ce609a62..00000000 --- a/Assets/TEngine/Images/TEngine512.png.meta +++ /dev/null @@ -1,128 +0,0 @@ -fileFormatVersion: 2 -guid: 92581ac34d887534ca61ddbbdeb2ebf0 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: 1 - wrapV: 1 - wrapW: -1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Android - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: WebGL - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: 5e97eb03825dee720800000000000000 - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Modules~/AudioModule.unitypackage b/Assets/TEngine/Modules~/AudioModule.unitypackage deleted file mode 100644 index c79955db..00000000 Binary files a/Assets/TEngine/Modules~/AudioModule.unitypackage and /dev/null differ diff --git a/Assets/TEngine/Modules~/ECSModule.unitypackage b/Assets/TEngine/Modules~/ECSModule.unitypackage deleted file mode 100644 index d2b357d7..00000000 Binary files a/Assets/TEngine/Modules~/ECSModule.unitypackage and /dev/null differ diff --git a/Assets/TEngine/Modules~/EntityModule.unitypackage b/Assets/TEngine/Modules~/EntityModule.unitypackage deleted file mode 100644 index 11e8a48e..00000000 Binary files a/Assets/TEngine/Modules~/EntityModule.unitypackage and /dev/null differ diff --git a/Assets/TEngine/Modules~/NetModule.unitypackage b/Assets/TEngine/Modules~/NetModule.unitypackage deleted file mode 100644 index 1320a4b9..00000000 Binary files a/Assets/TEngine/Modules~/NetModule.unitypackage and /dev/null differ diff --git a/Assets/TEngine/Modules~/NugetForUnity.3.0.5.unitypackage b/Assets/TEngine/Modules~/NugetForUnity.3.0.5.unitypackage deleted file mode 100644 index 43439f31..00000000 Binary files a/Assets/TEngine/Modules~/NugetForUnity.3.0.5.unitypackage and /dev/null differ diff --git a/Assets/TEngine/Modules~/PlayerPrefabsModule.unitypackage b/Assets/TEngine/Modules~/PlayerPrefabsModule.unitypackage deleted file mode 100644 index 1056729c..00000000 Binary files a/Assets/TEngine/Modules~/PlayerPrefabsModule.unitypackage and /dev/null differ diff --git a/Assets/TEngine/Modules~/UIModule.unitypackage b/Assets/TEngine/Modules~/UIModule.unitypackage deleted file mode 100644 index bb28400a..00000000 Binary files a/Assets/TEngine/Modules~/UIModule.unitypackage and /dev/null differ diff --git a/Assets/TEngine/README.md b/Assets/TEngine/README.md deleted file mode 100644 index b8c327f3..00000000 --- a/Assets/TEngine/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# TEngine -TEngine -

- logo -

- -

TEngine

- -

- Unity框架解决方案 -
- - status - - - license - - - last - - - issue - - - topLanguage - - - status - -
- -
- 框架文档 » -
- · -
- 框架首页 » -

- - - -# TEngine v1.0.0 - -TEngine -```Json -TEngine项目结构 - -Assets -├── TResources // TResources资源加载和打包目录 -├── ConfigStruct // 生成的配置表结构体 -├── TEngine // TEngine -└── Scripts // 脚本资源 - -com.tx.tengine -├── Tools~ // 常用工具 -├── Config~ // 转表工具 -├── FileServer~ // 基于Node.js热更服务器,有条件用OSS -├── Runtime // TEngine 脚本资源 -└── TEnginePackage~ // TEngine 差异化插件,如UI、网络、热更等 - -com.tx.tengine/Runtime -├── ClientSaveData // 本地化储存 -├── 3rd // 三方插件(Json库、Protobuf) -├── Config // Config配置表 -├── Editor // Editor -├── Event // Event事件驱动系统 -├── ECS // ECS架构 -├── FileSystem // FileSystem -├── Json // Json库文件 -├── Game // 核心逻辑 -├── Unitity // Unitity工具类 -├── Res // Res资源加载模块 -└── Core // TEngine核心 - ├── BaseLogicSys // 基础系统模块,依赖TEngine实现生命周期 - ├── MemPoolMgr // 内存缓存池 - ├── TEngineRedux // DVA/Redux - ├── TSingleton // 单例以及单例管理器 - └── TEngine // 主入口 - -可定制化模块 -Assets/TEngine/Runtime/UI -├── Editor // 脚本从预制体自动生成UI代码 -├── Extend // 转表工具 -├── Res // 基于Node.js热更服务器,有条件用OSS -//TODO - -``` \ No newline at end of file diff --git a/Assets/TEngine/Runtime/3rd.meta b/Assets/TEngine/Runtime/3rd.meta deleted file mode 100644 index 4da317aa..00000000 --- a/Assets/TEngine/Runtime/3rd.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 99bd65c4be7ea5b46a417cdbed6b9064 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/3rd/Google.Protobuf.dll b/Assets/TEngine/Runtime/3rd/Google.Protobuf.dll deleted file mode 100644 index cd21d360..00000000 Binary files a/Assets/TEngine/Runtime/3rd/Google.Protobuf.dll and /dev/null differ diff --git a/Assets/TEngine/Runtime/3rd/Google.Protobuf.dll.meta b/Assets/TEngine/Runtime/3rd/Google.Protobuf.dll.meta deleted file mode 100644 index af8b20e2..00000000 --- a/Assets/TEngine/Runtime/3rd/Google.Protobuf.dll.meta +++ /dev/null @@ -1,33 +0,0 @@ -fileFormatVersion: 2 -guid: fc1df66dc43ec00438f5efe32d149c89 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/3rd/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll.meta b/Assets/TEngine/Runtime/3rd/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll.meta deleted file mode 100644 index e1301507..00000000 --- a/Assets/TEngine/Runtime/3rd/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll.meta +++ /dev/null @@ -1,75 +0,0 @@ -fileFormatVersion: 2 -guid: 17aef65a15b471f468b5fbeb4ff0c6a1 -timeCreated: 1466788349 -licenseType: Store -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Android: - enabled: 0 - settings: - CPU: AnyCPU - Any: - enabled: 0 - settings: {} - Editor: - enabled: 1 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - SamsungTV: - enabled: 0 - settings: - STV_MODEL: STANDARD_13 - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 1 - settings: - CPU: AnyCPU - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - DontProcess: False - PlaceholderPath: - SDK: AnySDK - ScriptingBackend: Il2Cpp - iOS: - enabled: 0 - settings: - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/ClientSaveMgr.meta b/Assets/TEngine/Runtime/ClientSaveMgr.meta deleted file mode 100644 index 9a8022ac..00000000 --- a/Assets/TEngine/Runtime/ClientSaveMgr.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 46219589f03af2b47b31b78944e8a61d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveData.cs b/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveData.cs deleted file mode 100644 index 4fcd15d1..00000000 --- a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveData.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System.Text; -using Newtonsoft.Json; -using UnityEngine; - -namespace TEngine -{ - public abstract class BaseClientData where T : class - { - public T Value; - - private string m_configName; - - public void Init(string configName) - { - m_configName = configName; - Load(); - } - - public void Load() - { - string fullName = ClientSaveData.GetSaveUniqPrefix() + m_configName; - var jsonString = PlayerPrefs.GetString(fullName); - if (!string.IsNullOrEmpty(jsonString)) - { - Value = ClientSaveData.Deserialize(jsonString); - } - } - - public void Save() - { - string fullName = ClientSaveData.GetSaveUniqPrefix() + m_configName; - var jsonTex = ClientSaveData.Serialize(Value); - if (!string.IsNullOrEmpty(jsonTex)) - { - PlayerPrefs.SetString(fullName, jsonTex); - PlayerPrefs.Save(); - } - } - - protected abstract string Serialize(T type); - - protected abstract T Deserialize(string value); - } - - public class ClientSaveData - { - private StringBuilder _stringBuilder = new StringBuilder(); - - public static string GetSaveUniqPrefix() - { - string hashPath = UnityUtil.GetHashCodeByString(Application.dataPath).ToString(); - string uniqInstance = SystemInfo.deviceUniqueIdentifier; - string uniqKey = hashPath + uniqInstance; - return uniqKey; - } - - public static string Serialize(T type) where T : class - { - var ret = JsonConvert.SerializeObject(type); - - return ret; - } - - public static T Deserialize(string json) where T : class - { - var ret = JsonConvert.DeserializeObject(json); - - return ret; - } - - public static T Load(string keyName, int userId = 0) where T : class - { - T ret = default(T); - - string typeName = typeof(T).Name + keyName; - - string fullName = GetSaveUniqPrefix() + typeName + userId; - - var jsonString = PlayerPrefs.GetString(fullName); - - if (!string.IsNullOrEmpty(jsonString)) - { - ret = Deserialize(jsonString); - } - return ret; - } - - public static bool Save(string keyName, T type, int userId = 0) where T : class - { - var jsonTex = Serialize(type); - - if (!string.IsNullOrEmpty(jsonTex)) - { - TLogger.LogInfoSuccessd(jsonTex); - - return Save(keyName, jsonTex, userId); - } - - return false; - } - - public static bool Save(string keyName, string json, int userId = 0) where T : class - { - var ret = false; - - string typeName = typeof(T).Name + keyName; - - string fullName = GetSaveUniqPrefix() + typeName + userId; - - if (!string.IsNullOrEmpty(json)) - { - PlayerPrefs.SetString(fullName, json); - - PlayerPrefs.Save(); - - ret = true; - } - - return ret; - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveData.cs.meta b/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveData.cs.meta deleted file mode 100644 index 604c9435..00000000 --- a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 19999af1b542c4040bea4b45f95d1807 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveMgr.cs b/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveMgr.cs deleted file mode 100644 index 61efc3c4..00000000 --- a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveMgr.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace TEngine -{ - public class ClientSaveMgr - { - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveMgr.cs.meta b/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveMgr.cs.meta deleted file mode 100644 index 6b3e6307..00000000 --- a/Assets/TEngine/Runtime/ClientSaveMgr/ClientSaveMgr.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f849a863ac1f7546b02342f75753f55 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/GameTime.cs b/Assets/TEngine/Runtime/Core/GameTime.cs deleted file mode 100644 index 40b98b32..00000000 --- a/Assets/TEngine/Runtime/Core/GameTime.cs +++ /dev/null @@ -1,119 +0,0 @@ -using UnityEngine; - -namespace TEngine -{ - /// - /// 统一获取游戏内的时间处理,减少多处调用Unity的时间函数 - /// - public static class GameTime - { - /// - /// 开始记录 - /// - public static void Start() - { - _lastFrameTimeStamp = TimeStamp; - } - - /// - /// 这一帧的记录 - /// - public static void StartFrame() - { - time = Time.time; - deltaTime = Time.deltaTime; - quickRealTime = Time.realtimeSinceStartup; - frameCount = Time.frameCount; - unscaledTime = Time.unscaledTime; - - long now = TimeStamp; - - if (ServerTimeStamp > 0) - { - ServerTimeStamp += now - _lastFrameTimeStamp; - } - else - { - ServerTimeStamp = now; - } - _lastFrameTimeStamp = now; - } - - public static float time; - public static float deltaTime; - public static int frameCount; - public static float unscaledTime; - public static long ServerTimeStamp; - private static System.DateTime _epochDateTime = System.TimeZoneInfo.ConvertTime(new System.DateTime(1970, 1, 1), System.TimeZoneInfo.Local); - public static float quickRealTime; - public static long TimeStamp => System.DateTimeOffset.Now.ToUnixTimeMilliseconds(); - private static long _lastFrameTimeStamp; - private static bool _isPause = false; - private static float _keepTimeScale = 1f; - - /// - /// 从游戏启动到现在的真实时长(秒) - /// - public static float RealtimeSinceStartup - { - get - { - return Time.realtimeSinceStartup; - } - } - - /// - /// 服务器同步时间 - /// - /// - public static void ServerTimeSync(long serverTime) - { - ServerTimeStamp = serverTime; - } - - - /// - /// 获取、设置TimeScale - /// - public static float TimeScale - { - get - { - return Time.timeScale; - } - set - { - if (!_isPause) - { - _keepTimeScale = Time.timeScale; - Time.timeScale = value; - } - } - } - - /// - /// 时间停止,所有基于DeltaTime更新的逻辑都会停滞 - /// - public static void Pause() - { - if (!_isPause) - { - _keepTimeScale = Time.timeScale; - Time.timeScale = 0f; - _isPause = true; - } - } - - /// - /// 时间恢复 - /// - public static void Resume() - { - if (_isPause) - { - Time.timeScale = _keepTimeScale; - _isPause = false; - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Core/GameTime.cs.meta b/Assets/TEngine/Runtime/Core/GameTime.cs.meta deleted file mode 100644 index 6a7df290..00000000 --- a/Assets/TEngine/Runtime/Core/GameTime.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7ca71b5731c97f341b9014200faecbf0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/ILogicSys.cs b/Assets/TEngine/Runtime/Core/ILogicSys.cs deleted file mode 100644 index a38125ac..00000000 --- a/Assets/TEngine/Runtime/Core/ILogicSys.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace TEngine -{ - public interface ILogicSys - { - bool OnInit(); - - void OnDestroy(); - - void OnStart(); - - void OnUpdate(); - - void OnLateUpdate(); - - void OnPause(); - - void OnResume(); - } - -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Core/MemPoolComponent.cs b/Assets/TEngine/Runtime/Core/MemPoolComponent.cs deleted file mode 100644 index 0953e6c6..00000000 --- a/Assets/TEngine/Runtime/Core/MemPoolComponent.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -namespace TEngine -{ - public class MemPoolComponent:UnitySingleton - { - public MemPoolMgr PoolMgr; - - protected override void OnLoad() - { - base.OnLoad(); - PoolMgr = MemPoolMgr.Instance; - } - - public int Count => PoolMgr.Count; - - public List GetAllObjectPools() - { - return PoolMgr.GetAllObjectPools(); - } - } -} diff --git a/Assets/TEngine/Runtime/Core/MemPoolComponent.cs.meta b/Assets/TEngine/Runtime/Core/MemPoolComponent.cs.meta deleted file mode 100644 index 6b5eee80..00000000 --- a/Assets/TEngine/Runtime/Core/MemPoolComponent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f83b489779008a4aaf472eb9b490ac5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/MemPoolMgr.cs b/Assets/TEngine/Runtime/Core/MemPoolMgr.cs deleted file mode 100644 index 592de90a..00000000 --- a/Assets/TEngine/Runtime/Core/MemPoolMgr.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics; - -namespace TEngine -{ - public interface IMemPoolObject - { - void Init(); - void Destroy(); - } - - public interface IMemPoolBase - { - string GetName(); - int GetPoolItemCount(); - void ClearPool(); - } - - public class MemPoolMgr : TSingleton - { - protected override void Init() - { - base.Init(); -#if UNITY_EDITOR - MemPoolComponent.Active(); -#endif - } - - public int Count => m_listPool.Count; - - List m_listPool = new List(); - - [Conditional("UNITY_EDITOR")] - public void ShowCount() - { - int totalCnt = 0; - for (int i = 0; i < m_listPool.Count; i++) - { - var pool = m_listPool[i]; - totalCnt += pool.GetPoolItemCount(); - TLogger.LogInfoSuccessd("[pool][{0}] [{1}]", pool.GetName(), pool.GetPoolItemCount()); - } - TLogger.LogInfoSuccessd("-------------------------memory pool count: {0}", totalCnt); - } - - public void RegMemPool(IMemPoolBase pool) - { - m_listPool.Add(pool); - } - - public void ClearAllPool() - { - for (int i = 0; i < m_listPool.Count; i++) - { - var pool = m_listPool[i]; - pool.ClearPool(); - } - } - - public List GetAllObjectPools() - { - return m_listPool; - } - } - - public class GameMemPool : TSingleton>, IMemPoolBase where T : IMemPoolObject, new() - { - private List m_objPool = new List(); - - public static T Alloc() - { - return GameMemPool.Instance.DoAlloc(); - } - - public static void Free(T obj) - { - GameMemPool.Instance.DoFree(obj); - } - - public GameMemPool() - { - MemPoolMgr.Instance.RegMemPool(this); - } - - private T DoAlloc() - { - T newObj; - if (m_objPool.Count > 0) - { - var lastIndex = m_objPool.Count - 1; - newObj = m_objPool[lastIndex]; - m_objPool.RemoveAt(lastIndex); - } - else - { - newObj = new T(); - } - - newObj.Init(); - return newObj; - } - - private void DoFree(T obj) - { - if (obj == null) - { - return; - } - - obj.Destroy(); - m_objPool.Add(obj); - } - - public void ClearPool() - { -#if UNITY_EDITOR - TLogger.LogInfo("clear memory[{0}] count[{1}]", GetName(), m_objPool.Count); -#endif - m_objPool.Clear(); - } - - public string GetName() - { - return typeof(T).FullName; - } - - public int GetPoolItemCount() - { - return m_objPool.Count; - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Core/MemPoolMgr.cs.meta b/Assets/TEngine/Runtime/Core/MemPoolMgr.cs.meta deleted file mode 100644 index 3cebb2ec..00000000 --- a/Assets/TEngine/Runtime/Core/MemPoolMgr.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 538182f774d67f0449e479ce28993300 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/ObjectPoolMgr.cs b/Assets/TEngine/Runtime/Core/ObjectPoolMgr.cs deleted file mode 100644 index 982639bd..00000000 --- a/Assets/TEngine/Runtime/Core/ObjectPoolMgr.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System.Collections.Generic; -using UnityEngine.Events; - -namespace TEngine -{ - /// - /// 对象池管理器 - /// - /// - public static class ObjectPoolMgr - { - private static readonly ObjectPool> m_ListPool = new ObjectPool>(null, Clear); - - static void Clear(List list) - { - list.Clear(); - } - - public static List Get() - { - return m_ListPool.Get(); - } - - public static void Release(List toRelease) - { - m_ListPool.Release(toRelease); - } - } - - public class ObjectPool where T : new() - { - private readonly Stack m_Stack = new Stack(); - private readonly UnityAction m_ActionGet; - private readonly UnityAction m_ActionRelease; - - public int CountAll { get; private set; } - public int CountActive - { - get - { - return CountAll - CountInActive; - } - } - - public int CountInActive - { - get - { - return m_Stack.Count; - } - } - - public ObjectPool() - { - - } - - public ObjectPool(UnityAction actionGet, UnityAction actionRelease) - { - m_ActionGet = actionGet; - m_ActionRelease = actionRelease; - } - - public T Get() - { - T element; - if (m_Stack.Count <= 0) - { - element = new T(); - CountAll++; - } - else - { - element = m_Stack.Pop(); - } - - if (m_ActionGet != null) - { - m_ActionGet.Invoke(element); - } - return element; - } - - public void Release(T element) - { - if (m_Stack.Count > 0 && ReferenceEquals(m_Stack.Peek(), element)) - { - TLogger.LogError("Internal error. Trying to destroy object that is already released to pool."); - } - m_ActionRelease?.Invoke(element); - m_Stack.Push(element); - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Core/ObjectPoolMgr.cs.meta b/Assets/TEngine/Runtime/Core/ObjectPoolMgr.cs.meta deleted file mode 100644 index e708ebe7..00000000 --- a/Assets/TEngine/Runtime/Core/ObjectPoolMgr.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 521d4cc35b3e9d84d9ad2e5de2c4cc09 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/Singleton.cs b/Assets/TEngine/Runtime/Core/Singleton.cs deleted file mode 100644 index 45341a12..00000000 --- a/Assets/TEngine/Runtime/Core/Singleton.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace TEngine -{ - /// - /// 通用单例,无需释放和销毁 - /// - /// - public class Singleton where T : new() - { - private static T _instance; - - public static T Instance - { - get - { - if (_instance == null) - { - _instance = new T(); - } - return _instance; - } - } - - public static T Active() - { - return Instance; - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Core/Singleton.cs.meta b/Assets/TEngine/Runtime/Core/Singleton.cs.meta deleted file mode 100644 index e07ca587..00000000 --- a/Assets/TEngine/Runtime/Core/Singleton.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 80e398d58b294df4596e470547c69b01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/TEngineEntry.cs.meta b/Assets/TEngine/Runtime/Core/TEngineEntry.cs.meta deleted file mode 100644 index daefc487..00000000 --- a/Assets/TEngine/Runtime/Core/TEngineEntry.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 24d05fd49961e7848a44005a652f95c9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/TEngineRedux.cs b/Assets/TEngine/Runtime/Core/TEngineRedux.cs deleted file mode 100644 index cb3a5421..00000000 --- a/Assets/TEngine/Runtime/Core/TEngineRedux.cs +++ /dev/null @@ -1,880 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace TEngine.Redux -{ - #region Architecture - - public interface IArchitecture - { - void RegisterSystem(T system) where T : ISystem; - - void RegisterModel(T model) where T : IModel; - - void RegisterUtility(T utility) where T : IUtility; - - T GetSystem() where T : class, ISystem; - - T GetModel() where T : class, IModel; - - T GetUtility() where T : class, IUtility; - - void SendCommand() where T : ICommand, new(); - - void SendCommand(T command) where T : ICommand; - - TResult SendQuery(IQuery query); - - void SendEvent() where T : new(); - - void SendEvent(T e); - - IUnRegister RegisterEvent(Action onEvent); - - void UnRegisterEvent(Action onEvent); - } - - public abstract class Architecture : IArchitecture where T : Architecture, new() - { - private bool _Inited = false; - - private List _Systems = new List(); - - private List _Models = new List(); - - public static Action OnRegisterPatch = architecture => { }; - - private static T _Architecture; - - public static IArchitecture Interface - { - get - { - if (_Architecture == null) - { - MakeSureArchitecture(); - } - - return _Architecture; - } - } - - - static void MakeSureArchitecture() - { - if (_Architecture == null) - { - _Architecture = new T(); - _Architecture.Init(); - - OnRegisterPatch?.Invoke(_Architecture); - - foreach (var architectureModel in _Architecture._Models) - { - architectureModel.Init(); - } - - _Architecture._Models.Clear(); - - foreach (var architectureSystem in _Architecture._Systems) - { - architectureSystem.Init(); - } - - _Architecture._Systems.Clear(); - - _Architecture._Inited = true; - } - } - - protected abstract void Init(); - - private TEngineContainer mContainer = new TEngineContainer(); - - public void RegisterSystem(TSystem system) where TSystem : ISystem - { - system.SetArchitecture(this); - mContainer.Register(system); - - if (!_Inited) - { - _Systems.Add(system); - } - else - { - system.Init(); - } - } - - public void RegisterModel(TModel model) where TModel : IModel - { - model.SetArchitecture(this); - mContainer.Register(model); - - if (!_Inited) - { - _Models.Add(model); - } - else - { - model.Init(); - } - } - - public void RegisterUtility(TUtility utility) where TUtility : IUtility - { - mContainer.Register(utility); - } - - public TSystem GetSystem() where TSystem : class, ISystem - { - return mContainer.Get(); - } - - public TModel GetModel() where TModel : class, IModel - { - return mContainer.Get(); - } - - public TUtility GetUtility() where TUtility : class, IUtility - { - return mContainer.Get(); - } - - public void SendCommand() where TCommand : ICommand, new() - { - var command = new TCommand(); - command.SetArchitecture(this); - command.Execute(); - } - - public void SendCommand(TCommand command) where TCommand : ICommand - { - command.SetArchitecture(this); - command.Execute(); - } - - public TResult SendQuery(IQuery query) - { - query.SetArchitecture(this); - return query.Do(); - } - - private TypeEventSystem mTypeEventSystem = new TypeEventSystem(); - - public void SendEvent() where TEvent : new() - { - mTypeEventSystem.Send(); - } - - public void SendEvent(TEvent e) - { - mTypeEventSystem.Send(e); - } - - public IUnRegister RegisterEvent(Action onEvent) - { - return mTypeEventSystem.Register(onEvent); - } - - public void UnRegisterEvent(Action onEvent) - { - mTypeEventSystem.UnRegister(onEvent); - } - } - - public interface IOnEvent - { - void OnEvent(T e); - } - - public static class OnGlobalEventExtension - { - public static IUnRegister RegisterEvent(this IOnEvent self) where T : struct - { - return TypeEventSystem.Global.Register(self.OnEvent); - } - - public static void UnRegisterEvent(this IOnEvent self) where T : struct - { - TypeEventSystem.Global.UnRegister(self.OnEvent); - } - } - - #endregion - - #region Controller - - public interface IController : IBelongToArchitecture, ICanSendCommand, ICanGetSystem, ICanGetModel, - ICanRegisterEvent, ICanSendQuery - { - } - - #endregion - - #region System - - public interface ISystem : IBelongToArchitecture, ICanSetArchitecture, ICanGetModel, ICanGetUtility, - ICanRegisterEvent, ICanSendEvent, ICanGetSystem - { - void Init(); - } - - public abstract class AbstractSystem : ISystem - { - private IArchitecture _Architecture; - - IArchitecture IBelongToArchitecture.GetArchitecture() - { - return _Architecture; - } - - void ICanSetArchitecture.SetArchitecture(IArchitecture architecture) - { - _Architecture = architecture; - } - - void ISystem.Init() - { - OnInit(); - } - - protected abstract void OnInit(); - } - - #endregion - - #region Model - - public interface IModel : IBelongToArchitecture, ICanSetArchitecture, ICanGetUtility, ICanSendEvent - { - void Init(); - } - - public abstract class AbstractModel : IModel - { - private IArchitecture _Architecturel; - - IArchitecture IBelongToArchitecture.GetArchitecture() - { - return _Architecturel; - } - - void ICanSetArchitecture.SetArchitecture(IArchitecture architecture) - { - _Architecturel = architecture; - } - - void IModel.Init() - { - OnInit(); - } - - protected abstract void OnInit(); - } - - #endregion - - #region Utility - - public interface IUtility - { - } - - #endregion - - #region Command - - public interface ICommand : IBelongToArchitecture, ICanSetArchitecture, ICanGetSystem, ICanGetModel, ICanGetUtility, - ICanSendEvent, ICanSendCommand, ICanSendQuery - { - void Execute(); - } - - public abstract class AbstractCommand : ICommand - { - private IArchitecture _Architecture; - - IArchitecture IBelongToArchitecture.GetArchitecture() - { - return _Architecture; - } - - void ICanSetArchitecture.SetArchitecture(IArchitecture architecture) - { - _Architecture = architecture; - } - - void ICommand.Execute() - { - OnExecute(); - } - - protected abstract void OnExecute(); - } - - #endregion - - #region Query - - public interface IQuery : IBelongToArchitecture, ICanSetArchitecture, ICanGetModel, ICanGetSystem, - ICanSendQuery - { - TResult Do(); - } - - public abstract class AbstractQuery : IQuery - { - public T Do() - { - return OnDo(); - } - - protected abstract T OnDo(); - - - private IArchitecture _Architecture; - - public IArchitecture GetArchitecture() - { - return _Architecture; - } - - public void SetArchitecture(IArchitecture architecture) - { - _Architecture = architecture; - } - } - - #endregion - - #region Rule - - public interface IBelongToArchitecture - { - IArchitecture GetArchitecture(); - } - - public interface ICanSetArchitecture - { - void SetArchitecture(IArchitecture architecture); - } - - public interface ICanGetModel : IBelongToArchitecture - { - } - - public static class CanGetModelExtension - { - public static T GetModel(this ICanGetModel self) where T : class, IModel - { - return self.GetArchitecture().GetModel(); - } - } - - public interface ICanGetSystem : IBelongToArchitecture - { - } - - public static class CanGetSystemExtension - { - public static T GetSystem(this ICanGetSystem self) where T : class, ISystem - { - return self.GetArchitecture().GetSystem(); - } - } - - public interface ICanGetUtility : IBelongToArchitecture - { - } - - public static class CanGetUtilityExtension - { - public static T GetUtility(this ICanGetUtility self) where T : class, IUtility - { - return self.GetArchitecture().GetUtility(); - } - } - - public interface ICanRegisterEvent : IBelongToArchitecture - { - } - - public static class CanRegisterEventExtension - { - public static IUnRegister RegisterEvent(this ICanRegisterEvent self, Action onEvent) - { - return self.GetArchitecture().RegisterEvent(onEvent); - } - - public static void UnRegisterEvent(this ICanRegisterEvent self, Action onEvent) - { - self.GetArchitecture().UnRegisterEvent(onEvent); - } - } - - public interface ICanSendCommand : IBelongToArchitecture - { - } - - public static class CanSendCommandExtension - { - public static void SendCommand(this ICanSendCommand self) where T : ICommand, new() - { - self.GetArchitecture().SendCommand(); - } - - public static void SendCommand(this ICanSendCommand self, T command) where T : ICommand - { - self.GetArchitecture().SendCommand(command); - } - } - - public interface ICanSendEvent : IBelongToArchitecture - { - } - - public static class CanSendEventExtension - { - public static void SendEvent(this ICanSendEvent self) where T : new() - { - self.GetArchitecture().SendEvent(); - } - - public static void SendEvent(this ICanSendEvent self, T e) - { - self.GetArchitecture().SendEvent(e); - } - } - - public interface ICanSendQuery : IBelongToArchitecture - { - } - - public static class CanSendQueryExtension - { - public static TResult SendQuery(this ICanSendQuery self, IQuery query) - { - return self.GetArchitecture().SendQuery(query); - } - } - - #endregion - - #region TypeEventSystem - - public interface IUnRegister - { - void UnRegister(); - } - - public interface IUnRegisterList - { - List UnregisterList { get; } - } - - public static class IUnRegisterListExtension - { - public static void AddToUnregisterList(this IUnRegister self, IUnRegisterList unRegisterList) - { - unRegisterList.UnregisterList.Add(self); - } - - public static void UnRegisterAll(this IUnRegisterList self) - { - foreach (var unRegister in self.UnregisterList) - { - unRegister.UnRegister(); - } - - self.UnregisterList.Clear(); - } - } - - /// - /// 自定义可注销的类 - /// - public struct CustomUnRegister : IUnRegister - { - /// - /// 委托对象 - /// - private Action mOnUnRegister { get; set; } - - /// - /// 带参构造函数 - /// - /// - public CustomUnRegister(Action onUnRegsiter) - { - mOnUnRegister = onUnRegsiter; - } - - /// - /// 资源释放 - /// - public void UnRegister() - { - mOnUnRegister.Invoke(); - mOnUnRegister = null; - } - } - - public class UnRegisterOnDestroyTrigger : MonoBehaviour - { - private readonly HashSet mUnRegisters = new HashSet(); - - public void AddUnRegister(IUnRegister unRegister) - { - mUnRegisters.Add(unRegister); - } - - public void RemoveUnRegister(IUnRegister unRegister) - { - mUnRegisters.Remove(unRegister); - } - - private void OnDestroy() - { - foreach (var unRegister in mUnRegisters) - { - unRegister.UnRegister(); - } - - mUnRegisters.Clear(); - } - } - - public static class UnRegisterExtension - { - public static IUnRegister UnRegisterWhenGameObjectDestroyed(this IUnRegister unRegister, GameObject gameObject) - { - var trigger = gameObject.GetComponent(); - - if (!trigger) - { - trigger = gameObject.AddComponent(); - } - - trigger.AddUnRegister(unRegister); - - return unRegister; - } - } - - public class TypeEventSystem - { - private readonly EasyEvents mEvents = new EasyEvents(); - - - public static readonly TypeEventSystem Global = new TypeEventSystem(); - - public void Send() where T : new() - { - mEvents.GetEvent>()?.Trigger(new T()); - } - - public void Send(T e) - { - mEvents.GetEvent>()?.Trigger(e); - } - - public IUnRegister Register(Action onEvent) - { - var e = mEvents.GetOrAddEvent>(); - return e.Register(onEvent); - } - - public void UnRegister(Action onEvent) - { - var e = mEvents.GetEvent>(); - if (e != null) - { - e.UnRegister(onEvent); - } - } - } - - #endregion - - #region TEngine - - public class TEngineContainer - { - private Dictionary _Instances = new Dictionary(); - - public void Register(T instance) - { - var key = typeof(T); - - if (_Instances.ContainsKey(key)) - { - _Instances[key] = instance; - } - else - { - _Instances.Add(key, instance); - } - } - - public T Get() where T : class - { - var key = typeof(T); - - if (_Instances.TryGetValue(key, out var retInstance)) - { - return retInstance as T; - } - - return null; - } - } - - #endregion - - #region BindableProperty - - public interface IBindableProperty : IReadonlyBindableProperty - { - new T Value { get; set; } - void SetValueWithoutEvent(T newValue); - } - - public interface IReadonlyBindableProperty - { - T Value { get; } - - IUnRegister RegisterWithInitValue(Action action); - void UnRegister(Action onValueChanged); - IUnRegister Register(Action onValueChanged); - } - - public class BindableProperty : IBindableProperty - { - public BindableProperty(T defaultValue = default) - { - mValue = defaultValue; - } - - protected T mValue; - - public T Value - { - get => GetValue(); - set - { - if (value == null && mValue == null) return; - if (value != null && value.Equals(mValue)) return; - - SetValue(value); - mOnValueChanged?.Invoke(value); - } - } - - protected virtual void SetValue(T newValue) - { - mValue = newValue; - } - - protected virtual T GetValue() - { - return mValue; - } - - public void SetValueWithoutEvent(T newValue) - { - mValue = newValue; - } - - private Action mOnValueChanged = (v) => { }; - - public IUnRegister Register(Action onValueChanged) - { - mOnValueChanged += onValueChanged; - return new BindablePropertyUnRegister() - { - BindableProperty = this, - OnValueChanged = onValueChanged - }; - } - - public IUnRegister RegisterWithInitValue(Action onValueChanged) - { - onValueChanged(mValue); - return Register(onValueChanged); - } - - public static implicit operator T(BindableProperty property) - { - return property.Value; - } - - public override string ToString() - { - return Value.ToString(); - } - - public void UnRegister(Action onValueChanged) - { - mOnValueChanged -= onValueChanged; - } - } - - public class BindablePropertyUnRegister : IUnRegister - { - public BindableProperty BindableProperty { get; set; } - - public Action OnValueChanged { get; set; } - - public void UnRegister() - { - BindableProperty.UnRegister(OnValueChanged); - - BindableProperty = null; - OnValueChanged = null; - } - } - - #endregion - - #region EasyEvent - - public interface IEasyEvent - { - } - - public class EasyEvent : IEasyEvent - { - private Action mOnEvent = () => { }; - - public IUnRegister Register(Action onEvent) - { - mOnEvent += onEvent; - return new CustomUnRegister(() => { UnRegister(onEvent); }); - } - - public void UnRegister(Action onEvent) - { - mOnEvent -= onEvent; - } - - public void Trigger() - { - mOnEvent?.Invoke(); - } - } - - public class EasyEvent : IEasyEvent - { - private Action mOnEvent = e => { }; - - public IUnRegister Register(Action onEvent) - { - mOnEvent += onEvent; - return new CustomUnRegister(() => { UnRegister(onEvent); }); - } - - public void UnRegister(Action onEvent) - { - mOnEvent -= onEvent; - } - - public void Trigger(T t) - { - mOnEvent?.Invoke(t); - } - } - - public class EasyEvent : IEasyEvent - { - private Action mOnEvent = (t, k) => { }; - - public IUnRegister Register(Action onEvent) - { - mOnEvent += onEvent; - return new CustomUnRegister(() => { UnRegister(onEvent); }); - } - - public void UnRegister(Action onEvent) - { - mOnEvent -= onEvent; - } - - public void Trigger(T t, K k) - { - mOnEvent?.Invoke(t, k); - } - } - - public class EasyEvent : IEasyEvent - { - private Action mOnEvent = (t, k, s) => { }; - - public IUnRegister Register(Action onEvent) - { - mOnEvent += onEvent; - return new CustomUnRegister(() => { UnRegister(onEvent); }); - } - - public void UnRegister(Action onEvent) - { - mOnEvent -= onEvent; - } - - public void Trigger(T t, K k, S s) - { - mOnEvent?.Invoke(t, k, s); - } - } - - public class EasyEvents - { - private static EasyEvents mGlobalEvents = new EasyEvents(); - - public static T Get() where T : IEasyEvent - { - return mGlobalEvents.GetEvent(); - } - - - public static void Register() where T : IEasyEvent, new() - { - mGlobalEvents.AddEvent(); - } - - private Dictionary mTypeEvents = new Dictionary(); - - public void AddEvent() where T : IEasyEvent, new() - { - mTypeEvents.Add(typeof(T), new T()); - } - - public T GetEvent() where T : IEasyEvent - { - IEasyEvent e; - - if (mTypeEvents.TryGetValue(typeof(T), out e)) - { - return (T)e; - } - - return default; - } - - public T GetOrAddEvent() where T : IEasyEvent, new() - { - var eType = typeof(T); - if (mTypeEvents.TryGetValue(eType, out var e)) - { - return (T)e; - } - - var t = new T(); - mTypeEvents.Add(eType, t); - return t; - } - } - - #endregion -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Core/TEngineRedux.cs.meta b/Assets/TEngine/Runtime/Core/TEngineRedux.cs.meta deleted file mode 100644 index 4ec3c4eb..00000000 --- a/Assets/TEngine/Runtime/Core/TEngineRedux.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d6ac57b69a5ba014c86bb71d54e8c24d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Core/TimerMgr.cs b/Assets/TEngine/Runtime/Core/TimerMgr.cs deleted file mode 100644 index 6ea145dc..00000000 --- a/Assets/TEngine/Runtime/Core/TimerMgr.cs +++ /dev/null @@ -1,450 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace TEngine -{ - public class TimerMgr : UnitySingleton - { - public delegate void TimerHandler(object[] args); - - public class Timer - { - public int timerId = 0; - public float curTime = 0; - public float time = 0; - public TimerHandler handler; - public bool isLoop = false; - public bool isNeedRemove = false; - public bool isRunning = false; - public bool isUnscaled = false; //是否使用非缩放的时间 - public object[] args = null; //回调参数 - } - - private int _curTimerId = 0; - private List _timerList = new List(); - private List _unscaledTimerList = new List(); - private List _cacheRemoveTimers = new List(); - private List _cacheRemoveUnscaledTimers = new List(); - - /// - /// 添加计时器 - /// - /// - /// - /// - /// - /// - /// - public int AddTimer(TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false, params object[] args) - { - Timer timer = new Timer(); - timer.timerId = ++_curTimerId; - timer.curTime = time; - timer.time = time; - timer.handler = callback; - timer.isLoop = isLoop; - timer.isUnscaled = isUnscaled; - timer.args = args; - timer.isNeedRemove = false; - timer.isRunning = true; - - InsertTimer(timer); - return timer.timerId; - } - - private void InsertTimer(Timer timer) - { - bool isInsert = false; - if (timer.isUnscaled) - { - for (int i = 0, len = _unscaledTimerList.Count; i < len; i++) - { - if (_unscaledTimerList[i].curTime > timer.curTime) - { - _unscaledTimerList.Insert(i, timer); - isInsert = true; - break; - } - } - if (!isInsert) - { - _unscaledTimerList.Add(timer); - } - } - else - { - for (int i = 0, len = _timerList.Count; i < len; i++) - { - if (_timerList[i].curTime > timer.curTime) - { - _timerList.Insert(i, timer); - isInsert = true; - break; - } - } - - if (!isInsert) - { - _timerList.Add(timer); - } - } - } - - /// - /// 暂停计时 - /// - public void Stop(int timerId) - { - Timer timer = GetTimer(timerId); - if (timer != null) timer.isRunning = false; - } - - /// - /// 恢复计时 - /// - public void Resume(int timerId) - { - Timer timer = GetTimer(timerId); - if (timer != null) timer.isRunning = true; - } - - /// - /// 计时器是否在运行中 - /// - public bool IsRunning(int timerId) - { - Timer timer = GetTimer(timerId); - return timer != null && timer.isRunning; - } - - /// - /// 获得计时器剩余时间 - /// - public float GetLeftTime(int timerId) - { - Timer timer = GetTimer(timerId); - if (timer == null) return 0; - return timer.curTime; - } - - /// - /// 重置计时器,恢复到开始状态 - /// - public void Restart(int timerId) - { - Timer timer = GetTimer(timerId); - if (timer != null) - { - timer.curTime = timer.time; - timer.isRunning = true; - } - } - - /// - /// 重置计时器 - /// - public void Reset(int timerId, TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false) - { - Timer timer = GetTimer(timerId); - if (timer != null) - { - timer.curTime = time; - timer.time = time; - timer.handler = callback; - timer.isLoop = isLoop; - timer.isNeedRemove = false; - if (timer.isUnscaled != isUnscaled) - { - RemoveTimerImmediate(timerId); - - timer.isUnscaled = isUnscaled; - InsertTimer(timer); - } - } - } - - /// - /// 重置计时器 - /// - public void Reset(int timerId, float time, bool isLoop, bool isUnscaled) - { - Timer timer = GetTimer(timerId); - if (timer != null) - { - timer.curTime = time; - timer.time = time; - timer.isLoop = isLoop; - timer.isNeedRemove = false; - if (timer.isUnscaled != isUnscaled) - { - RemoveTimerImmediate(timerId); - - timer.isUnscaled = isUnscaled; - InsertTimer(timer); - } - } - } - - /// - /// 立即移除 - /// - /// - private void RemoveTimerImmediate(int timerId) - { - for (int i = 0, len = _timerList.Count; i < len; i++) - { - if (_timerList[i].timerId == timerId) - { - _timerList.RemoveAt(i); - return; - } - } - - for (int i = 0, len = _unscaledTimerList.Count; i < len; i++) - { - if (_unscaledTimerList[i].timerId == timerId) - { - _unscaledTimerList.RemoveAt(i); - return; - } - } - } - - /// - /// 移除计时器 - /// - /// - public void RemoveTimer(int timerId) - { - for (int i = 0, len = _timerList.Count; i < len; i++) - { - if (_timerList[i].timerId == timerId) - { - _timerList[i].isNeedRemove = true; - return; - } - } - - for (int i = 0, len = _unscaledTimerList.Count; i < len; i++) - { - if (_unscaledTimerList[i].timerId == timerId) - { - _unscaledTimerList[i].isNeedRemove = true; - return; - } - } - } - - /// - /// 移除所有计时器 - /// - public void RemoveAllTimer() - { - _timerList.Clear(); - _unscaledTimerList.Clear(); - } - - /// - /// 根据TimerId获取计时器 - /// - /// - /// - private Timer GetTimer(int timerId) - { - for (int i = 0, len = _timerList.Count; i < len; i++) - { - if (_timerList[i].timerId == timerId) - { - return _timerList[i]; - } - } - - for (int i = 0, len = _unscaledTimerList.Count; i < len; i++) - { - if (_unscaledTimerList[i].timerId == timerId) - { - return _unscaledTimerList[i]; - } - } - return null; - } - - private void LoopCallInBadFrame() - { - bool isLoopCall = false; - for (int i = 0, len = _timerList.Count; i < len; i++) - { - Timer timer = _timerList[i]; - if (timer.isLoop && timer.curTime <= 0) - { - if (timer.handler != null) - { - timer.handler(timer.args); - } - timer.curTime += timer.time; - if (timer.curTime <= 0) - { - isLoopCall = true; - } - } - } - if (isLoopCall) - { - LoopCallInBadFrame(); - } - } - - private void LoopCallUnscaledInBadFrame() - { - bool isLoopCall = false; - for (int i = 0, len = _unscaledTimerList.Count; i < len; i++) - { - Timer timer = _unscaledTimerList[i]; - if (timer.isLoop && timer.curTime <= 0) - { - if (timer.handler != null) - { - timer.handler(timer.args); - } - timer.curTime += timer.time; - if (timer.curTime <= 0) - { - isLoopCall = true; - } - } - } - if (isLoopCall) - { - LoopCallUnscaledInBadFrame(); - } - } - - private void UpdateTimer() - { - bool isLoopCall = false; - for (int i = 0, len = _timerList.Count; i < len; i++) - { - Timer timer = _timerList[i]; - if (timer.isNeedRemove) - { - _cacheRemoveTimers.Add(i); - continue; - } - if (!timer.isRunning) continue; - timer.curTime -= Time.deltaTime; - if (timer.curTime <= 0) - { - if (timer.handler != null) - { - timer.handler(timer.args); - } - if (timer.isLoop) - { - timer.curTime += timer.time; - if (timer.curTime <= 0) - { - isLoopCall = true; - } - } - else - { - _cacheRemoveTimers.Add(i); - } - } - } - for (int i = _cacheRemoveTimers.Count - 1; i >= 0; i--) - { - _timerList.RemoveAt(_cacheRemoveTimers[i]); - _cacheRemoveTimers.RemoveAt(i); - } - if (isLoopCall) - { - LoopCallInBadFrame(); - } - } - - - private void UpdateUnscaledTimer() - { - bool isLoopCall = false; - for (int i = 0, len = _unscaledTimerList.Count; i < len; i++) - { - Timer timer = _unscaledTimerList[i]; - if (timer.isNeedRemove) - { - _cacheRemoveUnscaledTimers.Add(i); - continue; - } - if (!timer.isRunning) continue; - timer.curTime -= Time.unscaledDeltaTime; - if (timer.curTime <= 0) - { - if (timer.handler != null) - { - timer.handler(timer.args); - } - if (timer.isLoop) - { - timer.curTime += timer.time; - if (timer.curTime <= 0) - { - isLoopCall = true; - } - } - else - { - _cacheRemoveUnscaledTimers.Add(i); - } - } - } - for (int i = _cacheRemoveUnscaledTimers.Count - 1; i >= 0; i--) - { - _unscaledTimerList.RemoveAt(_cacheRemoveUnscaledTimers[i]); - _cacheRemoveUnscaledTimers.RemoveAt(i); - } - if (isLoopCall) - { - LoopCallUnscaledInBadFrame(); - } - } - - private void Update() - { - UpdateTimer(); - UpdateUnscaledTimer(); - } - - private List _ticker = new List(); - public System.Timers.Timer AddSystemTimer(Action callBack) - { - var timerTick = new System.Timers.Timer(); - int interval = 1000; - timerTick = new System.Timers.Timer(interval); - timerTick.AutoReset = true; - timerTick.Enabled = true; - timerTick.Elapsed += new System.Timers.ElapsedEventHandler(callBack); - - _ticker.Add(timerTick); - - return timerTick; - } - - protected override void OnDestroy() - { - DestroySystemTimer(); - base.OnDestroy(); - } - - private void DestroySystemTimer() - { - for (int i = 0; i < _ticker.Count; i++) - { - if (_ticker[i] != null) - { - _ticker[i].Stop(); - } - } - } - } -} diff --git a/Assets/TEngine/Runtime/Core/TimerMgr.cs.meta b/Assets/TEngine/Runtime/Core/TimerMgr.cs.meta deleted file mode 100644 index 8f1942cc..00000000 --- a/Assets/TEngine/Runtime/Core/TimerMgr.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 55d1c4bdcd29e244a8e8263c0831aeca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity.meta b/Assets/TEngine/Runtime/Entity.meta deleted file mode 100644 index fb5b638a..00000000 --- a/Assets/TEngine/Runtime/Entity.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d941eb2d2cbae294bb5d2788bb724e80 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/ArrayPool.cs b/Assets/TEngine/Runtime/Entity/ArrayPool.cs deleted file mode 100644 index aef46d93..00000000 --- a/Assets/TEngine/Runtime/Entity/ArrayPool.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace TEngine.EntityModule -{ - public interface IIndex - { - int Index { get; set; } - } - - internal class HashSetDebugView where T : IIndex - { - private readonly ArrayPool _set; - - public HashSetDebugView(ArrayPool set) - { - _set = set ?? throw new ArgumentNullException(nameof(set)); - } - - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public T[] Items - { - get - { - return _set.ToArray(); - } - } - } - - [DebuggerTypeProxy(typeof(HashSetDebugView<>))] - [DebuggerDisplay("Count = {Count}")] - public class ArrayPool where T:IIndex - { - internal T[] Items = new T[256]; - internal bool[] Buckets = new bool[256]; - private int _index; - private int _count; - - public T this[int index] - { - get - { - return Items[index]; - } - set - { - Items[index] = value; - } - } - - public int Count - { - get - { - return _count; - } - } - - public T[] ToArray() - { - List elements = new List(); - for (int i = 0; i < Items.Length; i++) - { - if (Buckets[i]) - { - elements.Add(Items[i]); - } - } - return elements.ToArray(); - } - - public void Remove(T item) - { - lock (this) - { - Items[item.Index] = default; - Buckets[item.Index] = false; - } - } - - public void Add(T item) - { - lock (this) - { - if (item.Index != -1) - { - if (!Buckets[item.Index]) - { - Items[item.Index] = item; - Buckets[item.Index] = true; - return; - } - } - - Items[_index] = item; - Buckets[_index] = true; - item.Index = _index; - _index++; - if (_index >= Items.Length) - { - T[] newItems = new T[Items.Length * 2]; - bool[] newBuckets = new bool[Items.Length * 2]; - Array.Copy(Items,0,newItems,0,Items.Length); - Array.Copy(Buckets, 0, newBuckets, 0, Buckets.Length); - Items = newItems; - Buckets = newBuckets; - } - _count = _index; - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/ArrayPool.cs.meta b/Assets/TEngine/Runtime/Entity/ArrayPool.cs.meta deleted file mode 100644 index 19b33d1b..00000000 --- a/Assets/TEngine/Runtime/Entity/ArrayPool.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1abd052a77e45b44ebcde5803fb36afd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Attribute.meta b/Assets/TEngine/Runtime/Entity/Attribute.meta deleted file mode 100644 index 96db231d..00000000 --- a/Assets/TEngine/Runtime/Entity/Attribute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 49e862743b5e66f49a708ca914634041 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Attribute/BaseAttribute.cs b/Assets/TEngine/Runtime/Entity/Attribute/BaseAttribute.cs deleted file mode 100644 index 89924498..00000000 --- a/Assets/TEngine/Runtime/Entity/Attribute/BaseAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace TEngine -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] - public class BaseAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/Attribute/BaseAttribute.cs.meta b/Assets/TEngine/Runtime/Entity/Attribute/BaseAttribute.cs.meta deleted file mode 100644 index d4314927..00000000 --- a/Assets/TEngine/Runtime/Entity/Attribute/BaseAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 951727040b1247947a8009f67e241b60 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Attribute/EntitySystemAttribute.cs b/Assets/TEngine/Runtime/Entity/Attribute/EntitySystemAttribute.cs deleted file mode 100644 index 1cb9c98d..00000000 --- a/Assets/TEngine/Runtime/Entity/Attribute/EntitySystemAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace TEngine -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] - public class EntitySystemAttribute : BaseAttribute - { - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/Attribute/EntitySystemAttribute.cs.meta b/Assets/TEngine/Runtime/Entity/Attribute/EntitySystemAttribute.cs.meta deleted file mode 100644 index d93d80fe..00000000 --- a/Assets/TEngine/Runtime/Entity/Attribute/EntitySystemAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 418bff9105ad99345837c9356c38d68b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Demo.meta b/Assets/TEngine/Runtime/Entity/Demo.meta deleted file mode 100644 index 5a88a2d9..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 385b1863dab169f4fa291611477e106c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Demo/ECSDemoApp.cs b/Assets/TEngine/Runtime/Entity/Demo/ECSDemoApp.cs deleted file mode 100644 index 7501af15..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/ECSDemoApp.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using TEngine.EntityModule; -using UnityEngine; - -namespace TEngine -{ - public class EcsDemoApp : MonoBehaviour - { - public GameObject @object; - - void Start() - { - var entity = Entity.Create(); - entity.AddComponent(); - entity.Bind(Instantiate(@object)); - Debug.Log(entity.ToString()); - - var entity2 = Entity.Create(); - entity2.Bind(Instantiate(@object)); - Debug.Log(entity2.ToString()); - - - TimerMgr.Instance.AddTimer((args => - { - GameEventMgr.Instance.Send>(EntityEvent.AttachToEntity,entity.InstanceId,(obj)=> - { - TLogger.LogInfoSuccessd("Attach Success"+obj.HashCode); - }); - Entity.Destroy(entity); - Entity.Destroy(entity2); - - - TimerMgr.Instance.AddTimer(objects => - { - Start(); - }, 3f); - }), 3f,false); - } - - - void Update() - { - EntitySystem.Instance.Update(); - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/Demo/ECSDemoApp.cs.meta b/Assets/TEngine/Runtime/Entity/Demo/ECSDemoApp.cs.meta deleted file mode 100644 index e837b29f..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/ECSDemoApp.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fb5cf3287e9bf3949820b50049e4bd8c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Demo/EcsDemo.unity b/Assets/TEngine/Runtime/Entity/Demo/EcsDemo.unity deleted file mode 100644 index e16c0fc9..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/EcsDemo.unity +++ /dev/null @@ -1,342 +0,0 @@ -%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, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - 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_UseShadowmask: 1 ---- !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 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &38966529 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 38966531} - - component: {fileID: 38966530} - m_Layer: 0 - m_Name: EcsSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &38966530 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 38966529} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fb5cf3287e9bf3949820b50049e4bd8c, type: 3} - m_Name: - m_EditorClassIdentifier: - object: {fileID: 3159855139361589346, guid: 5417ada688c10cf4cb2a929e4f5a5b84, type: 3} ---- !u!4 &38966531 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 38966529} - 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!1 &152798934 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 152798936} - - component: {fileID: 152798935} - 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 &152798935 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 152798934} - 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_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &152798936 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 152798934} - 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 &770039736 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 770039739} - - component: {fileID: 770039738} - - component: {fileID: 770039737} - 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 &770039737 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 770039736} - m_Enabled: 1 ---- !u!20 &770039738 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 770039736} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, 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 &770039739 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 770039736} - 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} diff --git a/Assets/TEngine/Runtime/Entity/Demo/EcsDemo.unity.meta b/Assets/TEngine/Runtime/Entity/Demo/EcsDemo.unity.meta deleted file mode 100644 index 4af3e96f..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/EcsDemo.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 41f405cfa9201e24380d1eb0d7702562 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Demo/EcsUnit.prefab b/Assets/TEngine/Runtime/Entity/Demo/EcsUnit.prefab deleted file mode 100644 index 3a2a3c82..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/EcsUnit.prefab +++ /dev/null @@ -1,32 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3159855139361589346 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8488366394885562912} - m_Layer: 0 - m_Name: EcsUnit - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &8488366394885562912 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3159855139361589346} - 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: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/TEngine/Runtime/Entity/Demo/TestUpdateCmpt.cs b/Assets/TEngine/Runtime/Entity/Demo/TestUpdateCmpt.cs deleted file mode 100644 index ef898d0d..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/TestUpdateCmpt.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TEngine; -using TEngine.EntityModule; - -public class TestUpdateCmpt : EntityComponent,IUpdate -{ - public void Update() - { - TLogger.LogInfo("update"); - } -} diff --git a/Assets/TEngine/Runtime/Entity/Demo/TestUpdateCmpt.cs.meta b/Assets/TEngine/Runtime/Entity/Demo/TestUpdateCmpt.cs.meta deleted file mode 100644 index d8270c22..00000000 --- a/Assets/TEngine/Runtime/Entity/Demo/TestUpdateCmpt.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bb79036f03a4ecc4f9e5445e185abe50 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/EcsDebugBehaviour.cs b/Assets/TEngine/Runtime/Entity/EcsDebugBehaviour.cs deleted file mode 100644 index 54cdbbb4..00000000 --- a/Assets/TEngine/Runtime/Entity/EcsDebugBehaviour.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace TEngine.EntityModule -{ - public enum EcsDebugType - { - Entity, - System, - Component - } - - [Serializable] - public class EcsCmptDebugKeyInfo - { - public string m_name; - public string val; - } - - [Serializable] - public class EcsCmptDebugInfo - { - public string m_name; - public EcsDebugType Type = EcsDebugType.Component; - public List m_info = new List(); - } - - public class EcsDebugBehaviour : UnityEngine.MonoBehaviour - { - public List m_EcsInfo = new List(); - public EcsCmptDebugInfo AddDebugCmpt(string cmptName) - { - var cmptInfo = m_EcsInfo.Find((item) => { return item.m_name == cmptName; }); - if (cmptInfo == null) - { - cmptInfo = new EcsCmptDebugInfo(); - cmptInfo.m_name = cmptName; - m_EcsInfo.Add(cmptInfo); ; - } - - return cmptInfo; - } - - public void RmvDebugCmpt(string cmptName) - { - m_EcsInfo.RemoveAll((item) => { return item.m_name == cmptName; }); - } - - public void SetDebugInfo(string cmptName, string key, string val) - { - var cmptInfo = AddDebugCmpt(cmptName); - var entry = cmptInfo.m_info.Find((t) => { return t.m_name == key; }); - if (entry == null) - { - entry = new EcsCmptDebugKeyInfo(); - entry.m_name = key; - cmptInfo.m_info.Add(entry); - } - - entry.val = val; - } - - public void RemoveAllDebugInfo(string cmpName) - { - var cmpInfo = m_EcsInfo.Find((item) => { return item.m_name == cmpName; }); - if (cmpInfo != null) - { - cmpInfo.m_info.Clear(); - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/EcsDebugBehaviour.cs.meta b/Assets/TEngine/Runtime/Entity/EcsDebugBehaviour.cs.meta deleted file mode 100644 index 3e53690c..00000000 --- a/Assets/TEngine/Runtime/Entity/EcsDebugBehaviour.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2dc3e456c545c0c419624e068b9249dc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/EcsObject.cs b/Assets/TEngine/Runtime/Entity/EcsObject.cs deleted file mode 100644 index eebcc4cb..00000000 --- a/Assets/TEngine/Runtime/Entity/EcsObject.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace TEngine.EntityModule -{ - /// - /// Entity架构基类Object - /// - public class EcsObject - { - public int InstanceId - { - get; - set; - } - - internal int HashCode - { - get; - private set; - } - - internal EntitySystem System; - - - [IgnoreDataMember] - public bool IsDisposed => this.InstanceId == 0; - - public EcsObject() - { - HashCode = GetType().GetHashCode(); - } - - public virtual void Dispose() - { - if (InstanceId != 0) - { - EntitySystem.Instance.EcsObjects.Remove(InstanceId); - } - else - { - throw new Exception($"{this.ToString()} Instance is 0 but still Dispose"); - } - InstanceId = 0; - } - - public virtual void Awake() { } - - public virtual void OnDestroy() { } - - /// - /// Remove The EcsEntity or Component And Throw the EcsObject to ArrayPool When AddComponent Or Create Can Use Again - /// - /// EcsEntity/Component/System - /// 此对象是否可以复用,复用会将对象丢入System对象池中 等待再次使用,如果是Entity对象,并且不复用的话,则把Entity所使用的组件也不复用 - public static void Destroy(EcsObject ecsObject, bool reuse = true) - { - if (ecsObject is EntityComponent entityComponent) - { -#if UNITY_EDITOR - TLogger.LogWarning($"Destroy ID {entityComponent.InstanceId} EntityComponent{entityComponent.ToString()},reuse {reuse}"); -#endif - entityComponent.Entity.Components.Remove(entityComponent); - if (entityComponent is IUpdate update) - { - entityComponent.Entity.Updates.Remove(update); - } - if (entityComponent is IFixedUpdate fixedupdate) - { - entityComponent.Entity.FixedUpdates.Remove(fixedupdate); - } - if (entityComponent is ILateUpdate lateupdate) - { - entityComponent.Entity.LateUpdates.Remove(lateupdate); - } - if (reuse) - { - entityComponent.Entity.System.Push(entityComponent); - } - ecsObject.OnDestroy(); - } - else if (ecsObject is Entity entity) - { -#if UNITY_EDITOR - TLogger.LogWarning($"Destroy ID {entity.InstanceId} Entity{entity.ToString()},reuse {reuse}"); -#endif - entity.System.RemoveEntity(entity); - entity.OnDestroy(); - while (entity.Components.Count > 0) - { - EntityComponent entityComponentTemp = entity.Components[0]; - entity.Components.RemoveAt(0); - entityComponentTemp.OnDestroy(); - if (reuse) - { - Destroy(entityComponentTemp); - } - } - entity.IsDispose = true; - if (reuse) - { - entity.System.Push(entity); - } - } - ecsObject.Dispose(); - } - - public T FindObjectOfType() where T : EcsObject - { - Type type = typeof(T); - var elements = System.Entities.ToArray(); - for (int i = 0; i < elements.Length; i++) - { - if (elements[i].GetType() == type) - { - return elements[i] as T; - } - for (int n = 0; n < elements[i].Components.Count; n++) - { - if (elements[i].Components[n].GetType() == type) - { - return elements[i].Components[n] as T; - } - } - } - return null; - } - - public T[] FindObjectsOfType() where T : EcsObject - { - Type type = typeof(T); - var items = System.Entities.ToArray(); - List elements = new List(); - for (int i = 0; i < items.Length; i++) - { - if (items[i].GetType() == type) - { - elements.Add(items[i] as T); - } - for (int n = 0; n < items[i].Components.Count; n++) - { - if (items[i].Components[n].GetType() == type) - { - elements.Add(items[i].Components[n] as T); - } - } - } - return elements.ToArray(); - } - } -} - diff --git a/Assets/TEngine/Runtime/Entity/EcsObject.cs.meta b/Assets/TEngine/Runtime/Entity/EcsObject.cs.meta deleted file mode 100644 index e9b31b25..00000000 --- a/Assets/TEngine/Runtime/Entity/EcsObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 003794832e9179348a633bdafe92ff3c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Entity.cs b/Assets/TEngine/Runtime/Entity/Entity.cs deleted file mode 100644 index e887c8ec..00000000 --- a/Assets/TEngine/Runtime/Entity/Entity.cs +++ /dev/null @@ -1,175 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using UnityEngine; - -namespace TEngine.EntityModule -{ - [Flags] - public enum EntityStatus : byte - { - None = 0, - IsFromPool = 1, - IsRegister = 1 << 1, - IsComponent = 1 << 2, - IsUsing = 1 << 3, - IsDispose = 1 << 4, - } - - public partial class Entity : EcsObject, IIndex - { - [IgnoreDataMember] - private EntityStatus status = EntityStatus.None; - - #region Status - [IgnoreDataMember] - internal bool IsFromPool - { - get => (this.status & EntityStatus.IsFromPool) == EntityStatus.IsFromPool; - set - { - if (value) - { - this.status |= EntityStatus.IsFromPool; - } - else - { - this.status &= ~EntityStatus.IsFromPool; - } - } - } - - [IgnoreDataMember] - internal bool IsDispose - { - get => (this.status & EntityStatus.IsDispose) == EntityStatus.IsDispose; - set - { - if (value) - { - this.status |= EntityStatus.IsDispose; - CanUpdate = false; - CanFixedUpdate = false; - CanLateUpdates = false; - Updates.Clear(); - FixedUpdates.Clear(); - LateUpdates.Clear(); - } - else - { - this.status &= ~EntityStatus.IsDispose; - } - } - } - - - #endregion - - [SerializeField] - internal List Components = new List(); - internal List Updates = new List(); - internal List FixedUpdates = new List(); - internal List LateUpdates = new List(); - internal bool CanUpdate; - internal bool CanFixedUpdate; - internal bool CanLateUpdates; - - public int Index { get; set; } = -1; - public Entity() - { - System = EntitySystem.Instance; - } - - ~Entity() - { - - } - - internal void Update() - { - for (int i = 0; i < Updates.Count; i++) - { - Updates[i].Update(); - } - } - - internal void FixedUpdate() - { - for (int i = 0; i < FixedUpdates.Count; i++) - { - FixedUpdates[i].FixedUpdate(); - } - } - - internal void LateUpdate() - { - for (int i = 0; i < LateUpdates.Count; i++) - { - LateUpdates[i].LateUpdate(); - } - } - - public override string ToString() - { - string str = "["; - for (int i = 0; i < Components.Count; i++) - { - str += Components[i].GetType().Name + ","; - } - str = str.TrimEnd(','); - str += "]"; - return $"{GetType().Name} InstanceId {this.InstanceId} Components: {str}"; - } - - - public void CheckDebugInfo(GameObject gameObject) - { -#if UNITY_EDITOR - if (gameObject == null) - { - return; - } - - var debugBehaviour = UnityUtil.AddMonoBehaviour(gameObject); - debugBehaviour.m_EcsInfo.Clear(); - for (int i = 0; i < this.Components.Count; i++) - { - var component = this.Components[i]; - var cmptName = component.GetType().Name; - debugBehaviour.SetDebugInfo(cmptName, "", ""); - } -#endif - } - public void CheckDebugInfo() - { -#if UNITY_EDITOR - //var actorEntity = this as Entity; - - //if (actorEntity.gameObject == null) - //{ - // return; - //} - - //var debugBehaviour = UnityUtil.AddMonoBehaviour(actorEntity.gameObject); - //debugBehaviour.m_EcsInfo.Clear(); - //for (int i = 0; i < this.Components.Count; i++) - //{ - // var component = this.Components[i]; - // var cmptName = component.GetType().Name; - // debugBehaviour.SetDebugInfo(cmptName, "", ""); - //} -#endif - } - - #region Static - public static T Create() where T : Entity, new() - { - var entity = EntitySystem.Instance.Create(); -#if UNITY_EDITOR - TLogger.LogWarning($"Create ID {entity.InstanceId} EntityComponent{entity.ToString()}"); -#endif - return entity; - } - #endregion - } -} diff --git a/Assets/TEngine/Runtime/Entity/Entity.cs.meta b/Assets/TEngine/Runtime/Entity/Entity.cs.meta deleted file mode 100644 index 03366bfb..00000000 --- a/Assets/TEngine/Runtime/Entity/Entity.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9f5bc14d7a4aee34695c39d02ae1c71f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/EntityComponent.cs b/Assets/TEngine/Runtime/Entity/EntityComponent.cs deleted file mode 100644 index 2be762e6..00000000 --- a/Assets/TEngine/Runtime/Entity/EntityComponent.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TEngine.EntityModule -{ - /// - /// Entity构架可以将此组件从Entity上移除这个组件并丢入对象池,给其他此刻需要此组件的Entity使用, - /// 因此可以节省大量的内存反复创建和释放, 这也是Entity的特性可以大量重复使用组件 - /// - public abstract class EntityComponent : EcsObject - { - public Entity Entity { get; set; } - - #region Static - public static T Create() where T : EntityComponent, new() - { - var entity = EntitySystem.Instance.CreateComponent(); -#if UNITY_EDITOR - TLogger.LogInfoSuccessd($"Create ID {entity.InstanceId} EntityComponent{ entity.ToString()}"); -#endif - return entity; - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/EntityComponent.cs.meta b/Assets/TEngine/Runtime/Entity/EntityComponent.cs.meta deleted file mode 100644 index ffe12588..00000000 --- a/Assets/TEngine/Runtime/Entity/EntityComponent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f60a73d6fbcb0a4ab868419f1a7706e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/EntityExt.cs b/Assets/TEngine/Runtime/Entity/EntityExt.cs deleted file mode 100644 index ae317d8a..00000000 --- a/Assets/TEngine/Runtime/Entity/EntityExt.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace TEngine.EntityModule -{ - partial class Entity - { - public void RmvComponent(T component) where T :EntityComponent, new() - { - Destroy(component); - - CheckUpdate(); - } - - public T AddComponent() where T :EntityComponent, new() - { - T component = EntityComponent.Create(); - component.Entity = this; - component.System = System; - Components.Add(component); - component.Awake(); - if (component is IUpdate update) - { - Updates.Add(update); - } - else if (component is IFixedUpdate fixedUpdate) - { - FixedUpdates.Add(fixedUpdate); - } - else if (component is ILateUpdate lateUpdate) - { - LateUpdates.Add(lateUpdate); - } - CheckUpdate(); - return component; - } - - public EntityComponent AddComponent(EntityComponent component) - { - component.Entity = this; - component.System = System; - Components.Add(component); - component.Awake(); - if (component is IUpdate update) - { - Updates.Add(update); - } - else if (component is IFixedUpdate fixedUpdate) - { - FixedUpdates.Add(fixedUpdate); - } - else if (component is ILateUpdate lateUpdate) - { - LateUpdates.Add(lateUpdate); - } - CheckUpdate(); - return component; - } - - public T GetComponent() where T :EntityComponent - { - for (int i = 0; i < Components.Count; i++) - { - if (Components[i] is T type) - { - return type; - } - } - - return null; - } - - public EntityComponent GetComponent(Type componentType) - { - for (int i = 0; i < Components.Count; i++) - { - if (Components[i].GetType() == componentType) - { - return Components[i]; - } - } - - return null; - } - - public T[] GetComponents() where T :EntityComponent - { - List elements = new List(); - for (int i = 0; i < Components.Count; i++) - { - if (Components[i] is T type) - { - elements.Add(type); - } - } - return elements.ToArray(); - } - - public List GetComponentsList() where T :EntityComponent - { - List elements = new List(); - for (int i = 0; i < Components.Count; i++) - { - if (Components[i] is T type) - { - elements.Add(type); - } - } - return elements; - } - - public EntityComponent[] GetComponents(Type comType) - { - List elements = new List(); - for (int i = 0; i < Components.Count; i++) - { - { - if (Components[i].GetType() == comType) - { - elements.Add(Components[i]); - } - } - } - return elements.ToArray(); - } - - private void CheckUpdate() - { - CanUpdate = Updates.Count > 0; - CanFixedUpdate = FixedUpdates.Count > 0; - CanLateUpdates = LateUpdates.Count > 0; - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/EntityExt.cs.meta b/Assets/TEngine/Runtime/Entity/EntityExt.cs.meta deleted file mode 100644 index 15b99ab7..00000000 --- a/Assets/TEngine/Runtime/Entity/EntityExt.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: db2d67ed7f48ae44fb071c9663fe1c90 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/EntitySystem.cs b/Assets/TEngine/Runtime/Entity/EntitySystem.cs deleted file mode 100644 index 67ea791c..00000000 --- a/Assets/TEngine/Runtime/Entity/EntitySystem.cs +++ /dev/null @@ -1,266 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace TEngine.EntityModule -{ - /// - /// Entity系统 - /// - [Serializable] - public class EntitySystem : IDisposable - { - private static EntitySystem _instance; - - public static EntitySystem Instance - { - get - { - if (_instance == null) - { - _instance = new EntitySystem(); - } - - return _instance; - } - } - private EntitySystem() - { - GameEventMgr.Instance.AddEventListener>(EntityEvent.AttachToEntity, AttachToEntity); - //Update(true); - MonoUtility.AddUpdateListener((() => - { - Update(false); - })); - MonoUtility.AddFixedUpdateListener(FixedUpdate); - MonoUtility.AddLateUpdateListener(LateUpdate); - } - /// - /// Key -> HashSet(type) / Value -> Stack(EcsObject) - /// - internal readonly Dictionary> ObjectPool = new Dictionary>(); - internal readonly ArrayPool Entities = new ArrayPool(); - internal readonly Dictionary EcsObjects = new Dictionary(); - internal int CurInstanceId = 1000; - - #region internal - internal void AddEntity(Entity entity) - { - entity.System = this; - entity.Awake(); - Entities.Add(entity); - } - - internal void RemoveEntity(Entity entity) - { - Entities.Buckets[entity.Index] = false; - } - - private T Get() where T : EcsObject, new() - { - int type = typeof(T).GetHashCode(); - if (ObjectPool.TryGetValue(type, out Stack stack)) - { - if (stack.Count > 0) - { - var poolObj = (T)stack.Pop(); - GenInstanceId(poolObj); - return poolObj; - } - goto Instantiate; - } - stack = new Stack(); - ObjectPool.Add(type, stack); - Instantiate: T ecsObject = new T(); - GenInstanceId(ecsObject); - return ecsObject; - } - - private void GenInstanceId(EcsObject ecsObject) - { - ecsObject.InstanceId = CurInstanceId; - Instance.CurInstanceId++; - EcsObjects.Add(ecsObject.InstanceId, ecsObject); - } - - internal void Push(EcsObject ecsObject) - { - int type = ecsObject.HashCode; - if (ObjectPool.TryGetValue(type, out Stack stack)) - { - stack.Push(ecsObject); - return; - } - stack = new Stack(); - ObjectPool.Add(type, stack); - stack.Push(ecsObject); - } - internal T Create() where T : Entity, new() - { - T entity = Get(); - entity.IsDispose = false; - AddEntity(entity); - return entity; - } - internal T CreateComponent() where T : EntityComponent, new() - { - T component = Get(); - return component; - } - #endregion - - #region Update - /// - /// 更新Entity系统 - /// - /// 线程池是否并行 - public void Update(bool worker = false) - { - int count = Entities.Count; - if (!worker) - { - for (int i = 0; i < count; i++) - { - if (!Entities.Buckets[i]) - { - continue; - } - - if (!Entities[i].CanUpdate) - { - continue; - } - Entities[i].Update(); - } - } - else - { - Parallel.For(0, count, i => - { - if (!Entities.Buckets[i]) - { - return; - } - - if (!Entities[i].CanUpdate) - { - return; - } - Entities[i].Update(); - }); - } - } - - public void FixedUpdate() - { - int count = Entities.Count; - for (int i = 0; i < count; i++) - { - if (!Entities.Buckets[i]) - { - continue; - } - - if (!Entities[i].CanFixedUpdate) - { - continue; - } - Entities[i].FixedUpdate(); - } - } - - public void LateUpdate() - { - int count = Entities.Count; - for (int i = 0; i < count; i++) - { - if (!Entities.Buckets[i]) - { - continue; - } - - if (!Entities[i].CanLateUpdates) - { - continue; - } - Entities[i].LateUpdate(); - } - } - #endregion - - #region Dispose - public void Dispose() - { - _instance = null; - } - #endregion - - #region FindObjectOfType - public T FindObjectOfType() where T : EcsObject - { - Type type = typeof(T); - var elements = Entities.ToArray(); - for (int i = 0; i < elements.Length; i++) - { - if (elements[i].GetType() == type) - { - return elements[i] as T; - } - - for (int j = 0; j < elements[i].Components.Count; j++) - { - if (elements[i].Components[j].GetType() == type) - { - return elements[i].Components[j] as T; - } - } - } - return null; - } - - public T[] FindObjectsOfType() where T : EcsObject - { - Type type = typeof(T); - var entities = Entities.ToArray(); - List elements = new List(); - for (int i = 0; i < entities.Length; i++) - { - if (entities[i].GetType() == type) - { - elements.Add(entities[i] as T); - } - for (int n = 0; n < entities[i].Components.Count; n++) - { - if (entities[i].Components[n].GetType() == type) - { - elements.Add(entities[i].Components[n] as T); - } - } - } - return elements.ToArray(); - } - #endregion - - #region AttachEventToEntity - - public void AttachToEntity(int instanceId,Action callback) - { - if (EcsObjects.TryGetValue(instanceId,out var entity)) - { - if (entity.IsDisposed) - { - return; - } - callback?.Invoke(entity); - } - } - - - #endregion - } - - public static class EntityEvent - { - public static int AttachToEntity = StringId.StringToHash("EntityEvent.AttachToEntity"); - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/EntitySystem.cs.meta b/Assets/TEngine/Runtime/Entity/EntitySystem.cs.meta deleted file mode 100644 index 08b322ab..00000000 --- a/Assets/TEngine/Runtime/Entity/EntitySystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2bd4af51a518164c8da0dff296b2bb1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/EventCmpt.cs b/Assets/TEngine/Runtime/Entity/EventCmpt.cs deleted file mode 100644 index e5002e93..00000000 --- a/Assets/TEngine/Runtime/Entity/EventCmpt.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; - -namespace TEngine.EntityModule -{ - public class EventCmpt :EntityComponent - { - private GameEvent _gameEvent; - - #region AddEventListener - public void AddEventListener(int eventId, Action action) - { - _gameEvent.AddEventListener(eventId, action); - } - - public void AddEventListener(int eventId, Action action) - { - _gameEvent.AddEventListener(eventId, action); - } - - public void AddEventListener(int eventId, Action action) - { - _gameEvent.AddEventListener(eventId, action); - } - - public void AddEventListener(int eventId, Action action) - { - _gameEvent.AddEventListener(eventId, action); - } - #endregion - - #region RemoveEventListener - public void RemoveEventListener(int eventId, Action action) - { - _gameEvent.RemoveEventListener(eventId, action); - } - - public void RemoveEventListener(int eventId, Action action) - { - _gameEvent.RemoveEventListener(eventId, action); - } - - public void RemoveEventListener(int eventId, Action action) - { - _gameEvent.RemoveEventListener(eventId, action); - } - - public void RemoveEventListener(int eventId, Action action) - { - _gameEvent.RemoveEventListener(eventId, action); - } - #endregion - - #region Send - public void Send(int eventId, T info) - { - _gameEvent.Send(eventId, info); - } - - public void Send(int eventId, T info, U info2) - { - _gameEvent.Send(eventId, info, info2); - } - - public void Send(int eventId, T info, U info2, W info3) - { - _gameEvent.Send(eventId, info, info2, info3); - } - - public void Send(int eventId) - { - _gameEvent.Send(eventId); - } - #endregion - - #region Clear - public void Clear() - { - GameMemPool.Free(_gameEvent); - } - #endregion - - #region 生命周期 - public override void OnDestroy() - { - Clear(); - } - - public override void Awake() - { - _gameEvent = GameMemPool.Alloc(); - } - #endregion - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/EventCmpt.cs.meta b/Assets/TEngine/Runtime/Entity/EventCmpt.cs.meta deleted file mode 100644 index ed947803..00000000 --- a/Assets/TEngine/Runtime/Entity/EventCmpt.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e37fd19b27821c49b3bab2d92b2fe37 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/GameObjectEntity.cs b/Assets/TEngine/Runtime/Entity/GameObjectEntity.cs deleted file mode 100644 index 9dc2bea1..00000000 --- a/Assets/TEngine/Runtime/Entity/GameObjectEntity.cs +++ /dev/null @@ -1,30 +0,0 @@ -using TEngine.EntityModule; -using UnityEngine; - -public class GameObjectEntity :Entity -{ - public GameObject gameObject; - public Transform tranform; - - public void Bind(GameObject gameObject) - { - this.gameObject = gameObject; - tranform = this.gameObject.transform; - } - - public override void Awake() - { - base.Awake(); - } - - public override void OnDestroy() - { - if (gameObject != null) - { - Object.Destroy(gameObject); - gameObject = null; - } - tranform = null; - base.OnDestroy(); - } -} diff --git a/Assets/TEngine/Runtime/Entity/GameObjectEntity.cs.meta b/Assets/TEngine/Runtime/Entity/GameObjectEntity.cs.meta deleted file mode 100644 index 5910082b..00000000 --- a/Assets/TEngine/Runtime/Entity/GameObjectEntity.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de9cbd2c7aab4a74a92303b5a7b14d3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Interface.meta b/Assets/TEngine/Runtime/Entity/Interface.meta deleted file mode 100644 index 0e864340..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7c32f376f05bf3940b98d0161b07d490 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs b/Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs deleted file mode 100644 index 5d3706d8..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TEngine.EntityModule -{ - /// - /// Entity组件物理更新接口(减少组件for循环开销) - /// - public interface IFixedUpdate - { - void FixedUpdate(); - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs.meta b/Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs.meta deleted file mode 100644 index 6420c581..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8fd15ec3752def44099dd23f93d18d24 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs b/Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs deleted file mode 100644 index bd4245eb..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TEngine.EntityModule -{ - /// - /// Entity组件物理更新接口(减少组件for循环开销) - /// - public interface ILateUpdate - { - void LateUpdate(); - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs.meta b/Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs.meta deleted file mode 100644 index 08131ac5..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5a7758a3d6376b64e96df22d14c947aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs b/Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs deleted file mode 100644 index 4fa24c06..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TEngine.EntityModule -{ - /// - /// Entity组件更新接口(减少组件for循环开销) - /// - public interface IUpdate - { - void Update(); - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs.meta b/Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs.meta deleted file mode 100644 index 1c08fb72..00000000 --- a/Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c9a60cb450a1e3a48945932e5224ea81 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/FileSystem/LogToFile.cs b/Assets/TEngine/Runtime/FileSystem/LogToFile.cs deleted file mode 100644 index 9a9186ee..00000000 --- a/Assets/TEngine/Runtime/FileSystem/LogToFile.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; - -namespace TEngine -{ - public class LogToFile - { - private FileWriter _fileWriter = new FileWriter(); - private static readonly string mLogRootPath = Path.Combine(FileSystem.PersistentDataPath, "Log").FixPath(); - private static int MaxLogDays = 3; - private static string _currentLogName = string.Empty; - - private string GetLogPath(DateTime dt) - { - string dataDir = dt.ToString("yyyy_MM_dd"); - string logPath = Path.Combine(mLogRootPath, dataDir); - return logPath.FixPath(); - } - - public void DeInit() - { - if (_fileWriter == null) - { - return; - } - _fileWriter.Flush(); - _fileWriter.Shutdown(); - } - - public void Init() - { - DateTime currentTime = DateTime.Now; - RemoveOldLogs(currentTime); - string logDir = GetLogPath(currentTime); - string logFileName = string.Format("Log_{0}.log", currentTime.ToString("yyyy_MM_dd-HH_mm_ss")); - _currentLogName = logFileName; - string fullPath = Path.Combine(logDir, logFileName).FixPath(); - try - { - if (!Directory.Exists(logDir)) - { - Directory.CreateDirectory(logDir); - } - - if (File.Exists(fullPath)) - { - File.Delete(fullPath); - } - - _fileWriter.OpenFile(fullPath); - } - catch (Exception e) - { - TLogger.LogException( e.ToString()); - } - } - - public void Write(string msg) - { - if (_fileWriter == null) - { - return; - } - _fileWriter.Write(msg); - } - - private void RemoveOldLogs(DateTime now) - { - HashSet foldersToKeep = new HashSet(); - for (int i = 0; i < MaxLogDays; i++) - { - DateTime current = now.AddDays(-i); - string folder = GetLogPath(current); - foldersToKeep.Add(folder); - } - if (Directory.Exists(mLogRootPath)) - { - try - { - string[] allLogDir = Directory.GetDirectories(mLogRootPath); - foreach (string dir in allLogDir) - { - string fixedDir = dir.FixPath(); - if (!foldersToKeep.Contains(fixedDir)) - { - try - { - Directory.Delete(fixedDir, true); - } - catch (Exception e) - { - TLogger.LogException(e.ToString()); - } - - } - } - } - catch (Exception e) - { - TLogger.LogException(e.ToString()); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/GameEntry.meta b/Assets/TEngine/Runtime/GameEntry.meta deleted file mode 100644 index 02603084..00000000 --- a/Assets/TEngine/Runtime/GameEntry.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c17cc9558bd3bb349a91660a81e5777f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs b/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs deleted file mode 100644 index e6b3b6c1..00000000 --- a/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TEngine.Net; -using UI; - -namespace TEngine -{ - partial class GameEntry - { - void RegisterSystem() - { - TEngineEntry.Instance.AddLogicSys(DataCenterSys.Instance); - TEngineEntry.Instance.AddLogicSys(BehaviourSingleSystem.Instance); - TEngineEntry.Instance.AddLogicSys(UISys.Instance); - } - } -} diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta b/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta deleted file mode 100644 index 43dddae6..00000000 --- a/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 346c9f88d1d5fd849bb40f376c5ee7ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.cs b/Assets/TEngine/Runtime/GameEntry/GameEntry.cs deleted file mode 100644 index 4cd5f684..00000000 --- a/Assets/TEngine/Runtime/GameEntry/GameEntry.cs +++ /dev/null @@ -1,19 +0,0 @@ -using UnityEngine; - -namespace TEngine -{ - public partial class GameEntry:MonoBehaviour - { - void Start() - { - TEngineEntry.Active(); - RegisterSystem(); - OnStartGame(); - } - - void OnStartGame() - { - TLogger.LogError("OnStartGame"); - } - } -} diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.cs.meta b/Assets/TEngine/Runtime/GameEntry/GameEntry.cs.meta deleted file mode 100644 index 3bb6bf6a..00000000 --- a/Assets/TEngine/Runtime/GameEntry/GameEntry.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 92823e5f43d656747901c60b79aeb51c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs b/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs deleted file mode 100644 index 7dbac055..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs +++ /dev/null @@ -1,199 +0,0 @@ -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)) - { -#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 deleted file mode 100644 index 932a7b57..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Editor/LoadStyle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e2f2a62a0258974468bfe8ab2fccd5f6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins.meta deleted file mode 100644 index a9e9da38..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 295231c456308a3489cdced651aca93f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip.meta deleted file mode 100644 index beda5bcd..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7f982917076a87a479ae4841d2594028 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android.meta deleted file mode 100644 index 9f03e67d..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b56f8e932ff91f14295ddf698182a370 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs.meta deleted file mode 100644 index 25b7f240..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 87cbb430f94b48d4ab644e722a322048 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a.meta deleted file mode 100644 index 311089d2..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e05c782dc204e684aae3f33a6374df84 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so deleted file mode 100644 index 89262f93..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so.meta deleted file mode 100644 index 84268d50..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/arm64-v8a/libzipw.so.meta +++ /dev/null @@ -1,91 +0,0 @@ -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/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a.meta deleted file mode 100644 index 3cee7469..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 38863d726795ebb42bc114993d8cad38 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so deleted file mode 100644 index 3e3cb2b9..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so.meta deleted file mode 100644 index 7b8f8061..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/armeabi-v7a/libzipw.so.meta +++ /dev/null @@ -1,33 +0,0 @@ -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/HotUpdate/Plugins/FastZip/Android/libs/x86.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86.meta deleted file mode 100644 index c5b87e9a..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 363f2b1493186de48becf1eed604a2d8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86/libzipw.so b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86/libzipw.so deleted file mode 100644 index f3249a8a..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86/libzipw.so and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86/libzipw.so.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86/libzipw.so.meta deleted file mode 100644 index 1c85da82..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/Android/libs/x86/libzipw.so.meta +++ /dev/null @@ -1,33 +0,0 @@ -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/HotUpdate/Plugins/FastZip/FastZip.cs b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/FastZip.cs deleted file mode 100644 index fd6627c4..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/FastZip.cs +++ /dev/null @@ -1,3935 +0,0 @@ -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/HotUpdate/Plugins/FastZip/FastZip.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/FastZip.cs.meta deleted file mode 100644 index ff27bfb4..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/FastZip.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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/HotUpdate/Plugins/FastZip/WebGL.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL.meta deleted file mode 100644 index 391c7d82..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a76802e8087658142a1770e79001fb80 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-AES.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-AES.zip deleted file mode 100644 index 9777ce13..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-AES.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-AES.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-AES.zip.meta deleted file mode 100644 index 578f175b..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-AES.zip.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 68b7bf2669a4d27419b66f374b51e8b8 -timeCreated: 1578624414 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-noAES.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-noAES.zip deleted file mode 100644 index 48664989..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-noAES.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-noAES.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-noAES.zip.meta deleted file mode 100644 index 98dbcd76..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw-noAES.zip.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f0a6f4e5067758543af211e78476f046 -timeCreated: 1578624414 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw.bc b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw.bc deleted file mode 100644 index 242a6fc6..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw.bc and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw.bc.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw.bc.meta deleted file mode 100644 index dbf17704..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/WebGL/zipw.bc.meta +++ /dev/null @@ -1,141 +0,0 @@ -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/HotUpdate/Plugins/FastZip/iOS.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS.meta deleted file mode 100644 index 3b937241..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0d7956afb984bbd4a872305e9060446c -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip deleted file mode 100644 index a135b0fe..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip.meta deleted file mode 100644 index 14d1d29d..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode10.3.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6eeb9c2cb063f5246a78aa3eb527347d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip deleted file mode 100644 index b28f303c..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip.meta deleted file mode 100644 index ce4fc6c5..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw-bitcode-xcode11.4.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4867bbb8663ab874b951dc27257f90a6 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a deleted file mode 100644 index 0ac79e3c..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip deleted file mode 100644 index 45075d66..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip.meta deleted file mode 100644 index a7579f96..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a-ios.Simulator.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 94855ec3b9c962e498debc069aa28414 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a.meta deleted file mode 100644 index 7eb043c6..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/libzipw.a.meta +++ /dev/null @@ -1,32 +0,0 @@ -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/HotUpdate/Plugins/FastZip/iOS/non-bitcode.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode.meta deleted file mode 100644 index 8f344ecf..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f222dd79909967a4a8c7d20938ff8977 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip deleted file mode 100644 index 99ae2d2d..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip.meta deleted file mode 100644 index 7e32962f..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/iOS/non-bitcode/libzipw.a.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 95ebaf5d93e8fd144a73b04d303acf24 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle.meta deleted file mode 100644 index 41492464..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle.meta +++ /dev/null @@ -1,44 +0,0 @@ -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/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents.meta deleted file mode 100644 index 8a6db2ff..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0e4ad9bf49a88784ca331bf8121990fc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/Info.plist b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/Info.plist deleted file mode 100644 index 095a3380..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/Info.plist +++ /dev/null @@ -1,46 +0,0 @@ - - - - - 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/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/Info.plist.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/Info.plist.meta deleted file mode 100644 index 0c7facf9..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/Info.plist.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c86f21f95c516ff4f9a464c02b3f9142 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS.meta deleted file mode 100644 index 9cde6901..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0c4d8edd6d4e14b4abf69fddfbb960ca -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw deleted file mode 100644 index 31a4f307..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw.meta deleted file mode 100644 index 01767572..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/libzipw.bundle/Contents/MacOS/libzipw.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 52d3301f351ed294f98a227f33ab85f6 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS.meta deleted file mode 100644 index 9681e976..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 3937d3ee24e47974085db745e1449425 -folderAsset: yes -timeCreated: 1567735096 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a deleted file mode 100644 index 05929d0b..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip deleted file mode 100644 index 23919b4a..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip.meta deleted file mode 100644 index 96d9375e..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a-tvos.Simulator.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: cab2b712c38923b4e98b890b50454d7f -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a.meta deleted file mode 100644 index 674463a0..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.a.meta +++ /dev/null @@ -1,124 +0,0 @@ -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/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip deleted file mode 100644 index 603bb434..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip.meta deleted file mode 100644 index d60d1e9b..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode10.3.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 37fdb245f2bbb9d4c90c97d057b1caed -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip deleted file mode 100644 index 1057331b..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip.meta deleted file mode 100644 index 18b717af..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/libzipw.bitcode.xcode11.4.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0d16f60a9aa809340a228db1e14a096e -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode.meta deleted file mode 100644 index 18e5dada..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c485bd23c13ffb64ca2e1877fb851d8e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip deleted file mode 100644 index e9f0ef96..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip.meta deleted file mode 100644 index e161e68d..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/tvOS/non-bitcode/libzipw.a.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7af8e42eb3bf3974a80b2a00e2315f6d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86.meta deleted file mode 100644 index 1a180891..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 216841e2f4169b841a63762297a59899 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.dll b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.dll deleted file mode 100644 index c2a1d178..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.dll and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.so b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.so deleted file mode 100644 index e99020db..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.so and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.so.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.so.meta deleted file mode 100644 index b5e09a74..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86/libzipw.so.meta +++ /dev/null @@ -1,122 +0,0 @@ -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/HotUpdate/Plugins/FastZip/x86_64.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64.meta deleted file mode 100644 index 6f0fc7fd..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 80e52fdbb1d0f4e46bf43d6cbbd076df -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.dll b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.dll deleted file mode 100644 index 7a8a168f..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.dll and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.dll.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.dll.meta deleted file mode 100644 index 2861a1a4..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.dll.meta +++ /dev/null @@ -1,122 +0,0 @@ -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/HotUpdate/Plugins/FastZip/x86_64/libzipw.so b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.so deleted file mode 100644 index adb63a22..00000000 Binary files a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.so and /dev/null differ diff --git a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.so.meta b/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.so.meta deleted file mode 100644 index f73ea6ec..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Plugins/FastZip/x86_64/libzipw.so.meta +++ /dev/null @@ -1,117 +0,0 @@ -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/HotUpdate/Runtime.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime.meta deleted file mode 100644 index 05f32885..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6071c64007d71e049949c219ad08a515 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs deleted file mode 100644 index e030cc1e..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime/FileunzipManager.cs +++ /dev/null @@ -1,427 +0,0 @@ -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/Launcher.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs deleted file mode 100644 index 1fd6f827..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs +++ /dev/null @@ -1,25 +0,0 @@ -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.InitParam("http://1.12.241.46:8081/TXYXGame/",isTestUpdate:true); - 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 deleted file mode 100644 index 87951227..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime/Launcher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -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/LoadDll.cs b/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadDll.cs deleted file mode 100644 index b2a88c7e..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadDll.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using TEngine; -using UnityEngine; - -public class LoadDll : MonoBehaviour -{ - private System.Reflection.Assembly gameLogic; - private Action updateAction; - - void Start() - { - LoadGameDll(); - RunMain(); - } - - private void LoadGameDll() - { -#if !UNITY_EDITOR - TextAsset dllBytes2 = TResources.Load("DLL/TEngineHotUpdate.dll.bytes"); - //生产模式从bytes加载 - gameLogic = System.Reflection.Assembly.Load(dllBytes2.bytes); -#else - //编辑器模式从dll反射加载 - gameLogic = AppDomain.CurrentDomain.GetAssemblies().First(assembly => assembly.GetName().Name == "TEngineHotUpdate"); -#endif - } - - private void RunMain() - { - if (gameLogic == null) - { - UnityEngine.Debug.LogError("DLL未加载"); - return; - } - - AddMyComponent("TEngineCore.TEngineDemo", this.gameObject); - - Type appType = gameLogic.GetType("TEngineCore.TEngineDemo"); - var method = appType.GetMethod("GetUpdateDelegate"); - updateAction = (Action)method.Invoke(null, null); - } - - void AddMyComponent(string className, GameObject obj) - { - Type type = gameLogic.GetType(className); - obj.AddComponent(type); - } - - - void Update() - { - if(updateAction != null) - { - updateAction(Time.deltaTime); - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadDll.cs.meta b/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadDll.cs.meta deleted file mode 100644 index b5e126cc..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadDll.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6c3c520ddf3e7a74499ea41cf4b09db2 -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 deleted file mode 100644 index 45a1d0b8..00000000 --- a/Assets/TEngine/Runtime/HotUpdate/Runtime/LoadMgr.cs +++ /dev/null @@ -1,905 +0,0 @@ -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; - 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; - } - } - } - - public class LoadMgr : TSingleton - { - private bool _isTestUpdate = false; - - /// - /// 资源版本号 - /// - 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; - private bool _needUpdate = false; - 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() - { - _curTryCount = 0; - _connectBack = false; - _startGameEvent = null; - } - - public bool IsLaunched() - { - return _instance._loaderUpdateLaunched; - } - - public void InitParam(string url,bool isTestUpdate = false) - { - Url = url; - _isTestUpdate = isTestUpdate; - } - - 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 - if (_isTestUpdate) - { - StartLoad(() => { FinishCallBack(onUpdateComplete); }); - return; - } - onUpdateComplete?.Invoke(); -#endif - } - } - - /// - /// 开启热更新逻辑 - /// - /// - public void StartLoad(Action action) - { - _loaderUpdateLaunched = true; - _startGameEvent = action; - _connectBack = false; - _curTryCount = 0; - RequestVersion(); - } - - private void FinishCallBack(Action callBack) - { - GameConfig.Instance.WriteVersion(LatestResId); - if (_needUpdate) - { - callBack(); - } - else - { - callBack(); - } - } - - /// - /// 请求热更数据 - /// - private void RequestVersion() - { - if (_connectBack) - { - return; - } - - _curTryCount++; - - 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(Url) || 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); - var onlineParam = (Dictionary)MiniJSON.Json.Deserialize(onlineParamStr); - string onlineResVersion = onlineParam["resVersion"].ToString(); - TLogger.LogInfo($"onlineResVersion:{onlineResVersion}"); - LatestResId = onlineResVersion; - var resListStr = LoaderUtilities.HttpGet(GetOnlineResListUrl(LatestResId) + "Md5CheckList.json"); - var resDic = (Dictionary)MiniJSON.Json.Deserialize(resListStr); - List resList = (List)resDic["target"]; - _connectBack = true; - - OnHttpResponse(CreateLoadData(onlineParam, resList)); - } - catch (Exception e) - { -#if UNITY_EDITOR - StartGame(); -#else - LoaderUtilities.DelayFun(RequestVersion, new WaitForSeconds(1f)); -#endif - TLogger.LogError(e.Message); - } - return; - } - - internal void OnHttpResponse(LoadData formatData) - { - if (formatData == null) - { - return; - } - //检测一下是不是本地存在该版本,如果存在就本地做回退,不需要走下载流程 - _currentData = formatData; - var exitLocalVersion = _CheckLocalVersion(_currentData.List); - if (exitLocalVersion) - { - _needUpdate = LatestResId != GameConfig.Instance.ResId; - StartGame(); - return; - } - //检测一下本地是否存在资源,如果存在了就直接解压就行了,如果不存在还需要下载 - _currentData.List = _CheckLocalExitResource(_currentData.List); - _currentType = _currentData.Type; - - 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(); - } - - /// - /// 本地检测,过滤掉本地存在了的资源 - /// - /// - /// - private List _CheckLocalExitResource(List res) - { - var list = new List(); - foreach (var item in res) - { - string resPath = _downloadFilePath + item.Url; - if (File.Exists(resPath)) - { - if (string.CompareOrdinal(LoaderUtilities.GetMd5Hash(resPath), item.Md5) == 0) - { - continue; - } - - list.Add(item); - } - else - { - list.Add(item); - } - } - return list; - } - - /// - /// 检测是否是版本回退了 - /// - /// - /// - private bool _CheckLocalVersion(List res) - { - foreach (var item in res) - { - string tempVersion = item.Url.Split('_')[1]; - if (!GameConfig.Instance.CheckLocalVersion(tempVersion)) - { - return false; - } - } - - return true; - } - - public void StartGame() - { - if (_startGameEvent != null) - { - _startGameEvent(); - } - } - - internal LoadData CreateLoadData(Dictionary onlineParam, List resList = null) - { - if (onlineParam == null) - { - return null; - } - var data = new LoadData(); - var result = int.Parse("1"); - var versionStr = LoaderUtilities.HttpGet(GetOnlineResListUrl(LatestResId) + "version.json"); - var versionDic = (Dictionary)MiniJSON.Json.Deserialize(versionStr); - string version = versionDic["AppVersion"].ToString(); - switch (result) - { - case (int)VersionRequestErrorCode.Ok: - { - data.Type = UpdateType.ResourceUpdate; - data.Style = UpdateStyle.Optional; - data.Notice = UpdateNotice.Notice; - - data.Type = (UpdateType)int.Parse(onlineParam["UpdateType"].ToString()); - - if (GameConfig.Instance.ResId == LatestResId) - { - TLogger.LogInfo("GameConfig.Instance.ResId 匹配,无需更新"); - data.Type = UpdateType.None; - } - if (data.Type != UpdateType.PackageUpdate) - { - data.Style = (UpdateStyle)int.Parse(onlineParam["UpdateStyle"].ToString()); - data.Notice = (UpdateNotice)int.Parse(onlineParam["UpdateNotice"].ToString()); - } - data.List = new List(); - data.All = new List(); - - if (resList != null) - { - for (int i = 0; i < resList.Count; i++) - { - var item = (Dictionary)resList[i]; - string fileName = item["fileName"].ToString(); - var itemTemp = new LoadResource - { - RemoteUrl = _onlineResListUrl + fileName, - Md5 = item["md5"].ToString(), - Size = (long)item["fileSize"], - Url = fileName + "_" + LatestResId, - }; - data.List.Add(itemTemp); - data.All.Add(itemTemp); - } - } - break; - } - - case (int)VersionRequestErrorCode.Patch_Not_Exist: - LatestResId = string.Empty; -#if UNITY_EDITOR_WIN || _DEVELOPMENT_BUILD_ - StartGame(); -#else - 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) - { - TLogger.LogInfo($"GameConfig.Instance.ResId{GameConfig.Instance.ResId} == onlineResVersion{LatestResId}"); - } - else - { - TLogger.LogInfo($"GameConfig.Instance.ResId{GameConfig.Instance.ResId} != onlineResVersion{LatestResId}"); - } - - return data; - } - - private string _resListUrl = string.Empty; - private string _onlineParamUrl = string.Empty; - internal string Url = string.Empty; - - internal string ResListUrl - { - get - { - if (string.IsNullOrEmpty(_resListUrl)) - { -#if UNITY_EDITOR || UNITY_ANDROID - _resListUrl = Url + "AssetBundles/Android/ver_" + GameConfig.Instance.ResId + "/"; -#elif UNITY_IOS || UNITY_IPHONE - _resListUrl = Url + "AssetBundles/IOS/ver_" + GameConfig.Instance.ResId + "/"; -#elif UNITY_STANDALONE_WIN - _resListUrl = Url + "AssetBundles/WIN/ver_" + GameConfig.Instance.ResId + "/"; -#endif - } - return _resListUrl; - } - } - - private string _onlineResListUrl = string.Empty; - internal string GetOnlineResListUrl(string onlineResId) - { - if (string.IsNullOrEmpty(_onlineResListUrl)) - { -#if UNITY_EDITOR || UNITY_ANDROID - _onlineResListUrl = Url + "AssetBundles/Android/ver_" + onlineResId + "/"; -#elif UNITY_IOS || UNITY_IPHONE - _onlineResListUrl = Url + "AssetBundles/IOS/ver_" + onlineResId + "/"; -#elif UNITY_STANDALONE_WIN - _onlineResListUrl = Url + "AssetBundles/WIN/ver_" + onlineResId + "/"; -#endif - } - TLogger.LogInfo(_onlineResListUrl); - return _onlineResListUrl; - } - - internal string OnlineParamUrl - { - get - { - if (string.IsNullOrEmpty(_onlineParamUrl)) - { -#if UNITY_EDITOR || UNITY_ANDROID - _onlineParamUrl = Url + "androidVer.json"; -#elif UNITY_IOS || UNITY_IPHONE - _onlineParamUrl = Url + "iosVer.json"; -#elif UNITY_STANDALONE_WIN - _onlineParamUrl = Url + "winVer.json"; -#endif - } - return _onlineParamUrl; - } - } - - - public void StartDownLoad() - { - if (Downloader == null) - return; - - if (Downloader.IsLoading()) - { - TLogger.LogInfo("Loadermanager.StartUpdate,down loading......"); - return; - } - - - if (_coroutine != null) - { - MonoUtility.StopCoroutine(_coroutine); - _coroutine = null; - } - //开始下载 - _coroutine = MonoUtility.StartCoroutine(Downloader.DownLoad()); - - LoaderUtilities.DelayFun(() => - { - if (_load_data_check != null) - { - MonoUtility.StopCoroutine(_load_data_check); - } - - _load_data_check = MonoUtility.StartCoroutine(_StartLoadingCheck()); - }, new WaitForSeconds(1)); - } - - public void StopDownLoad() - { - if (Downloader == null) - return; - - Downloader.StopDownLoad(); - if (_coroutine == null) return; - MonoUtility.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) - { - MonoUtility.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); - MonoUtility.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/Localize.meta b/Assets/TEngine/Runtime/Localize.meta deleted file mode 100644 index 8603054c..00000000 --- a/Assets/TEngine/Runtime/Localize.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7705658e744e8ee47b4575cb0df197b5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Localize/LocalizeMgr.cs b/Assets/TEngine/Runtime/Localize/LocalizeMgr.cs deleted file mode 100644 index b6d77101..00000000 --- a/Assets/TEngine/Runtime/Localize/LocalizeMgr.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json; -using UnityEngine; - -namespace TEngine -{ - public enum Language - { - Chinese = 1, - English = 2, - } - - public struct LocalizationId - { - public int CurlocalizationId; - } - - public class LocalizeConfigNode - { - public string Chinese; - public string EngLish; - } - - public class LocalizeMgr : TSingleton - { - private int _curLanguage; - private Dictionary _localDic = new Dictionary(); - - const string LocalizeIdPath = "Localization/LocalizationId.json"; - - const string ConfigPath = "Localization/Localization.json"; - - public void InitLocalize() - { - _localDic.Clear(); - string localizeIdJson = ResMgr.Instance.GetStringFromAsset(LocalizeIdPath); - string localizeConfigJson = ResMgr.Instance.GetStringFromAsset(ConfigPath); - if (localizeIdJson == null) - { - TLogger.LogError("当前国际化地区配置不存在,请检查配置"); - return; - } - - if (localizeConfigJson == null) - { - TLogger.LogError("国际化配置表找不到Json文件,请检查配置"); - return; - } - - LocalizationId id = JsonUtility.FromJson(localizeIdJson); - - _curLanguage = id.CurlocalizationId; - - SetLanguage(id.CurlocalizationId); - - Dictionary dic = DeserializeStringToDictionary(localizeConfigJson); - foreach (var item in dic) - { - switch ((Language)_curLanguage) - { - case Language.Chinese: - _localDic.Add(item.Key, item.Value.Chinese); - break; - case Language.English: - _localDic.Add(item.Key, item.Value.EngLish); - break; - default: - break; - } - } - } - - public void SetLanguage(int type) - { - _curLanguage = type; - } - - public string GetLocalizeStr(int localizeKey) - { - if (localizeKey <= 0) - { - TLogger.LogError($"国际化表内未配置key为: {localizeKey},请检查配置"); - return null; - } - if (_localDic[localizeKey] == null || _localDic[localizeKey] == "") - { - TLogger.LogError($"当前语言为: {(Language)_curLanguage},国际化表内未配置key为: {localizeKey} 的value,请检查配置"); - return null; - } - return _localDic[localizeKey]; - } - - - public int GetLocalId(string _value) - { - - foreach (var item in _localDic) - { - if (item.Value == _value) - { - return item.Key; - } - } - return 0; - } - - public int GetCurLanguage() - { - return (int)_curLanguage; - } - - private static Dictionary DeserializeStringToDictionary(string jsonStr) - { - if (string.IsNullOrEmpty(jsonStr)) - { - return new Dictionary(); - } - Dictionary jsonDict = JsonConvert.DeserializeObject>(jsonStr); - - return jsonDict; - } - } -} diff --git a/Assets/TEngine/Runtime/Localize/LocalizeMgr.cs.meta b/Assets/TEngine/Runtime/Localize/LocalizeMgr.cs.meta deleted file mode 100644 index c04cc239..00000000 --- a/Assets/TEngine/Runtime/Localize/LocalizeMgr.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 39e880034a65e7d40a1f190b90b29e67 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Localize/LocalizeText.cs b/Assets/TEngine/Runtime/Localize/LocalizeText.cs deleted file mode 100644 index 72f5d3d2..00000000 --- a/Assets/TEngine/Runtime/Localize/LocalizeText.cs +++ /dev/null @@ -1,33 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; - -namespace TEngine -{ - public class LocalizeText:Text - { - [SerializeField] public int Key; - - public string SetText(int key) - { - return LocalizeMgr.Instance.GetLocalizeStr(key); - } - - protected override void Start() - { - base.Start(); - if (Key > 0 && string.IsNullOrEmpty(this.text)) - { - text = SetText(Key); - } - else if (!string.IsNullOrEmpty(this.text)) - { - Key = LocalizeMgr.Instance.GetLocalId(this.text); - if (Key <= 0) - { - return; - } - text = SetText(Key); - } - } - } -} diff --git a/Assets/TEngine/Runtime/Localize/LocalizeText.cs.meta b/Assets/TEngine/Runtime/Localize/LocalizeText.cs.meta deleted file mode 100644 index cad49e59..00000000 --- a/Assets/TEngine/Runtime/Localize/LocalizeText.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 11e68aa9889a748498a30d2c31d885de -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net.meta b/Assets/TEngine/Runtime/Net.meta deleted file mode 100644 index 8bb6ec89..00000000 --- a/Assets/TEngine/Runtime/Net.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e800972100523f14ebc6cae9f2fd6644 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ClientConnectWatcher.cs b/Assets/TEngine/Runtime/Net/ClientConnectWatcher.cs deleted file mode 100644 index c8202a69..00000000 --- a/Assets/TEngine/Runtime/Net/ClientConnectWatcher.cs +++ /dev/null @@ -1,166 +0,0 @@ -namespace TEngine.Net -{ - enum ClientConnectWatcherStatus - { - StatusInit, - StatusReconnectAuto, - StatusReconnectConfirm, - StatusWaitExit - } - - class ClientConnectWatcher - { - #region Propreties - private GameClient m_client; - private float m_statusTime; - private int m_reconnetCnt = 0; - private int m_disconnectReason = 0; - private ClientConnectWatcherStatus m_status = ClientConnectWatcherStatus.StatusInit; - - private bool m_enable = false; - public bool Enable - { - get { return m_enable; } - set - { - if (m_enable != value) - { - m_enable = value; - if (m_enable) - { - OnEnable(); - } - else - { - OnDisable(); - } - } - } - } - - ClientConnectWatcherStatus Status - { - get { return m_status; } - set - { - if (m_status != value) - { - m_status = value; - m_statusTime = GameTime.time; - } - } - } - #endregion - - public ClientConnectWatcher(GameClient client) - { - m_client = client; - m_statusTime = GameTime.time; - m_status = ClientConnectWatcherStatus.StatusInit; - } - - public void Update() - { - if (!m_enable) - { - return; - } - - if (m_client.IsEntered) - { - return; - } - - switch (m_status) - { - case ClientConnectWatcherStatus.StatusInit: - UpdateOnInitStatus(); - break; - case ClientConnectWatcherStatus.StatusReconnectAuto: - UpdateOnReconnectAuto(); - break; - case ClientConnectWatcherStatus.StatusReconnectConfirm: - UpdateOnReconnectConfirm(); - break; - case ClientConnectWatcherStatus.StatusWaitExit: - UpdateOnWaitExit(); - break; - - default: - break; - } - } - - public void OnReConnect() - { - if (m_status == ClientConnectWatcherStatus.StatusReconnectConfirm) - { - Status = ClientConnectWatcherStatus.StatusReconnectAuto; - } - } - - void UpdateOnInitStatus() - { - if (m_reconnetCnt <= 2) - { - if (m_reconnetCnt == 0) - { - m_disconnectReason = m_client.LastNetErrCode; - } - - Status = ClientConnectWatcherStatus.StatusReconnectAuto; - m_reconnetCnt++; - - //Reconnect - m_client.Reconnect(); - } - else - { - Status = ClientConnectWatcherStatus.StatusReconnectConfirm; - m_reconnetCnt++; - - //var window = UISys.Mgr.ShowWindow(); - //window.SetErrCode(m_disconnectReason); - } - } - - void UpdateOnReconnectAuto() - { - if (m_client.IsEntered) - { - Status = ClientConnectWatcherStatus.StatusInit; - m_reconnetCnt = 0; - return; - } - - float nowTime = GameTime.time; - if (m_statusTime + 5 < nowTime) - { - //切换到默认的,下一帧继续判断是否需要自动还是手动 - Status = ClientConnectWatcherStatus.StatusInit; - return; - } - } - - void UpdateOnReconnectConfirm() - { - - } - - void UpdateOnWaitExit() - { - } - - private void OnDisable() - { - Status = ClientConnectWatcherStatus.StatusInit; - m_reconnetCnt = 0; - } - - private void OnEnable() - { - Status = ClientConnectWatcherStatus.StatusInit; - m_reconnetCnt = 0; - } - } -} diff --git a/Assets/TEngine/Runtime/Net/ClientConnectWatcher.cs.meta b/Assets/TEngine/Runtime/Net/ClientConnectWatcher.cs.meta deleted file mode 100644 index ef847c6d..00000000 --- a/Assets/TEngine/Runtime/Net/ClientConnectWatcher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3a6f66c5fcbf4b4db89a4a9405d329d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ClientSocket.meta b/Assets/TEngine/Runtime/Net/ClientSocket.meta deleted file mode 100644 index e63a0718..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 76c964bcca9c1b141aa222e9ad6000e0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/IClientSocket.cs b/Assets/TEngine/Runtime/Net/ClientSocket/IClientSocket.cs deleted file mode 100644 index 03596d2d..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/IClientSocket.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Net; -using System.Net.Sockets; - -namespace TEngine.Net -{ - public enum ClientSocketEventType - { - EventConnected, - EventConnectFail, - EventDisconnected, - } - - public interface IClientSocket - { - /// - /// 是否连接了 - /// - bool IsConnected { get; } - - /// - /// 是否是流协议 - /// - bool IsStream { get; } - - /// - /// 心跳间隔 - /// - int HeartBeatInterval { get; } - - /// - /// 本地绑定地址 - /// - EndPoint LocalAddr { get; } - - SocketError LastSockError { get; } - - string LastErrDesc { get; } - - /// - /// 注册系统事件 - /// - /// - void RegEventHandle(Action handler); - - /// - /// 连接请求 - /// - /// - /// - /// - /// - /// - bool Connect(string server, int port, int iTimeout, int retryNum); - - /// - /// 关闭连接 - /// - void Close(); - - /// - /// 关闭连接 - /// - void Shutdown(); - - /// - /// 发送数据 - /// - /// - bool Send(byte[] data, int offset, int len); - - /// - /// 发送快捷数据,不用保证丢包 - /// - /// - /// - /// - /// - bool SendUdpTypeData(byte[] data, int offset, int len); - - /// - /// 是否支持udp的包 - /// - /// - bool IsSupportUdpType(); - - /// - /// 收包处理 - /// - /// - /// - /// - /// - int Recv(byte[] buf, int iOffset, int maxSize); - - /// - /// 循环调用 - /// - void Update(); - - /// - /// 最后一帧,保证肯定要包发出去,减少延迟 - /// - void LateUpdate(); - - /// - /// 获取写队列的个数 - /// - /// - int GetSendQueueCount(); - - /// - /// 像底层注册错误打印,当缓冲区满之类的,调用上层的统计来打印 - /// - /// - void RegDebugCmdHandle(Action debugCmd); - } -} diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/IClientSocket.cs.meta b/Assets/TEngine/Runtime/Net/ClientSocket/IClientSocket.cs.meta deleted file mode 100644 index 2f5aa52c..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/IClientSocket.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c37e3056155a5ee4c96dc8d42b1709e5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/MessageProcess.cs b/Assets/TEngine/Runtime/Net/ClientSocket/MessageProcess.cs deleted file mode 100644 index a215294f..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/MessageProcess.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Linq; -using Google.Protobuf; -using TEngineProto; - -namespace TEngine.Net -{ - /// - /// 消息处理管线 - /// - public class MessageProcess - { - private const int BufferHead = 4; - - private static byte[] buffer = new byte[2048]; - - private int m_startIndex; - - public byte[] Buffer => buffer; - - public int StartIndex => m_startIndex; - - public int RemSize => buffer.Length - m_startIndex; - - public void ReadBuffer(int buffLength, Action handleResponse = null) - { - m_startIndex += buffLength; - - if (m_startIndex <= BufferHead) - { - return; - } - - int bodyCount = buffLength - BufferHead; - - while (true) - { - if (m_startIndex >= (bodyCount + BufferHead)) - { - MainPack mainPack = (MainPack)MainPack.Descriptor.Parser.ParseFrom(buffer, BufferHead, bodyCount); - - handleResponse?.Invoke(mainPack); - - Array.Copy(buffer, buffLength, buffer, 0, m_startIndex - buffLength); - - m_startIndex -= buffLength; - } - else - { - break; - } - } - } - - public static byte[] PackData(MainPack pack) - { - byte[] data = pack.ToByteArray(); - byte[] head = BitConverter.GetBytes(data.Length); - return head.Concat(data).ToArray(); - } - - public static byte[] PackDataUdp(MainPack pack) - { - return pack.ToByteArray(); - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/MessageProcess.cs.meta b/Assets/TEngine/Runtime/Net/ClientSocket/MessageProcess.cs.meta deleted file mode 100644 index 29c47748..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/MessageProcess.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e9ee0194bff731a419f2c8f0afd156ff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/TcpConnection.cs b/Assets/TEngine/Runtime/Net/ClientSocket/TcpConnection.cs deleted file mode 100644 index f65e0a66..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/TcpConnection.cs +++ /dev/null @@ -1,171 +0,0 @@ -using System; -using System.Net; -using System.Net.Sockets; -using TEngineProto; - - -namespace TEngine.Net -{ - public class TcpConnection - { - private Socket socket; - private string m_Host; - private int m_Port; - private MessageProcess message; - private GameClient gameClient; - - public TcpConnection(GameClient gameClient) - { - message = new MessageProcess(); - this.gameClient = gameClient; - } - - public bool Connect(string host, int port ,bool async = false) - { - if (socket == null) - { - socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - } - else - { - if (socket.Connected) - { - socket.Close(); - } - } - - TLogger.LogInfo("start connect server[{0}:{1}]...", host, port); - - gameClient.Status = GameClientStatus.StatusInit; - try - { - if (async) - { - IPEndPoint ipPoint = new IPEndPoint(IPAddress.Parse(host), port); - SocketAsyncEventArgs args = new SocketAsyncEventArgs(); - args.RemoteEndPoint = ipPoint; - - args.Completed += (obj, socketError) => - { - if (socketError.SocketError == SocketError.Success) - { - TLogger.LogInfoSuccessd("connect server[{0}:{1}] success!!!", host, port); - SocketAsyncEventArgs receiveArgs = new SocketAsyncEventArgs(); - receiveArgs.SetBuffer(message.Buffer, 0, message.Buffer.Length); - receiveArgs.Completed += ReceiveCallBackAsync; - this.socket.ReceiveAsync(receiveArgs); - gameClient.Status = GameClientStatus.StatusConnect; - } - else - { - TLogger.LogError("connect server failed" + socketError.SocketError); - } - }; - socket.ConnectAsync(args); - } - else - { - socket.Connect(host, port); - StartReceive(); - gameClient.Status = GameClientStatus.StatusConnect; - } - } - catch (Exception e) - { - TLogger.LogError(e.Message); - TLogger.LogError("socket connect {0}:{1} failed", host, port); - return false; - } - - //TLogger.LogInfoSuccessd("connect server[{0}:{1}] success!!!", host, port); - m_Host = host; - m_Port = port; - return true; - } - - void ReceiveCallBackAsync(object obj, SocketAsyncEventArgs args) - { - if (args.SocketError == SocketError.Success) - { - message.ReadBuffer(args.BytesTransferred, gameClient.HandleResponse); - - args.SetBuffer(message.StartIndex, message.RemSize); - if (this.socket != null && this.socket.Connected) - { - socket.ReceiveAsync(args); - } - else - { - Close(); - } - } - else - { - TLogger.LogError("socket receive error" + args.SocketError); - Close(); - } - } - - void StartReceive() - { - socket.BeginReceive(message.Buffer, message.StartIndex, message.RemSize, SocketFlags.None, ReceiveCallback, null); - } - - void ReceiveCallback(IAsyncResult asyncResult) - { - try - { - if (socket == null || socket.Connected == false) - { - return; - } - - int buffLength = socket.EndReceive(asyncResult); - - if (buffLength == 0) - { - Close(); - - return; - } - - message.ReadBuffer(buffLength, gameClient.HandleResponse); - - StartReceive(); - } - catch (Exception e) - { - TLogger.LogError("TcpConnection DisConnected: " + e); - Close(); - } - } - - public bool SendCsMsg(MainPack mainPack) - { - if (socket == null || socket.Connected == false) - { - return false; - } - - try - { - socket.Send(MessageProcess.PackData(mainPack)); - return true; - } - catch (Exception e) - { - TLogger.LogError("TcpConnection SendCsMsg: " + e); - return false; - } - } - - public void Close() - { - if (socket != null && socket.Connected) - { - socket.Close(); - } - gameClient.Status = GameClientStatus.StatusInit; - } - } -} diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/TcpConnection.cs.meta b/Assets/TEngine/Runtime/Net/ClientSocket/TcpConnection.cs.meta deleted file mode 100644 index 682e1f2c..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/TcpConnection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 997699216368d574cbc53511506d77f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/UdpConnection.cs b/Assets/TEngine/Runtime/Net/ClientSocket/UdpConnection.cs deleted file mode 100644 index 4447f5ce..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/UdpConnection.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Net; -using System.Net.Sockets; -using System.Threading; -using TEngineProto; - - -namespace TEngine.Net -{ - public enum UdpState - { - None, - Start, - Close, - } - - public class UdpConnection - { - private Thread udpThread; - private Socket udpClient; - private EndPoint _ePoint; - private IPEndPoint ipEndPoint; - private Byte[] buffer = new Byte[2048]; - private GameClient client; - - private UdpState udpState = UdpState.None; - - public Socket UdpSocket => udpClient; - - public UdpState State - { - get - { - return udpState; - } - set - { - udpState = value; - } - } - - public UdpConnection(GameClient client) - { - this.client = client; - } - - public void ConnectUdp(string host,int port) - { - udpClient = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); - ipEndPoint = new IPEndPoint(IPAddress.Parse(host), port + 1); - _ePoint = ipEndPoint; - udpState = UdpState.Start; - try - { - TLogger.LogInfo("start connect udp server[{0}:{1}]...", host, port); - udpClient.Connect(_ePoint); - } - catch - { - TLogger.LogError("UDP connect failed!..."); - return; - } - TLogger.LogInfoSuccessd("start connect udp server[{0}:{1}] success...", host, port); - Loom.RunAsync(() => - { - udpThread = new Thread(ReceiveMsg); - udpThread.Start(); - } - ); - } - - private void ReceiveMsg() - { - try - { - while (true) - { - if (client == null || udpState != UdpState.Start) - { - return; - } - int len = udpClient.ReceiveFrom(buffer, ref _ePoint); - MainPack pack = (MainPack)MainPack.Descriptor.Parser.ParseFrom(buffer, 0, len); - Loom.QueueOnMainThread((param) => - { - client.UdpHandleResponse(pack); - }, null); - } - } - catch (Exception e) - { - TLogger.LogError(e.Message); - } - } - } -} diff --git a/Assets/TEngine/Runtime/Net/ClientSocket/UdpConnection.cs.meta b/Assets/TEngine/Runtime/Net/ClientSocket/UdpConnection.cs.meta deleted file mode 100644 index d7001736..00000000 --- a/Assets/TEngine/Runtime/Net/ClientSocket/UdpConnection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6c63997a8d0569346945dbb31cfb6ce7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/DataCenterSys.cs b/Assets/TEngine/Runtime/Net/DataCenterSys.cs deleted file mode 100644 index 9c7e4420..00000000 --- a/Assets/TEngine/Runtime/Net/DataCenterSys.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections.Generic; - -namespace TEngine.Net -{ - /// - /// 数据中心系统 - /// - public class DataCenterSys : BaseLogicSys - { - private List m_listModule = new List(); - - public override bool OnInit() - { - RegCmdHandle(); - InitModule(); - return true; - } - - public override void OnUpdate() - { - GameClient.Instance.OnUpdate(); - var listModule = m_listModule; - for (int i = 0; i < listModule.Count; i++) - { - listModule[i].OnUpdate(); - } - } - - public override void OnDestroy() - { - GameClient.Instance.Shutdown(); - base.OnDestroy(); - } - - private void RegCmdHandle() - { - var client = GameClient.Instance; - //client.RegActionHandle(); - } - - void InitModule() - { - //InitModule(LoginDataMgr.Instance); - } - - public void InitModule(IDataCenterModule module) - { - if (!m_listModule.Contains(module)) - { - module.Init(); - m_listModule.Add(module); - } - } - } -} diff --git a/Assets/TEngine/Runtime/Net/DataCenterSys.cs.meta b/Assets/TEngine/Runtime/Net/DataCenterSys.cs.meta deleted file mode 100644 index a3266ae7..00000000 --- a/Assets/TEngine/Runtime/Net/DataCenterSys.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 637ccf86c9ad9c34a866fe2b8556e96d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/GameClient.cs b/Assets/TEngine/Runtime/Net/GameClient.cs deleted file mode 100644 index 6d7e5eb6..00000000 --- a/Assets/TEngine/Runtime/Net/GameClient.cs +++ /dev/null @@ -1,612 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using TEngineProto; -using UnityEngine; - -namespace TEngine.Net -{ - /// - /// 客户端状态 - /// - public enum GameClientStatus - { - StatusInit, //初始化 - StatusReconnect, //重新连接 - StatusClose, //断开连接 - StatusConnect, //连接中 - StatusEnter, //Login登录成功 - } - - public delegate void CsMsgDelegate(MainPack mainPack); - - public class GameClient:TSingleton - { - - #region Propriety - private string m_lastHost = null; - private int m_lastPort = 0; - private GameClientStatus m_status = GameClientStatus.StatusInit; - /// - /// GameClient状态 - /// - public GameClientStatus Status - { - get - { - return m_status; - } - set - { - m_status = value; - } - } - - /// - /// 最新连接错误的时间 - /// - private float m_lastLogDisconnectErrTime = 0f; - /// - /// 最新的错误码 - /// - private int m_lastNetErrCode = 0; - /// - /// 最近一次心跳的时间 - /// - private float m_lastHbTime = 0f; - /// - /// 心跳间隔 - /// - private const float m_heartBeatDurTime = 15; - /// - /// 连续心跳超时 - /// - private int m_heatBeatTimeoutNum = 0; - private int m_ping = -1; - public bool IsEntered - { - get { return m_status == GameClientStatus.StatusEnter; } - } - public bool IsNetworkOkAndLogined - { - get - { - return m_status == GameClientStatus.StatusEnter; - } - } - - public int LastNetErrCode - { - get { return m_lastNetErrCode; } - } - - private ClientConnectWatcher m_connectWatcher; - - private void ResetParam() - { - m_lastLogDisconnectErrTime = 0f; - m_heatBeatTimeoutNum = 0; - m_lastHbTime = 0f; - m_ping = -1; - m_lastNetErrCode = 0; - } - #endregion - - private TcpConnection m_connect; - - public GameClient() - { - m_connect = new TcpConnection(this); - m_connectWatcher = new ClientConnectWatcher(this); - } - - ~GameClient() - { - if (m_connect != null) - { - m_connect.Close(); - } - m_connect = null; - } - - public async void ConnectAsync(string host, int port, bool reconnect = false) - { - try - { - await Task.Run((() => - { - Connect(host, port, reconnect); - })); - } - catch (Exception e) - { - TLogger.LogException(e.Message); - } - } - - public bool Connect(string host, int port, bool reconnect = false) - { - ResetParam(); - if (!reconnect) - { - SetWatchReconnect(false); - } - //GameEventMgr.Instance.Send(ShowWaitingUI); - m_lastHost = host; - m_lastPort = port; - Status = reconnect ? GameClientStatus.StatusReconnect : GameClientStatus.StatusInit; - TLogger.LogInfo("Start connect server {0}:{1} Reconnect:{2}", host, port, reconnect); - return m_connect.Connect(host, port,false); - } - - public void Shutdown() - { - m_connect.Close(); - m_status = GameClientStatus.StatusInit; - TLogger.LogWarning("GameClient Shut Down"); - } - - #region 发送网络消息 - /// - /// 发送消息包 - /// - /// - /// - public bool SendCsMsg(MainPack reqPkg) - { - if (!CheckPack(reqPkg)) - { - return false; - } - return DoSendData(reqPkg); - } - - /// - /// 发送消息包并注册回调 - /// - /// - /// - /// - /// - public bool SendCsMsg(MainPack pack, CsMsgDelegate resHandler = null, bool needShowWaitUI = true) - { - if (!CheckPack(pack)) - { - return false; - } - - var ret = DoSendData(pack); - - if (!ret) - { - TLogger.LogError("SendCSMsg Error"); - } - else - { - if (resHandler != null) - { - RegTimeOutHandle((uint)pack.Actioncode, resHandler); - RegActionHandle((int)pack.Actioncode, resHandler); - } - } - - return ret; - } - - private bool DoSendData(MainPack reqPkg) - { - var sendRet = m_connect.SendCsMsg(reqPkg); - - return sendRet; - } - #endregion - - #region 网络消息回调,非主线程 - Dictionary> m_mapCmdHandle = new Dictionary>(); - /// - /// 委托缓存堆栈 - /// - private Queue> cachelistHandle = new Queue>(); - - /// - /// 消息包缓存堆栈 - /// - private Queue queuepPacks = new Queue(); - - /// - /// 网络消息回调,非主线程 - /// - /// - public void HandleResponse(MainPack pack) - { - lock (cachelistHandle) - { - List listHandle; - - if (m_mapCmdHandle.TryGetValue((int)pack.Actioncode, out listHandle)) - { - cachelistHandle.Enqueue(listHandle); - - queuepPacks.Enqueue(pack); - } - } - } - /// - /// Udp网络消息回调,Loom多线程回调到此处,主线程 - /// - /// - public void UdpHandleResponse(MainPack pack) - { - List listHandle; - - if (m_mapCmdHandle.TryGetValue((int)pack.Actioncode, out listHandle)) - { - foreach (CsMsgDelegate handle in listHandle) - { - handle(pack); - } - } - } - - - #endregion - - #region 注册网络消息回调 - /// - /// 注册静态消息 - /// - /// - /// - public void RegActionHandle(int actionId, CsMsgDelegate msgDelegate) - { - List listHandle; - if (!m_mapCmdHandle.TryGetValue(actionId, out listHandle)) - { - listHandle = new List(); - m_mapCmdHandle[actionId] = listHandle; - } - - if (listHandle != null) - { - if (!listHandle.Contains(msgDelegate)) - { - listHandle.Add(msgDelegate); - } - else - { - //Debug.LogFormat("-------------repeat RegCmdHandle ActionCode:{0}-----------", (ActionCode)actionId); - } - } - } - /// - /// 注册Udp静态消息 - /// - /// - /// - public void UdpRegActionHandle(int actionId, CsMsgDelegate msgDelegate) - { - List listHandle; - if (!m_mapCmdHandle.TryGetValue(actionId, out listHandle)) - { - listHandle = new List(); - m_mapCmdHandle[actionId] = listHandle; - } - - if (listHandle != null) - { - if (listHandle.Contains(msgDelegate)) - { - Debug.LogFormat("-------------repeat RegCmdHandle ActionCode:{0}-----------", (ActionCode)actionId); - } - listHandle.Add(msgDelegate); - } - } - - /// - /// 移除消息处理函数 - /// - /// - /// - public void RmvCmdHandle(int actionId, CsMsgDelegate msgDelegate) - { - List listHandle; - if (!m_mapCmdHandle.TryGetValue(actionId, out listHandle)) - { - return; - } - - if (listHandle != null) - { - listHandle.Remove(msgDelegate); - } - } - - private bool CheckPack(MainPack pack) - { - if (pack == null) - { - return false; - } - - if (pack.Actioncode == ActionCode.ActionNone) - { - return false; - } - - if (pack.Requestcode == RequestCode.RequestNone) - { - return false; - } - - return true; - } - #endregion - - #region 心跳处理 - protected bool CheckHeatBeatTimeout() - { - if (m_heatBeatTimeoutNum >= 2) - { - Shutdown(); - m_heatBeatTimeoutNum = 0; - Status = GameClientStatus.StatusClose; - TLogger.LogError("heat beat detect timeout"); - return false; - } - - return true; - } - - void TickHeartBeat() - { - if (Status != GameClientStatus.StatusEnter) - { - return; - } - - var nowTime = GameTime.RealtimeSinceStartup; - if (m_lastHbTime + m_heartBeatDurTime < nowTime) - { - m_lastHbTime = nowTime; - MainPack pack = new MainPack - { - Actioncode = ActionCode.HeartBeat - }; - GameClient.Instance.SendCsMsg(pack, HandleHeatBeatRes); - } - } - - void HandleHeatBeatRes(MainPack mainPack) - { - if (mainPack.Returncode != ReturnCode.Success) - { - //如果是超时了,则标记最近收到包的次数 - if (mainPack.Returncode == ReturnCode.MsgTimeOut) - { - m_heatBeatTimeoutNum++; - TLogger.LogError("heat beat timeout: {0}", m_heatBeatTimeoutNum); - } - } - else - { - float diffTime = GameTime.RealtimeSinceStartup - mainPack.HeatEchoTime; - m_ping = (int)(diffTime * 1000); - m_heatBeatTimeoutNum = 0; - } - } - #endregion - - /// - /// 清理所有的网络消息 - /// - public void CleanAllNetMsg() - { - m_mapCmdHandle.Clear(); - } - - public void Reconnect() - { - m_connectWatcher.OnReConnect(); - Connect(m_lastHost, m_lastPort, true); - } - - public void OnUpdate() - { - HandleCsMsgOnUpdate(); - CheckCsMsgTimeOut(); - TickHeartBeat(); - CheckHeatBeatTimeout(); - m_connectWatcher.Update(); - } - - #region 超时检测 - - #region TimeOutCheck - private const int CHECK_TIMEOUT_PERFRAME = 10; - const int MAX_MSG_HANDLE = 256; - UInt32 m_dwLastCheckIndex = 0; - CsMsgDelegate[] m_aMsgHandles = new CsMsgDelegate[MAX_MSG_HANDLE]; - float[] m_fMsgRegTime = new float[MAX_MSG_HANDLE]; - private float m_timeout = 15; - #endregion - private readonly MainPack _timeOutPack = new MainPack { Returncode = ReturnCode.MsgTimeOut }; - private void CheckCsMsgTimeOut() - { - float nowTime = GameTime.time; - for (int i = 0; i < CHECK_TIMEOUT_PERFRAME; i++) - { - m_dwLastCheckIndex = (m_dwLastCheckIndex + 1) % MAX_MSG_HANDLE; - if (m_aMsgHandles[m_dwLastCheckIndex] != null) - { - if (m_fMsgRegTime[m_dwLastCheckIndex] + m_timeout < nowTime) - { - TLogger.LogError("msg timeout, resCmdID[{0}]", m_aMsgHandles[m_dwLastCheckIndex]); - - NotifyTimeout(m_aMsgHandles[m_dwLastCheckIndex]); - - RmvCheckCsMsg((int)m_dwLastCheckIndex); - } - } - } - } - - public void RmvCheckCsMsg(int index) - { - m_aMsgHandles[index] = null; - m_fMsgRegTime[index] = 0; - } - - private void RegTimeOutHandle(uint actionCode, CsMsgDelegate resHandler) - { - uint hashIndex = actionCode % MAX_MSG_HANDLE; - if (m_aMsgHandles[hashIndex] != null) - { - //NotifyTimeout(m_aMsgHandles[hashIndex]); - RmvCheckCsMsg((int)hashIndex); - } - m_aMsgHandles[hashIndex] = resHandler; - m_fMsgRegTime[hashIndex] = GameTime.time; - } - - protected void NotifyTimeout(CsMsgDelegate msgHandler) - { - msgHandler(_timeOutPack); - } - - #endregion - /// - /// 主线程从消息包缓存堆栈/委托缓存堆栈中出列 - /// - private void HandleCsMsgOnUpdate() - { - if (cachelistHandle.Count <= 0 || queuepPacks.Count <= 0) - { - return; - } - try - { - foreach (CsMsgDelegate handle in cachelistHandle.Dequeue()) - { - var pack = queuepPacks.Peek(); - - if (pack != null) - { - handle(pack); - - UInt32 hashIndex = (uint)pack.Actioncode % MAX_MSG_HANDLE; - - RmvCheckCsMsg((int)hashIndex); - } - } - queuepPacks.Dequeue(); - } - catch (Exception e) - { - TLogger.LogError(e.Message); - } - } - - protected override void Init() - { - base.Init(); - } - - public override void Active() - { - base.Active(); - } - - public override void Release() - { - if (m_connect != null) - { - m_connect.Close(); - } - m_connect = null; - base.Release(); - } - - public bool IsStatusCanSendMsg() - { - if (m_status == GameClientStatus.StatusEnter) - { - return true; - } - - float nowTime = GameTime.time; - if (m_lastLogDisconnectErrTime + 5 < nowTime) - { - TLogger.LogError("GameClient not connected, send msg failed"); - m_lastLogDisconnectErrTime = nowTime; - } - - return false; - } - - /// - /// 设置是否需要监控网络重连 - /// - /// - public void SetWatchReconnect(bool needWatch) - { - m_connectWatcher.Enable = needWatch; - } - - #region Ping - /// - /// ping值 - /// - public int Ping - { - get - { - if (IsPingValid()) - { - return m_ping / 4; - } - else - { - return 0; - } - } - } - - public bool IsPingValid() - { - if (IsNetworkOkAndLogined) - { - return m_ping >= 0; - } - return false; - } - #endregion - - #region GetNetworkType - public static CsNetworkType GetNetworkType() - { - CsNetworkType csNetType = CsNetworkType.CSNETWORK_UNKNOWN; - NetworkReachability reachability = Application.internetReachability; - switch (reachability) - { - case NetworkReachability.NotReachable: - break; - case NetworkReachability.ReachableViaLocalAreaNetwork: - csNetType = CsNetworkType.CSNETWORK_WIFI; - break; - case NetworkReachability.ReachableViaCarrierDataNetwork: - csNetType = CsNetworkType.CSNETWORK_3G; - break; - } - return csNetType; - } - - public enum CsNetworkType - { - CSNETWORK_UNKNOWN = 0, /*未知类型*/ - CSNETWORK_WIFI = 1, /*Wifi类型*/ - CSNETWORK_3G = 2, /*3G类型*/ - CSNETWORK_2G = 3 /*2G类型*/ - }; - #endregion - } -} diff --git a/Assets/TEngine/Runtime/Net/GameClient.cs.meta b/Assets/TEngine/Runtime/Net/GameClient.cs.meta deleted file mode 100644 index b6af5856..00000000 --- a/Assets/TEngine/Runtime/Net/GameClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 626e38f9746ce274a898dab6420ec284 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/IDataCenterModule.cs b/Assets/TEngine/Runtime/Net/IDataCenterModule.cs deleted file mode 100644 index a680d42d..00000000 --- a/Assets/TEngine/Runtime/Net/IDataCenterModule.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace TEngine.Net -{ - public interface IDataCenterModule - { - void Init(); - - void OnRoleLogout(); - - void OnUpdate(); - - void OnMainPlayerMapChange(); - } - public class DataCenterModule : IDataCenterModule where T : new() - { - private static T instance; - public static T Instance - { - get - { - if (null == instance) - { - instance = new T(); - } - return instance; - } - } - - public virtual void Init() - { - - } - - public virtual void OnRoleLogout() - { - - } - - public virtual void OnUpdate() - { - - } - - public virtual void OnMainPlayerMapChange() - { - - } - } -} diff --git a/Assets/TEngine/Runtime/Net/IDataCenterModule.cs.meta b/Assets/TEngine/Runtime/Net/IDataCenterModule.cs.meta deleted file mode 100644 index bc57fdb7..00000000 --- a/Assets/TEngine/Runtime/Net/IDataCenterModule.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8018a083c1db8244c84deee97365d954 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/NetEventId.cs b/Assets/TEngine/Runtime/Net/NetEventId.cs deleted file mode 100644 index 7389f7e7..00000000 --- a/Assets/TEngine/Runtime/Net/NetEventId.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TEngine.Net -{ - internal class NetEventId - { - public static int HeartBeat = StringId.StringToHash("NetEventId.HeartBeat"); - public static int ConnectTcp = StringId.StringToHash("NetEventId.ConnectTcp"); - public static int ConnectUdp = StringId.StringToHash("NetEventId.ConnectUdp"); - } -} diff --git a/Assets/TEngine/Runtime/Net/NetEventId.cs.meta b/Assets/TEngine/Runtime/Net/NetEventId.cs.meta deleted file mode 100644 index f0840fc6..00000000 --- a/Assets/TEngine/Runtime/Net/NetEventId.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 974dfabe252d1984291d86de88f52261 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/NetUtil.cs b/Assets/TEngine/Runtime/Net/NetUtil.cs deleted file mode 100644 index 4f1b6863..00000000 --- a/Assets/TEngine/Runtime/Net/NetUtil.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Net; -using System.Net.Sockets; - - -namespace TEngine.Net -{ - class NetUtil - { - public static bool IsHaveIpV6Address(IPAddress[] IPs, ref IPAddress[] outIPs) - { - int v6Count = 0; - for (int i = 0; i < IPs.Length; i++) - { - if (AddressFamily.InterNetworkV6.Equals(IPs[i].AddressFamily)) - { - v6Count++; - } - } - if (v6Count > 0) - { - outIPs = new IPAddress[v6Count]; - int resIndex = 0; - for (int i = 0; i < IPs.Length; i++) - { - if (AddressFamily.InterNetworkV6.Equals(IPs[i].AddressFamily)) - { - outIPs[resIndex++] = IPs[i]; - } - } - - return true; - } - - return false; - } - - public static IPEndPoint GetEndPoint(string server, int port) - { - IPAddress[] IPs = Dns.GetHostAddresses(server); - IPAddress[] finalIPS = IPs; - if (Socket.OSSupportsIPv6 && NetUtil.IsHaveIpV6Address(IPs, ref finalIPS)) - { - TLogger.LogError("socket use addr ipV6: {0}, IP count:{1} AddressFamily[{2}]", server, finalIPS.Length, finalIPS[0].AddressFamily); - } - - if (finalIPS.Length > 0) - { - return new IPEndPoint(finalIPS[0], port); - } - - return null; - } - - } -} diff --git a/Assets/TEngine/Runtime/Net/NetUtil.cs.meta b/Assets/TEngine/Runtime/Net/NetUtil.cs.meta deleted file mode 100644 index 76dddcc1..00000000 --- a/Assets/TEngine/Runtime/Net/NetUtil.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7a6ce011401796642acf5b1e3706c3ad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/Proto.meta b/Assets/TEngine/Runtime/Net/Proto.meta deleted file mode 100644 index 72dc631c..00000000 --- a/Assets/TEngine/Runtime/Net/Proto.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 66aaf21cc3acb3144b4ca52f3d321949 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/Proto/TEngineProto.cs b/Assets/TEngine/Runtime/Net/Proto/TEngineProto.cs deleted file mode 100644 index ba91837f..00000000 --- a/Assets/TEngine/Runtime/Net/Proto/TEngineProto.cs +++ /dev/null @@ -1,2104 +0,0 @@ -// -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: TEngineProto.proto -// -#pragma warning disable 1591, 0612, 3021 -#region Designer generated code - -using pb = global::Google.Protobuf; -using pbc = global::Google.Protobuf.Collections; -using pbr = global::Google.Protobuf.Reflection; -using scg = global::System.Collections.Generic; -namespace TEngineProto { - - /// Holder for reflection information generated from TEngineProto.proto - public static partial class TEngineProtoReflection { - - #region Descriptor - /// File descriptor for TEngineProto.proto - public static pbr::FileDescriptor Descriptor { - get { return descriptor; } - } - private static pbr::FileDescriptor descriptor; - - static TEngineProtoReflection() { - byte[] descriptorData = global::System.Convert.FromBase64String( - string.Concat( - "ChJURW5naW5lUHJvdG8ucHJvdG8SDFRFbmdpbmVQcm90byLAAgoITWFpblBh", - "Y2sSLgoLcmVxdWVzdGNvZGUYASABKA4yGS5URW5naW5lUHJvdG8uUmVxdWVz", - "dENvZGUSLAoKYWN0aW9uY29kZRgCIAEoDjIYLlRFbmdpbmVQcm90by5BY3Rp", - "b25Db2RlEiwKCnJldHVybmNvZGUYAyABKA4yGC5URW5naW5lUHJvdG8uUmV0", - "dXJuQ29kZRIqCglsb2dpblBhY2sYBCABKAsyFy5URW5naW5lUHJvdG8uTG9n", - "aW5QYWNrEg4KBmV4dHN0chgFIAEoCRIoCghyb29tcGFjaxgGIAMoCzIWLlRF", - "bmdpbmVQcm90by5Sb29tUGFjaxIsCgpwbGF5ZXJwYWNrGAcgASgLMhguVEVu", - "Z2luZVByb3RvLlBsYXllclBhY2sSFAoMSGVhdEVjaG9UaW1lGAggASgCIi8K", - "CUxvZ2luUGFjaxIQCgh1c2VybmFtZRgBIAEoCRIQCghwYXNzd29yZBgCIAEo", - "CSLxAQoIUm9vbVBhY2sSEAoIcm9vbW5hbWUYASABKAkSDgoGbWF4bnVtGAIg", - "ASgFEg4KBmN1cm51bRgDIAEoBRINCgVzdGF0ZRgEIAEoBRIuCglnYW1lc3Rh", - "dGUYBSABKAsyGy5URW5naW5lUHJvdG8uR2FtZVN0YXRlUGFjaxIOCgZyb29t", - "SUQYBiABKAUSDwoHdmlzYWJsZRgJIAEoBRITCgt1c2VQYXNzd29yZBgKIAEo", - "BRIQCghwYXNzd29yZBgLIAEoCRIsCgpwbGF5ZXJwYWNrGAwgAygLMhguVEVu", - "Z2luZVByb3RvLlBsYXllclBhY2sieQoKUGxheWVyUGFjaxISCgpwbGF5ZXJu", - "YW1lGAEgASgJEhAKCHBsYXllcklEGAIgASgJEgoKAmhwGAMgASgFEiYKB3Bv", - "c1BhY2sYBCABKAsyFS5URW5naW5lUHJvdG8uUG9zUGFjaxIRCglwbGF5ZXJK", - "b2IYBSABKAUiRwoNR2FtZVN0YXRlUGFjaxImCgVzdGF0ZRgBIAEoDjIXLlRF", - "bmdpbmVQcm90by5HQU1FU1RBVEUSDgoGQm9zc0lkGAIgASgFIlgKCENhcmRE", - "YXRhEg8KB2NhcmRJbnQYASABKAUSEQoJY2FyZFZhbHVlGAIgASgFEigKCGNh", - "cmRUeXBlGAMgASgOMhYuVEVuZ2luZVByb3RvLkNhcmRUeXBlIq4BCgdQb3NQ", - "YWNrEgwKBFBvc1gYASABKAISDAoEUG9zWRgCIAEoAhIMCgRQb3NaGAMgASgC", - "Eg0KBVJvdGFYGAQgASgCEg0KBVJvdGFZGAUgASgCEg0KBVJvdGFaGAYgASgC", - "EhEKCUFuaW1hdGlvbhgIIAEoBRIMCgREaXJyGAkgASgFEg0KBU1vdmVYGAog", - "ASgCEg0KBU1vdmVZGAsgASgCEg0KBU1vdmVaGAwgASgCKkcKC1JlcXVlc3RD", - "b2RlEg8KC1JlcXVlc3ROb25lEAASCQoFSGVhcnQQARIICgRVc2VyEAISCAoE", - "Um9vbRADEggKBEdhbWUQBCrHAQoKQWN0aW9uQ29kZRIOCgpBY3Rpb25Ob25l", - "EAASDQoJSGVhcnRCZWF0EAESDQoIUmVnaXN0ZXIQ6AcSCgoFTG9naW4Q6QcS", - "DwoKQ3JlYXRlUm9vbRDqBxINCghGaW5kUm9vbRDrBxIPCgpHZXRQbGF5ZXJz", - "EOwHEg0KCEpvaW5Sb29tEO0HEg0KCEV4aXRSb29tEO4HEg4KCVN0YXJ0R2Ft", - "ZRDvBxIVChBTdGFydEdhbWVGcm9tU3ZyEPAHEgkKBENoYXQQ0A8qQwoKUmV0", - "dXJuQ29kZRIOCgpSZXR1cm5Ob25lEAASCwoHU3VjY2VzcxABEggKBEZhaWwQ", - "AhIOCgpNc2dUaW1lT3V0EAMqOwoJR0FNRVNUQVRFEgoKBlNUQVRFMRAAEgoK", - "BlNUQVRFMhABEgoKBlNUQVRFMxACEgoKBlNUQVRFNBADKkwKCENhcmRUeXBl", - "EggKBE5PTkUQABIICgRDTFVCEAESCwoHRElBTU9ORBACEgkKBUhFQVJUEAMS", - "CQoFU1BBREUQBBIJCgVKT0tFUhAFYgZwcm90bzM=")); - descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::TEngineProto.RequestCode), typeof(global::TEngineProto.ActionCode), typeof(global::TEngineProto.ReturnCode), typeof(global::TEngineProto.GAMESTATE), typeof(global::TEngineProto.CardType), }, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.MainPack), global::TEngineProto.MainPack.Parser, new[]{ "Requestcode", "Actioncode", "Returncode", "LoginPack", "Extstr", "Roompack", "Playerpack", "HeatEchoTime" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.LoginPack), global::TEngineProto.LoginPack.Parser, new[]{ "Username", "Password" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.RoomPack), global::TEngineProto.RoomPack.Parser, new[]{ "Roomname", "Maxnum", "Curnum", "State", "Gamestate", "RoomID", "Visable", "UsePassword", "Password", "Playerpack" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.PlayerPack), global::TEngineProto.PlayerPack.Parser, new[]{ "Playername", "PlayerID", "Hp", "PosPack", "PlayerJob" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.GameStatePack), global::TEngineProto.GameStatePack.Parser, new[]{ "State", "BossId" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.CardData), global::TEngineProto.CardData.Parser, new[]{ "CardInt", "CardValue", "CardType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::TEngineProto.PosPack), global::TEngineProto.PosPack.Parser, new[]{ "PosX", "PosY", "PosZ", "RotaX", "RotaY", "RotaZ", "Animation", "Dirr", "MoveX", "MoveY", "MoveZ" }, null, null, null, null) - })); - } - #endregion - - } - #region Enums - public enum RequestCode { - [pbr::OriginalName("RequestNone")] RequestNone = 0, - /// - ///心跳 - /// - [pbr::OriginalName("Heart")] Heart = 1, - /// - ///用户 - /// - [pbr::OriginalName("User")] User = 2, - /// - ///房间 - /// - [pbr::OriginalName("Room")] Room = 3, - /// - ///游戏 - /// - [pbr::OriginalName("Game")] Game = 4, - } - - public enum ActionCode { - [pbr::OriginalName("ActionNone")] ActionNone = 0, - /// - ///心跳 - /// - [pbr::OriginalName("HeartBeat")] HeartBeat = 1, - /// - ///注册 - /// - [pbr::OriginalName("Register")] Register = 1000, - /// - ///登录 - /// - [pbr::OriginalName("Login")] Login = 1001, - /// - ///创建房间 - /// - [pbr::OriginalName("CreateRoom")] CreateRoom = 1002, - /// - ///查找房间 - /// - [pbr::OriginalName("FindRoom")] FindRoom = 1003, - /// - ///获取玩家列表 - /// - [pbr::OriginalName("GetPlayers")] GetPlayers = 1004, - /// - ///加入房间 - /// - [pbr::OriginalName("JoinRoom")] JoinRoom = 1005, - /// - ///离开房间 - /// - [pbr::OriginalName("ExitRoom")] ExitRoom = 1006, - /// - ///开始游戏 - /// - [pbr::OriginalName("StartGame")] StartGame = 1007, - /// - ///服务端发送来的开始游戏指令 - /// - [pbr::OriginalName("StartGameFromSvr")] StartGameFromSvr = 1008, - /// - ///聊天 - /// - [pbr::OriginalName("Chat")] Chat = 2000, - } - - public enum ReturnCode { - [pbr::OriginalName("ReturnNone")] ReturnNone = 0, - /// - ///成功 - /// - [pbr::OriginalName("Success")] Success = 1, - /// - ///失败 - /// - [pbr::OriginalName("Fail")] Fail = 2, - /// - ///消息超时 - /// - [pbr::OriginalName("MsgTimeOut")] MsgTimeOut = 3, - } - - public enum GAMESTATE { - [pbr::OriginalName("STATE1")] State1 = 0, - [pbr::OriginalName("STATE2")] State2 = 1, - [pbr::OriginalName("STATE3")] State3 = 2, - [pbr::OriginalName("STATE4")] State4 = 3, - } - - public enum CardType { - [pbr::OriginalName("NONE")] None = 0, - /// - ///草花 - /// - [pbr::OriginalName("CLUB")] Club = 1, - /// - ///方块 - /// - [pbr::OriginalName("DIAMOND")] Diamond = 2, - /// - ///红心 - /// - [pbr::OriginalName("HEART")] Heart = 3, - /// - ///黑桃 - /// - [pbr::OriginalName("SPADE")] Spade = 4, - /// - /// - [pbr::OriginalName("JOKER")] Joker = 5, - } - - #endregion - - #region Messages - public sealed partial class MainPack : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MainPack()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[0]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MainPack() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MainPack(MainPack other) : this() { - requestcode_ = other.requestcode_; - actioncode_ = other.actioncode_; - returncode_ = other.returncode_; - loginPack_ = other.loginPack_ != null ? other.loginPack_.Clone() : null; - extstr_ = other.extstr_; - roompack_ = other.roompack_.Clone(); - playerpack_ = other.playerpack_ != null ? other.playerpack_.Clone() : null; - heatEchoTime_ = other.heatEchoTime_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MainPack Clone() { - return new MainPack(this); - } - - /// Field number for the "requestcode" field. - public const int RequestcodeFieldNumber = 1; - private global::TEngineProto.RequestCode requestcode_ = global::TEngineProto.RequestCode.RequestNone; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.RequestCode Requestcode { - get { return requestcode_; } - set { - requestcode_ = value; - } - } - - /// Field number for the "actioncode" field. - public const int ActioncodeFieldNumber = 2; - private global::TEngineProto.ActionCode actioncode_ = global::TEngineProto.ActionCode.ActionNone; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.ActionCode Actioncode { - get { return actioncode_; } - set { - actioncode_ = value; - } - } - - /// Field number for the "returncode" field. - public const int ReturncodeFieldNumber = 3; - private global::TEngineProto.ReturnCode returncode_ = global::TEngineProto.ReturnCode.ReturnNone; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.ReturnCode Returncode { - get { return returncode_; } - set { - returncode_ = value; - } - } - - /// Field number for the "loginPack" field. - public const int LoginPackFieldNumber = 4; - private global::TEngineProto.LoginPack loginPack_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.LoginPack LoginPack { - get { return loginPack_; } - set { - loginPack_ = value; - } - } - - /// Field number for the "extstr" field. - public const int ExtstrFieldNumber = 5; - private string extstr_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Extstr { - get { return extstr_; } - set { - extstr_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "roompack" field. - public const int RoompackFieldNumber = 6; - private static readonly pb::FieldCodec _repeated_roompack_codec - = pb::FieldCodec.ForMessage(50, global::TEngineProto.RoomPack.Parser); - private readonly pbc::RepeatedField roompack_ = new pbc::RepeatedField(); - /// - ///房间包,repeated加上为list - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Roompack { - get { return roompack_; } - } - - /// Field number for the "playerpack" field. - public const int PlayerpackFieldNumber = 7; - private global::TEngineProto.PlayerPack playerpack_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.PlayerPack Playerpack { - get { return playerpack_; } - set { - playerpack_ = value; - } - } - - /// Field number for the "HeatEchoTime" field. - public const int HeatEchoTimeFieldNumber = 8; - private float heatEchoTime_; - /// - ///心跳包回包时间 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float HeatEchoTime { - get { return heatEchoTime_; } - set { - heatEchoTime_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as MainPack); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MainPack other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Requestcode != other.Requestcode) return false; - if (Actioncode != other.Actioncode) return false; - if (Returncode != other.Returncode) return false; - if (!object.Equals(LoginPack, other.LoginPack)) return false; - if (Extstr != other.Extstr) return false; - if(!roompack_.Equals(other.roompack_)) return false; - if (!object.Equals(Playerpack, other.Playerpack)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HeatEchoTime, other.HeatEchoTime)) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Requestcode != global::TEngineProto.RequestCode.RequestNone) hash ^= Requestcode.GetHashCode(); - if (Actioncode != global::TEngineProto.ActionCode.ActionNone) hash ^= Actioncode.GetHashCode(); - if (Returncode != global::TEngineProto.ReturnCode.ReturnNone) hash ^= Returncode.GetHashCode(); - if (loginPack_ != null) hash ^= LoginPack.GetHashCode(); - if (Extstr.Length != 0) hash ^= Extstr.GetHashCode(); - hash ^= roompack_.GetHashCode(); - if (playerpack_ != null) hash ^= Playerpack.GetHashCode(); - if (HeatEchoTime != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HeatEchoTime); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Requestcode != global::TEngineProto.RequestCode.RequestNone) { - output.WriteRawTag(8); - output.WriteEnum((int) Requestcode); - } - if (Actioncode != global::TEngineProto.ActionCode.ActionNone) { - output.WriteRawTag(16); - output.WriteEnum((int) Actioncode); - } - if (Returncode != global::TEngineProto.ReturnCode.ReturnNone) { - output.WriteRawTag(24); - output.WriteEnum((int) Returncode); - } - if (loginPack_ != null) { - output.WriteRawTag(34); - output.WriteMessage(LoginPack); - } - if (Extstr.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Extstr); - } - roompack_.WriteTo(output, _repeated_roompack_codec); - if (playerpack_ != null) { - output.WriteRawTag(58); - output.WriteMessage(Playerpack); - } - if (HeatEchoTime != 0F) { - output.WriteRawTag(69); - output.WriteFloat(HeatEchoTime); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Requestcode != global::TEngineProto.RequestCode.RequestNone) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Requestcode); - } - if (Actioncode != global::TEngineProto.ActionCode.ActionNone) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Actioncode); - } - if (Returncode != global::TEngineProto.ReturnCode.ReturnNone) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Returncode); - } - if (loginPack_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoginPack); - } - if (Extstr.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Extstr); - } - size += roompack_.CalculateSize(_repeated_roompack_codec); - if (playerpack_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Playerpack); - } - if (HeatEchoTime != 0F) { - size += 1 + 4; - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MainPack other) { - if (other == null) { - return; - } - if (other.Requestcode != global::TEngineProto.RequestCode.RequestNone) { - Requestcode = other.Requestcode; - } - if (other.Actioncode != global::TEngineProto.ActionCode.ActionNone) { - Actioncode = other.Actioncode; - } - if (other.Returncode != global::TEngineProto.ReturnCode.ReturnNone) { - Returncode = other.Returncode; - } - if (other.loginPack_ != null) { - if (loginPack_ == null) { - LoginPack = new global::TEngineProto.LoginPack(); - } - LoginPack.MergeFrom(other.LoginPack); - } - if (other.Extstr.Length != 0) { - Extstr = other.Extstr; - } - roompack_.Add(other.roompack_); - if (other.playerpack_ != null) { - if (playerpack_ == null) { - Playerpack = new global::TEngineProto.PlayerPack(); - } - Playerpack.MergeFrom(other.Playerpack); - } - if (other.HeatEchoTime != 0F) { - HeatEchoTime = other.HeatEchoTime; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Requestcode = (global::TEngineProto.RequestCode) input.ReadEnum(); - break; - } - case 16: { - Actioncode = (global::TEngineProto.ActionCode) input.ReadEnum(); - break; - } - case 24: { - Returncode = (global::TEngineProto.ReturnCode) input.ReadEnum(); - break; - } - case 34: { - if (loginPack_ == null) { - LoginPack = new global::TEngineProto.LoginPack(); - } - input.ReadMessage(LoginPack); - break; - } - case 42: { - Extstr = input.ReadString(); - break; - } - case 50: { - roompack_.AddEntriesFrom(input, _repeated_roompack_codec); - break; - } - case 58: { - if (playerpack_ == null) { - Playerpack = new global::TEngineProto.PlayerPack(); - } - input.ReadMessage(Playerpack); - break; - } - case 69: { - HeatEchoTime = input.ReadFloat(); - break; - } - } - } - } - - } - - public sealed partial class LoginPack : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginPack()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[1]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginPack() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginPack(LoginPack other) : this() { - username_ = other.username_; - password_ = other.password_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginPack Clone() { - return new LoginPack(this); - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; - /// - ///用户名 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "password" field. - public const int PasswordFieldNumber = 2; - private string password_ = ""; - /// - ///密码 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Password { - get { return password_; } - set { - password_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as LoginPack); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(LoginPack other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Username != other.Username) return false; - if (Password != other.Password) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (Password.Length != 0) hash ^= Password.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Username); - } - if (Password.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Password); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (Password.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Password); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(LoginPack other) { - if (other == null) { - return; - } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.Password.Length != 0) { - Password = other.Password; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - Username = input.ReadString(); - break; - } - case 18: { - Password = input.ReadString(); - break; - } - } - } - } - - } - - public sealed partial class RoomPack : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoomPack()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[2]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoomPack() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoomPack(RoomPack other) : this() { - roomname_ = other.roomname_; - maxnum_ = other.maxnum_; - curnum_ = other.curnum_; - state_ = other.state_; - gamestate_ = other.gamestate_ != null ? other.gamestate_.Clone() : null; - roomID_ = other.roomID_; - visable_ = other.visable_; - usePassword_ = other.usePassword_; - password_ = other.password_; - playerpack_ = other.playerpack_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoomPack Clone() { - return new RoomPack(this); - } - - /// Field number for the "roomname" field. - public const int RoomnameFieldNumber = 1; - private string roomname_ = ""; - /// - ///房间名 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Roomname { - get { return roomname_; } - set { - roomname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "maxnum" field. - public const int MaxnumFieldNumber = 2; - private int maxnum_; - /// - ///房间最大人数 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Maxnum { - get { return maxnum_; } - set { - maxnum_ = value; - } - } - - /// Field number for the "curnum" field. - public const int CurnumFieldNumber = 3; - private int curnum_; - /// - ///房间当前人数 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Curnum { - get { return curnum_; } - set { - curnum_ = value; - } - } - - /// Field number for the "state" field. - public const int StateFieldNumber = 4; - private int state_; - /// - ///房间状态 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int State { - get { return state_; } - set { - state_ = value; - } - } - - /// Field number for the "gamestate" field. - public const int GamestateFieldNumber = 5; - private global::TEngineProto.GameStatePack gamestate_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.GameStatePack Gamestate { - get { return gamestate_; } - set { - gamestate_ = value; - } - } - - /// Field number for the "roomID" field. - public const int RoomIDFieldNumber = 6; - private int roomID_; - /// - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int RoomID { - get { return roomID_; } - set { - roomID_ = value; - } - } - - /// Field number for the "visable" field. - public const int VisableFieldNumber = 9; - private int visable_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Visable { - get { return visable_; } - set { - visable_ = value; - } - } - - /// Field number for the "usePassword" field. - public const int UsePasswordFieldNumber = 10; - private int usePassword_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UsePassword { - get { return usePassword_; } - set { - usePassword_ = value; - } - } - - /// Field number for the "password" field. - public const int PasswordFieldNumber = 11; - private string password_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Password { - get { return password_; } - set { - password_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "playerpack" field. - public const int PlayerpackFieldNumber = 12; - private static readonly pb::FieldCodec _repeated_playerpack_codec - = pb::FieldCodec.ForMessage(98, global::TEngineProto.PlayerPack.Parser); - private readonly pbc::RepeatedField playerpack_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Playerpack { - get { return playerpack_; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as RoomPack); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RoomPack other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Roomname != other.Roomname) return false; - if (Maxnum != other.Maxnum) return false; - if (Curnum != other.Curnum) return false; - if (State != other.State) return false; - if (!object.Equals(Gamestate, other.Gamestate)) return false; - if (RoomID != other.RoomID) return false; - if (Visable != other.Visable) return false; - if (UsePassword != other.UsePassword) return false; - if (Password != other.Password) return false; - if(!playerpack_.Equals(other.playerpack_)) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Roomname.Length != 0) hash ^= Roomname.GetHashCode(); - if (Maxnum != 0) hash ^= Maxnum.GetHashCode(); - if (Curnum != 0) hash ^= Curnum.GetHashCode(); - if (State != 0) hash ^= State.GetHashCode(); - if (gamestate_ != null) hash ^= Gamestate.GetHashCode(); - if (RoomID != 0) hash ^= RoomID.GetHashCode(); - if (Visable != 0) hash ^= Visable.GetHashCode(); - if (UsePassword != 0) hash ^= UsePassword.GetHashCode(); - if (Password.Length != 0) hash ^= Password.GetHashCode(); - hash ^= playerpack_.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Roomname.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Roomname); - } - if (Maxnum != 0) { - output.WriteRawTag(16); - output.WriteInt32(Maxnum); - } - if (Curnum != 0) { - output.WriteRawTag(24); - output.WriteInt32(Curnum); - } - if (State != 0) { - output.WriteRawTag(32); - output.WriteInt32(State); - } - if (gamestate_ != null) { - output.WriteRawTag(42); - output.WriteMessage(Gamestate); - } - if (RoomID != 0) { - output.WriteRawTag(48); - output.WriteInt32(RoomID); - } - if (Visable != 0) { - output.WriteRawTag(72); - output.WriteInt32(Visable); - } - if (UsePassword != 0) { - output.WriteRawTag(80); - output.WriteInt32(UsePassword); - } - if (Password.Length != 0) { - output.WriteRawTag(90); - output.WriteString(Password); - } - playerpack_.WriteTo(output, _repeated_playerpack_codec); - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Roomname.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Roomname); - } - if (Maxnum != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Maxnum); - } - if (Curnum != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Curnum); - } - if (State != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(State); - } - if (gamestate_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Gamestate); - } - if (RoomID != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(RoomID); - } - if (Visable != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Visable); - } - if (UsePassword != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UsePassword); - } - if (Password.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Password); - } - size += playerpack_.CalculateSize(_repeated_playerpack_codec); - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RoomPack other) { - if (other == null) { - return; - } - if (other.Roomname.Length != 0) { - Roomname = other.Roomname; - } - if (other.Maxnum != 0) { - Maxnum = other.Maxnum; - } - if (other.Curnum != 0) { - Curnum = other.Curnum; - } - if (other.State != 0) { - State = other.State; - } - if (other.gamestate_ != null) { - if (gamestate_ == null) { - Gamestate = new global::TEngineProto.GameStatePack(); - } - Gamestate.MergeFrom(other.Gamestate); - } - if (other.RoomID != 0) { - RoomID = other.RoomID; - } - if (other.Visable != 0) { - Visable = other.Visable; - } - if (other.UsePassword != 0) { - UsePassword = other.UsePassword; - } - if (other.Password.Length != 0) { - Password = other.Password; - } - playerpack_.Add(other.playerpack_); - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - Roomname = input.ReadString(); - break; - } - case 16: { - Maxnum = input.ReadInt32(); - break; - } - case 24: { - Curnum = input.ReadInt32(); - break; - } - case 32: { - State = input.ReadInt32(); - break; - } - case 42: { - if (gamestate_ == null) { - Gamestate = new global::TEngineProto.GameStatePack(); - } - input.ReadMessage(Gamestate); - break; - } - case 48: { - RoomID = input.ReadInt32(); - break; - } - case 72: { - Visable = input.ReadInt32(); - break; - } - case 80: { - UsePassword = input.ReadInt32(); - break; - } - case 90: { - Password = input.ReadString(); - break; - } - case 98: { - playerpack_.AddEntriesFrom(input, _repeated_playerpack_codec); - break; - } - } - } - } - - } - - public sealed partial class PlayerPack : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PlayerPack()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[3]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PlayerPack() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PlayerPack(PlayerPack other) : this() { - playername_ = other.playername_; - playerID_ = other.playerID_; - hp_ = other.hp_; - posPack_ = other.posPack_ != null ? other.posPack_.Clone() : null; - playerJob_ = other.playerJob_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PlayerPack Clone() { - return new PlayerPack(this); - } - - /// Field number for the "playername" field. - public const int PlayernameFieldNumber = 1; - private string playername_ = ""; - /// - ///玩家名称 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Playername { - get { return playername_; } - set { - playername_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "playerID" field. - public const int PlayerIDFieldNumber = 2; - private string playerID_ = ""; - /// - ///玩家ID - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string PlayerID { - get { return playerID_; } - set { - playerID_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "hp" field. - public const int HpFieldNumber = 3; - private int hp_; - /// - ///玩家血量 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Hp { - get { return hp_; } - set { - hp_ = value; - } - } - - /// Field number for the "posPack" field. - public const int PosPackFieldNumber = 4; - private global::TEngineProto.PosPack posPack_; - /// - ///位置信息 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.PosPack PosPack { - get { return posPack_; } - set { - posPack_ = value; - } - } - - /// Field number for the "playerJob" field. - public const int PlayerJobFieldNumber = 5; - private int playerJob_; - /// - ///玩家职业 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int PlayerJob { - get { return playerJob_; } - set { - playerJob_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as PlayerPack); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(PlayerPack other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Playername != other.Playername) return false; - if (PlayerID != other.PlayerID) return false; - if (Hp != other.Hp) return false; - if (!object.Equals(PosPack, other.PosPack)) return false; - if (PlayerJob != other.PlayerJob) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Playername.Length != 0) hash ^= Playername.GetHashCode(); - if (PlayerID.Length != 0) hash ^= PlayerID.GetHashCode(); - if (Hp != 0) hash ^= Hp.GetHashCode(); - if (posPack_ != null) hash ^= PosPack.GetHashCode(); - if (PlayerJob != 0) hash ^= PlayerJob.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Playername.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Playername); - } - if (PlayerID.Length != 0) { - output.WriteRawTag(18); - output.WriteString(PlayerID); - } - if (Hp != 0) { - output.WriteRawTag(24); - output.WriteInt32(Hp); - } - if (posPack_ != null) { - output.WriteRawTag(34); - output.WriteMessage(PosPack); - } - if (PlayerJob != 0) { - output.WriteRawTag(40); - output.WriteInt32(PlayerJob); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Playername.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Playername); - } - if (PlayerID.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PlayerID); - } - if (Hp != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Hp); - } - if (posPack_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(PosPack); - } - if (PlayerJob != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlayerJob); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(PlayerPack other) { - if (other == null) { - return; - } - if (other.Playername.Length != 0) { - Playername = other.Playername; - } - if (other.PlayerID.Length != 0) { - PlayerID = other.PlayerID; - } - if (other.Hp != 0) { - Hp = other.Hp; - } - if (other.posPack_ != null) { - if (posPack_ == null) { - PosPack = new global::TEngineProto.PosPack(); - } - PosPack.MergeFrom(other.PosPack); - } - if (other.PlayerJob != 0) { - PlayerJob = other.PlayerJob; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - Playername = input.ReadString(); - break; - } - case 18: { - PlayerID = input.ReadString(); - break; - } - case 24: { - Hp = input.ReadInt32(); - break; - } - case 34: { - if (posPack_ == null) { - PosPack = new global::TEngineProto.PosPack(); - } - input.ReadMessage(PosPack); - break; - } - case 40: { - PlayerJob = input.ReadInt32(); - break; - } - } - } - } - - } - - public sealed partial class GameStatePack : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameStatePack()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[4]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GameStatePack() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GameStatePack(GameStatePack other) : this() { - state_ = other.state_; - bossId_ = other.bossId_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GameStatePack Clone() { - return new GameStatePack(this); - } - - /// Field number for the "state" field. - public const int StateFieldNumber = 1; - private global::TEngineProto.GAMESTATE state_ = global::TEngineProto.GAMESTATE.State1; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.GAMESTATE State { - get { return state_; } - set { - state_ = value; - } - } - - /// Field number for the "BossId" field. - public const int BossIdFieldNumber = 2; - private int bossId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int BossId { - get { return bossId_; } - set { - bossId_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as GameStatePack); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GameStatePack other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (State != other.State) return false; - if (BossId != other.BossId) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (State != global::TEngineProto.GAMESTATE.State1) hash ^= State.GetHashCode(); - if (BossId != 0) hash ^= BossId.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (State != global::TEngineProto.GAMESTATE.State1) { - output.WriteRawTag(8); - output.WriteEnum((int) State); - } - if (BossId != 0) { - output.WriteRawTag(16); - output.WriteInt32(BossId); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (State != global::TEngineProto.GAMESTATE.State1) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); - } - if (BossId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(BossId); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GameStatePack other) { - if (other == null) { - return; - } - if (other.State != global::TEngineProto.GAMESTATE.State1) { - State = other.State; - } - if (other.BossId != 0) { - BossId = other.BossId; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - State = (global::TEngineProto.GAMESTATE) input.ReadEnum(); - break; - } - case 16: { - BossId = input.ReadInt32(); - break; - } - } - } - } - - } - - public sealed partial class CardData : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardData()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[5]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardData() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardData(CardData other) : this() { - cardInt_ = other.cardInt_; - cardValue_ = other.cardValue_; - cardType_ = other.cardType_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardData Clone() { - return new CardData(this); - } - - /// Field number for the "cardInt" field. - public const int CardIntFieldNumber = 1; - private int cardInt_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CardInt { - get { return cardInt_; } - set { - cardInt_ = value; - } - } - - /// Field number for the "cardValue" field. - public const int CardValueFieldNumber = 2; - private int cardValue_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CardValue { - get { return cardValue_; } - set { - cardValue_ = value; - } - } - - /// Field number for the "cardType" field. - public const int CardTypeFieldNumber = 3; - private global::TEngineProto.CardType cardType_ = global::TEngineProto.CardType.None; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::TEngineProto.CardType CardType { - get { return cardType_; } - set { - cardType_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as CardData); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(CardData other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (CardInt != other.CardInt) return false; - if (CardValue != other.CardValue) return false; - if (CardType != other.CardType) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (CardInt != 0) hash ^= CardInt.GetHashCode(); - if (CardValue != 0) hash ^= CardValue.GetHashCode(); - if (CardType != global::TEngineProto.CardType.None) hash ^= CardType.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (CardInt != 0) { - output.WriteRawTag(8); - output.WriteInt32(CardInt); - } - if (CardValue != 0) { - output.WriteRawTag(16); - output.WriteInt32(CardValue); - } - if (CardType != global::TEngineProto.CardType.None) { - output.WriteRawTag(24); - output.WriteEnum((int) CardType); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (CardInt != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(CardInt); - } - if (CardValue != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(CardValue); - } - if (CardType != global::TEngineProto.CardType.None) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CardType); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(CardData other) { - if (other == null) { - return; - } - if (other.CardInt != 0) { - CardInt = other.CardInt; - } - if (other.CardValue != 0) { - CardValue = other.CardValue; - } - if (other.CardType != global::TEngineProto.CardType.None) { - CardType = other.CardType; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - CardInt = input.ReadInt32(); - break; - } - case 16: { - CardValue = input.ReadInt32(); - break; - } - case 24: { - CardType = (global::TEngineProto.CardType) input.ReadEnum(); - break; - } - } - } - } - - } - - public sealed partial class PosPack : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PosPack()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::TEngineProto.TEngineProtoReflection.Descriptor.MessageTypes[6]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PosPack() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PosPack(PosPack other) : this() { - posX_ = other.posX_; - posY_ = other.posY_; - posZ_ = other.posZ_; - rotaX_ = other.rotaX_; - rotaY_ = other.rotaY_; - rotaZ_ = other.rotaZ_; - animation_ = other.animation_; - dirr_ = other.dirr_; - moveX_ = other.moveX_; - moveY_ = other.moveY_; - moveZ_ = other.moveZ_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PosPack Clone() { - return new PosPack(this); - } - - /// Field number for the "PosX" field. - public const int PosXFieldNumber = 1; - private float posX_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float PosX { - get { return posX_; } - set { - posX_ = value; - } - } - - /// Field number for the "PosY" field. - public const int PosYFieldNumber = 2; - private float posY_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float PosY { - get { return posY_; } - set { - posY_ = value; - } - } - - /// Field number for the "PosZ" field. - public const int PosZFieldNumber = 3; - private float posZ_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float PosZ { - get { return posZ_; } - set { - posZ_ = value; - } - } - - /// Field number for the "RotaX" field. - public const int RotaXFieldNumber = 4; - private float rotaX_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float RotaX { - get { return rotaX_; } - set { - rotaX_ = value; - } - } - - /// Field number for the "RotaY" field. - public const int RotaYFieldNumber = 5; - private float rotaY_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float RotaY { - get { return rotaY_; } - set { - rotaY_ = value; - } - } - - /// Field number for the "RotaZ" field. - public const int RotaZFieldNumber = 6; - private float rotaZ_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float RotaZ { - get { return rotaZ_; } - set { - rotaZ_ = value; - } - } - - /// Field number for the "Animation" field. - public const int AnimationFieldNumber = 8; - private int animation_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Animation { - get { return animation_; } - set { - animation_ = value; - } - } - - /// Field number for the "Dirr" field. - public const int DirrFieldNumber = 9; - private int dirr_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Dirr { - get { return dirr_; } - set { - dirr_ = value; - } - } - - /// Field number for the "MoveX" field. - public const int MoveXFieldNumber = 10; - private float moveX_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float MoveX { - get { return moveX_; } - set { - moveX_ = value; - } - } - - /// Field number for the "MoveY" field. - public const int MoveYFieldNumber = 11; - private float moveY_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float MoveY { - get { return moveY_; } - set { - moveY_ = value; - } - } - - /// Field number for the "MoveZ" field. - public const int MoveZFieldNumber = 12; - private float moveZ_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float MoveZ { - get { return moveZ_; } - set { - moveZ_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as PosPack); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(PosPack other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PosX, other.PosX)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PosY, other.PosY)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PosZ, other.PosZ)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RotaX, other.RotaX)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RotaY, other.RotaY)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RotaZ, other.RotaZ)) return false; - if (Animation != other.Animation) return false; - if (Dirr != other.Dirr) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MoveX, other.MoveX)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MoveY, other.MoveY)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MoveZ, other.MoveZ)) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (PosX != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PosX); - if (PosY != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PosY); - if (PosZ != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PosZ); - if (RotaX != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RotaX); - if (RotaY != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RotaY); - if (RotaZ != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RotaZ); - if (Animation != 0) hash ^= Animation.GetHashCode(); - if (Dirr != 0) hash ^= Dirr.GetHashCode(); - if (MoveX != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MoveX); - if (MoveY != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MoveY); - if (MoveZ != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MoveZ); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (PosX != 0F) { - output.WriteRawTag(13); - output.WriteFloat(PosX); - } - if (PosY != 0F) { - output.WriteRawTag(21); - output.WriteFloat(PosY); - } - if (PosZ != 0F) { - output.WriteRawTag(29); - output.WriteFloat(PosZ); - } - if (RotaX != 0F) { - output.WriteRawTag(37); - output.WriteFloat(RotaX); - } - if (RotaY != 0F) { - output.WriteRawTag(45); - output.WriteFloat(RotaY); - } - if (RotaZ != 0F) { - output.WriteRawTag(53); - output.WriteFloat(RotaZ); - } - if (Animation != 0) { - output.WriteRawTag(64); - output.WriteInt32(Animation); - } - if (Dirr != 0) { - output.WriteRawTag(72); - output.WriteInt32(Dirr); - } - if (MoveX != 0F) { - output.WriteRawTag(85); - output.WriteFloat(MoveX); - } - if (MoveY != 0F) { - output.WriteRawTag(93); - output.WriteFloat(MoveY); - } - if (MoveZ != 0F) { - output.WriteRawTag(101); - output.WriteFloat(MoveZ); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (PosX != 0F) { - size += 1 + 4; - } - if (PosY != 0F) { - size += 1 + 4; - } - if (PosZ != 0F) { - size += 1 + 4; - } - if (RotaX != 0F) { - size += 1 + 4; - } - if (RotaY != 0F) { - size += 1 + 4; - } - if (RotaZ != 0F) { - size += 1 + 4; - } - if (Animation != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Animation); - } - if (Dirr != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dirr); - } - if (MoveX != 0F) { - size += 1 + 4; - } - if (MoveY != 0F) { - size += 1 + 4; - } - if (MoveZ != 0F) { - size += 1 + 4; - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(PosPack other) { - if (other == null) { - return; - } - if (other.PosX != 0F) { - PosX = other.PosX; - } - if (other.PosY != 0F) { - PosY = other.PosY; - } - if (other.PosZ != 0F) { - PosZ = other.PosZ; - } - if (other.RotaX != 0F) { - RotaX = other.RotaX; - } - if (other.RotaY != 0F) { - RotaY = other.RotaY; - } - if (other.RotaZ != 0F) { - RotaZ = other.RotaZ; - } - if (other.Animation != 0) { - Animation = other.Animation; - } - if (other.Dirr != 0) { - Dirr = other.Dirr; - } - if (other.MoveX != 0F) { - MoveX = other.MoveX; - } - if (other.MoveY != 0F) { - MoveY = other.MoveY; - } - if (other.MoveZ != 0F) { - MoveZ = other.MoveZ; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 13: { - PosX = input.ReadFloat(); - break; - } - case 21: { - PosY = input.ReadFloat(); - break; - } - case 29: { - PosZ = input.ReadFloat(); - break; - } - case 37: { - RotaX = input.ReadFloat(); - break; - } - case 45: { - RotaY = input.ReadFloat(); - break; - } - case 53: { - RotaZ = input.ReadFloat(); - break; - } - case 64: { - Animation = input.ReadInt32(); - break; - } - case 72: { - Dirr = input.ReadInt32(); - break; - } - case 85: { - MoveX = input.ReadFloat(); - break; - } - case 93: { - MoveY = input.ReadFloat(); - break; - } - case 101: { - MoveZ = input.ReadFloat(); - break; - } - } - } - } - - } - - #endregion - -} - -#endregion Designer generated code diff --git a/Assets/TEngine/Runtime/Net/Proto/TEngineProto.cs.meta b/Assets/TEngine/Runtime/Net/Proto/TEngineProto.cs.meta deleted file mode 100644 index 58c230b3..00000000 --- a/Assets/TEngine/Runtime/Net/Proto/TEngineProto.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 594add508af9d364c856aee347ccac38 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Net/ProtoUtils.cs b/Assets/TEngine/Runtime/Net/ProtoUtils.cs deleted file mode 100644 index 0743b73d..00000000 --- a/Assets/TEngine/Runtime/Net/ProtoUtils.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.IO; -using JetBrains.Annotations; - -namespace TEngine.Net -{ - public class ProtoUtils - { - /// - /// 序列化 MainPack -> byte[] - /// - /// - /// - /// - [CanBeNull] - public static byte[] Serialize(T mainPack) where T : class - { - try - { - using (var stream = new System.IO.MemoryStream()) - { - ProtoBuf.Serializer.Serialize(stream, mainPack); - return stream.ToArray(); - } - } - catch (IOException ex) - { - TLogger.LogError($"[Serialize] Error:{ex.Message}, {ex.Data["StackTrace"]}"); - return null; - } - } - - /// - /// 反序列化 - /// - /// - /// - /// - [CanBeNull] - public static T DeSerialize(byte[] buffer) where T : class - { - try - { - return ProtoBuf.Serializer.Deserialize(typeof(T), new System.IO.MemoryStream(buffer)) as T; - } - catch (IOException ex) - { - TLogger.LogError(($"[DeSerialize] 错误:{ex.Message}, {ex.Data["StackTrace"]}")); - return null; - } - } - } -} diff --git a/Assets/TEngine/Runtime/Net/ProtoUtils.cs.meta b/Assets/TEngine/Runtime/Net/ProtoUtils.cs.meta deleted file mode 100644 index 1c12e335..00000000 --- a/Assets/TEngine/Runtime/Net/ProtoUtils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cd6ea983cec305b48a5aa4309c159038 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Test.meta b/Assets/TEngine/Runtime/Test.meta deleted file mode 100644 index 967a0e6e..00000000 --- a/Assets/TEngine/Runtime/Test.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 08c48004316f11b4fbae15f2a1da9413 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Test/TEngine.unity b/Assets/TEngine/Runtime/Test/TEngine.unity deleted file mode 100644 index 631e86af..00000000 --- a/Assets/TEngine/Runtime/Test/TEngine.unity +++ /dev/null @@ -1,618 +0,0 @@ -%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: 705507994} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - 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: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - 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_UseShadowmask: 1 ---- !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 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &705507993 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 705507995} - - component: {fileID: 705507994} - 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 &705507994 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - 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: 1 - 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_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &705507995 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - 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 &963194225 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 963194228} - - component: {fileID: 963194227} - - component: {fileID: 963194226} - 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 &963194226 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 ---- !u!20 &963194227 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, 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 &963194228 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - 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 &1110871270 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1110871273} - - component: {fileID: 1110871272} - - component: {fileID: 1110871271} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1110871271 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1110871270} - 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 &1110871272 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1110871270} - 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 &1110871273 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1110871270} - 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: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1130577115 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1781744645} - m_Modifications: - - target: {fileID: 7204064258845019464, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_Name - value: TEngineUI - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 3e5dd2f04d2558c47bba6525f074666d, type: 3} ---- !u!224 &1130577116 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 7204064258845019465, guid: 3e5dd2f04d2558c47bba6525f074666d, - type: 3} - m_PrefabInstance: {fileID: 1130577115} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1417917351 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1417917352} - m_Layer: 0 - m_Name: TEngine - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1417917352 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1417917351} - 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!1 &1781744641 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1781744645} - - component: {fileID: 1781744644} - - component: {fileID: 1781744643} - - component: {fileID: 1781744642} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1781744642 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781744641} - 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 ---- !u!114 &1781744643 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781744641} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 ---- !u!223 &1781744644 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781744641} - 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: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1781744645 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781744641} - 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: - - {fileID: 1130577116} - m_Father: {fileID: 0} - 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: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} diff --git a/Assets/TEngine/Runtime/Test/TEngine.unity.meta b/Assets/TEngine/Runtime/Test/TEngine.unity.meta deleted file mode 100644 index 840a02a2..00000000 --- a/Assets/TEngine/Runtime/Test/TEngine.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c95d4c5cfafb6a1469f6280da979583a -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Test/TEngineUI.prefab b/Assets/TEngine/Runtime/Test/TEngineUI.prefab deleted file mode 100644 index c4c22e53..00000000 --- a/Assets/TEngine/Runtime/Test/TEngineUI.prefab +++ /dev/null @@ -1,814 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2106639441076157906 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1084134490404560056} - - component: {fileID: 5393179827538877854} - m_Layer: 5 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1084134490404560056 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2106639441076157906} - 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: 7259597378913795520} - m_Father: {fileID: 1741869892649704506} - 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: 0} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &5393179827538877854 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2106639441076157906} - m_CullTransparentMesh: 0 ---- !u!1 &3254931983572599273 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1741869892649704506} - m_Layer: 5 - m_Name: m_goLoading - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1741869892649704506 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3254931983572599273} - 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: 1084134490404560056} - m_Father: {fileID: 7204064258845019465} - m_RootOrder: 4 - 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: -184} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7204064258638085486 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7204064258638085487} - - component: {fileID: 7204064258638085473} - - component: {fileID: 7204064258638085472} - m_Layer: 5 - m_Name: m_imgbg - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7204064258638085487 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064258638085486} - 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: 7204064258845019465} - 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 &7204064258638085473 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064258638085486} - m_CullTransparentMesh: 0 ---- !u!114 &7204064258638085472 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064258638085486} - 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, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - 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 &7204064258845019464 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7204064258845019465} - - component: {fileID: 7140164605899932962} - m_Layer: 5 - m_Name: TEngineUI 1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7204064258845019465 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064258845019464} - 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: 7204064258638085487} - - {fileID: 7204064259474718771} - - {fileID: 7204064259561140506} - - {fileID: 3157519263585624237} - - {fileID: 1741869892649704506} - 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!223 &7140164605899932962 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064258845019464} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 1 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 10 - m_TargetDisplay: 0 ---- !u!1 &7204064259474718770 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7204064259474718771} - - component: {fileID: 7204064259474718773} - - component: {fileID: 7204064259474718772} - m_Layer: 5 - m_Name: m_textTittle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7204064259474718771 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259474718770} - 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: 7204064258845019465} - 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, y: 106} - m_SizeDelta: {x: 600, y: 600} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7204064259474718773 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259474718770} - m_CullTransparentMesh: 0 ---- !u!114 &7204064259474718772 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259474718770} - 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.7735849, g: 0.7735849, b: 0.7735849, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 128 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 128 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: TEngine ---- !u!1 &7204064259561140505 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7204064259561140506} - - component: {fileID: 7204064259561140508} - - component: {fileID: 7204064259561140507} - - component: {fileID: 7204064259561140509} - m_Layer: 5 - m_Name: m_textVer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7204064259561140506 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259561140505} - 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: 7204064258845019465} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -80, y: 30} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7204064259561140508 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259561140505} - m_CullTransparentMesh: 0 ---- !u!114 &7204064259561140507 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259561140505} - 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.7735849, g: 0.7735849, b: 0.7735849, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 30 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 2 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 1.0.0 ---- !u!114 &7204064259561140509 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7204064259561140505} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HorizontalFit: 2 - m_VerticalFit: 2 ---- !u!1 &7259597378936059744 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7259597378913795520} - m_Layer: 0 - m_Name: Pulsing 4 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7259597378913795520 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059744} - 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: 7259597378913795526} - - {fileID: 7259597378913795524} - - {fileID: 7259597378913795522} - m_Father: {fileID: 1084134490404560056} - 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: 0} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7259597378936059746 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7259597378913795522} - - component: {fileID: 7259597378913832704} - - component: {fileID: 7259597378930033280} - - component: {fileID: 7259597378930339488} - - component: {fileID: 7259597378913690464} - m_Layer: 0 - m_Name: pulsing_4_3 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7259597378913795522 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059746} - 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: 7259597378913795520} - m_RootOrder: 2 - 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: 0} - m_SizeDelta: {x: 85, y: 85} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7259597378913832704 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059746} - m_CullTransparentMesh: 0 ---- !u!114 &7259597378930033280 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059746} - 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_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300032, guid: 0fd21678280ad9c47aa2d32baf438c5d, type: 3} - 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!111 &7259597378930339488 -Animation: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059746} - m_Enabled: 1 - serializedVersion: 3 - m_Animation: {fileID: 7400000, guid: 65d69a13d3f3f9e45aab048438948a51, type: 2} - m_Animations: - - {fileID: 7400000, guid: 65d69a13d3f3f9e45aab048438948a51, type: 2} - m_WrapMode: 0 - m_PlayAutomatically: 1 - m_AnimatePhysics: 0 - m_CullingType: 0 ---- !u!225 &7259597378913690464 -CanvasGroup: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059746} - m_Enabled: 1 - m_Alpha: 1 - m_Interactable: 1 - m_BlocksRaycasts: 1 - m_IgnoreParentGroups: 0 ---- !u!1 &7259597378936059748 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7259597378913795524} - - component: {fileID: 7259597378913832708} - - component: {fileID: 7259597378930033284} - - component: {fileID: 7259597378930339492} - - component: {fileID: 7259597378913690468} - m_Layer: 0 - m_Name: pulsing_4_2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7259597378913795524 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059748} - 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: 7259597378913795520} - 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, y: 0} - m_SizeDelta: {x: 85, y: 85} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7259597378913832708 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059748} - m_CullTransparentMesh: 0 ---- !u!114 &7259597378930033284 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059748} - 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_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300032, guid: 0fd21678280ad9c47aa2d32baf438c5d, type: 3} - 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!111 &7259597378930339492 -Animation: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059748} - m_Enabled: 1 - serializedVersion: 3 - m_Animation: {fileID: 7400000, guid: 9872cb868c4da1242b6f02e1a430beec, type: 2} - m_Animations: - - {fileID: 7400000, guid: 9872cb868c4da1242b6f02e1a430beec, type: 2} - m_WrapMode: 0 - m_PlayAutomatically: 1 - m_AnimatePhysics: 0 - m_CullingType: 0 ---- !u!225 &7259597378913690468 -CanvasGroup: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059748} - m_Enabled: 1 - m_Alpha: 1 - m_Interactable: 1 - m_BlocksRaycasts: 1 - m_IgnoreParentGroups: 0 ---- !u!1 &7259597378936059750 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7259597378913795526} - - component: {fileID: 7259597378913832710} - - component: {fileID: 7259597378930033286} - - component: {fileID: 7259597378930339494} - - component: {fileID: 7259597378913690470} - m_Layer: 0 - m_Name: pulsing_4_1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7259597378913795526 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059750} - 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: 7259597378913795520} - 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: 0} - m_SizeDelta: {x: 70, y: 70} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7259597378913832710 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059750} - m_CullTransparentMesh: 0 ---- !u!114 &7259597378930033286 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059750} - 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_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300012, guid: 0fd21678280ad9c47aa2d32baf438c5d, type: 3} - 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!111 &7259597378930339494 -Animation: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059750} - m_Enabled: 1 - serializedVersion: 3 - m_Animation: {fileID: 7400000, guid: f0d4227845083f9498777503da980310, type: 2} - m_Animations: - - {fileID: 7400000, guid: f0d4227845083f9498777503da980310, type: 2} - m_WrapMode: 0 - m_PlayAutomatically: 1 - m_AnimatePhysics: 0 - m_CullingType: 0 ---- !u!225 &7259597378913690470 -CanvasGroup: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7259597378936059750} - m_Enabled: 1 - m_Alpha: 1 - m_Interactable: 1 - m_BlocksRaycasts: 1 - m_IgnoreParentGroups: 0 ---- !u!1 &9125125053208946359 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3157519263585624237} - - component: {fileID: 1447210249159042790} - - component: {fileID: 8467231784118766695} - m_Layer: 5 - m_Name: m_imgLogo - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &3157519263585624237 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9125125053208946359} - 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: 7204064258845019465} - m_RootOrder: 3 - 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: 329} - m_SizeDelta: {x: 512, y: 512} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1447210249159042790 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9125125053208946359} - m_CullTransparentMesh: 0 ---- !u!114 &8467231784118766695 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9125125053208946359} - 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_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 92581ac34d887534ca61ddbbdeb2ebf0, type: 3} - 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/TEngine/Runtime/Test/TEngineUI.prefab.meta b/Assets/TEngine/Runtime/Test/TEngineUI.prefab.meta deleted file mode 100644 index f24cca6a..00000000 --- a/Assets/TEngine/Runtime/Test/TEngineUI.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3e5dd2f04d2558c47bba6525f074666d -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Thread.meta b/Assets/TEngine/Runtime/Thread.meta deleted file mode 100644 index 5c8f0b1b..00000000 --- a/Assets/TEngine/Runtime/Thread.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 36acd0a4cd2e22f4186ff544051e4a26 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Thread/Loom.cs b/Assets/TEngine/Runtime/Thread/Loom.cs deleted file mode 100644 index 31786c23..00000000 --- a/Assets/TEngine/Runtime/Thread/Loom.cs +++ /dev/null @@ -1,193 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; -using System; -using System.Threading; -using System.Linq; - -/******************************************************************************* - * 开启一个Loom进程 - Loom.RunAsync(() => - { - aucThread = new Thread(ReceiveMsg); - aucThread.Start(); - } - 进程调用主线程方法 - MainPack pack = (MainPack)MainPack.Descriptor.Parser.ParseFrom(buffer, 0, len); - Loom.QueueOnMainThread((param) => - { - UdpHandleResponse(pack); - }, null); - - *******************************************************************************/ -namespace TEngine -{ - // - // 从子线程调用Unity的方法 - // - public class Loom : MonoBehaviour - { - public Dictionary TokenSourcesDictionary = new Dictionary(); - public static int MaxThreads = 8; - private static int _numThreads; - private static Loom _current; - public static Loom Current - { - get - { - Initialize(); - return _current; - } - } - - public void Awake() - { - _current = this; - initialized = true; - } - - protected void OnDestroy() - { - - } - - private static bool initialized; - - public static void Initialize() - { - if (!initialized) - { - if (!Application.isPlaying) - { - return; - } - initialized = true; - - var obj = new GameObject("Loom"); - - _current = obj.AddComponent(); - - GameObject tEngine = SingletonMgr.Root; - - if (tEngine != null) - { - obj.transform.SetParent(tEngine.transform); - } - } - } - - public struct NoDelayedQueueItem - { - public Action action; - public object param; - } - - private List _actions = new List(); - - public struct DelayedQueueItem - { - public float time; - public Action action; - public object param; - } - - private List _delayed = new List(); - - List _currentDelayed = new List(); - - public static void QueueOnMainThread(Action taction, object tparam) - { - QueueOnMainThread(taction, tparam, 0f); - } - public static void QueueOnMainThread(Action taction, object tparam, float time) - { - if (time != 0f) - { - lock (Current._delayed) - { - Current._delayed.Add(new DelayedQueueItem { time = Time.time + time, action = taction, param = tparam }); - } - } - else - { - lock (Current._actions) - { - Current._actions.Add(new NoDelayedQueueItem { action = taction, param = tparam }); - } - } - } - - public static Thread RunAsync(Action action) - { - Initialize(); - while (_numThreads >= MaxThreads) - { - Thread.Sleep(100); - } - Interlocked.Increment(ref _numThreads); - ThreadPool.QueueUserWorkItem(RunAction, action); - return null; - } - - private static void RunAction(object action) - { - try - { - ((Action)action)(); - } - catch - { - - } - finally - { - Interlocked.Decrement(ref _numThreads); - } - } - - - void OnDisable() - { - if (_current == this) - { - _current = null; - } - } - - List _currentActions = new List(); - - void Update() - { - if (_actions.Count > 0) - { - lock (_actions) - { - _currentActions.Clear(); - _currentActions.AddRange(_actions); - _actions.Clear(); - } - for (int i = 0; i < _currentActions.Count; i++) - { - _currentActions[i].action(_currentActions[i].param); - } - } - - if (_delayed.Count > 0) - { - lock (_delayed) - { - _currentDelayed.Clear(); - _currentDelayed.AddRange(_delayed.Where(d => d.time <= Time.time)); - for (int i = 0; i < _currentDelayed.Count; i++) - { - _delayed.Remove(_currentDelayed[i]); - } - } - - for (int i = 0; i < _currentDelayed.Count; i++) - { - _currentDelayed[i].action(_currentDelayed[i].param); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Thread/Loom.cs.meta b/Assets/TEngine/Runtime/Thread/Loom.cs.meta deleted file mode 100644 index 4741c1de..00000000 --- a/Assets/TEngine/Runtime/Thread/Loom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b87f840d1d0b8a14799b0eee6f0fabae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/Thread/MultiThreadMgr.cs b/Assets/TEngine/Runtime/Thread/MultiThreadMgr.cs deleted file mode 100644 index 18133cd8..00000000 --- a/Assets/TEngine/Runtime/Thread/MultiThreadMgr.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using UnityEngine; - -namespace TEngine -{ - /// - /// 异步任务,交给子线程执行 - /// - public abstract class AsyncTask - { - protected MultiThreadMgr MultiThreadMgr - { - get - { - return MultiThreadMgr.Instance; - } - } - - /// - /// 执行任务 - /// - public void Execute() - { - try - { - Run(); - } - finally - { - if (!Loop) - { - MultiThreadMgr.FinishTask(this); - } - } - } - - /// - /// 关闭执行 - /// - public abstract void Close(); - - /// - /// 开始运行 - /// - public abstract void Run(); - - public bool Loop = false; - } - - /// - /// 多线程管理器 - /// - public class MultiThreadMgr : UnitySingleton - { - // 需要在主线程执行的操作 - static List actions = new List(); - static List runningActions = new List(); - static object obj = new object(); - - // 异步任务队列 - static List taskList = new List(); - static Dictionary threads = new Dictionary(); - - /// - /// 在主线程中执行 - /// - /// Action. - public void RunOnMainThread(Action action) - { - lock (obj) - { - actions.Add(action); - } - } - - /// - /// 添加异步任务 - /// - /// Runnable. - public void AddAsyncTask(AsyncTask runnable) - { - TLogger.LogInfo($"AddTask:{ runnable}"); - taskList.Add(runnable); - Thread thread = new Thread(runnable.Execute); - threads.Add(runnable,thread); - thread.IsBackground = true; - thread.Start(); - } - - /// - /// 完成异步任务 - /// - /// Runnable. - public void FinishTask(AsyncTask runnable) - { - runnable.Close(); - taskList.Remove(runnable); - threads[runnable].Abort(); - threads.Remove(runnable); - TLogger.LogInfo($"RemoveTask:{runnable},{taskList.Count}"); - } - - /// - /// 主线程更新 - /// - void Update() - { - lock (obj) - { - runningActions.Clear(); - runningActions.AddRange(actions); - actions.Clear(); - } - - // 处理主线程事件 - if (runningActions.Count > 0) - { - foreach (Action action in runningActions) - { - action(); - } - } - runningActions.Clear(); - } - - protected override void OnDestroy() - { - for (int i = 0; i < taskList.Count; i++) - { - taskList[i].Close(); - } - - var etr = threads.GetEnumerator(); - - while (etr.MoveNext()) - { - var thread = etr.Current.Value; - thread.Abort(); - } - - etr.Dispose(); - - threads.Clear(); - - base.OnDestroy(); - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/Thread/MultiThreadMgr.cs.meta b/Assets/TEngine/Runtime/Thread/MultiThreadMgr.cs.meta deleted file mode 100644 index 6ed8c682..00000000 --- a/Assets/TEngine/Runtime/Thread/MultiThreadMgr.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: df75d01709b5c0249bbf3705717b9b37 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI.meta b/Assets/TEngine/Runtime/UI.meta deleted file mode 100644 index f045cc69..00000000 --- a/Assets/TEngine/Runtime/UI.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6dbe009c4405d7c40804b275dc182788 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Demo.meta b/Assets/TEngine/Runtime/UI/Demo.meta deleted file mode 100644 index 69224f34..00000000 --- a/Assets/TEngine/Runtime/UI/Demo.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0a8e160ca85704343b3b192d0f502a74 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Demo/TEngineUI.cs b/Assets/TEngine/Runtime/UI/Demo/TEngineUI.cs deleted file mode 100644 index bac14340..00000000 --- a/Assets/TEngine/Runtime/UI/Demo/TEngineUI.cs +++ /dev/null @@ -1,51 +0,0 @@ -using TEngine; -using UI; -using UnityEngine.UI; - -public class TEngineUI : UIWindow -{ - #region 脚本工具生成的代码 - private Image m_imgbg; - private Text m_textTittle; - private Text m_textVer; - protected override void ScriptGenerator() - { - m_imgbg = FindChildComponent("m_imgbg"); - m_textTittle = FindChildComponent("m_textTittle"); - m_textVer = FindChildComponent("m_textVer"); - - TLogger.LogInfo("TEngineUI ScriptGenerator"); - } - #endregion - - protected override void BindMemberProperty() - { - base.BindMemberProperty(); - - TLogger.LogInfo("TEngineUI BindMemberProperty"); - } - - protected override void OnCreate() - { - base.OnCreate(); - - TLogger.LogInfo("TEngineUI OnCreate"); - } - - protected override void OnVisible() - { - base.OnVisible(); - - TLogger.LogInfo("TEngineUI OnVisible"); - } - - protected override void OnUpdate() - { - //TEngineHotUpdate.GameLogicMain.Update(); - TLogger.LogInfo("TEngineUI OnUpdate"); - } - - #region 事件 - #endregion - -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/UI/Demo/TEngineUI.cs.meta b/Assets/TEngine/Runtime/UI/Demo/TEngineUI.cs.meta deleted file mode 100644 index e489a7a1..00000000 --- a/Assets/TEngine/Runtime/UI/Demo/TEngineUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 43c53df6e0f64cd4aa9b89eccbf0d5e7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend.meta b/Assets/TEngine/Runtime/UI/Extend.meta deleted file mode 100644 index f7a320c9..00000000 --- a/Assets/TEngine/Runtime/UI/Extend.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 07fe27a16f81038498bb75e47daa051f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend/DragItem.cs b/Assets/TEngine/Runtime/UI/Extend/DragItem.cs deleted file mode 100644 index 63701ffa..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/DragItem.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.EventSystems; - - -namespace UI -{ - public enum UIDragType - { - Draging, - Drop - } - - public class DragItem : UIEventItem - { - private UIDragType m_DragState = UIDragType.Drop; - private Vector3 m_ItemOldPos; - private Vector3 m_ItemCachePos; - private bool m_CanDrag = false; - - /// - /// 是否可以拖拽 - /// - public bool CanDrag - { - get - { - return m_CanDrag; - } - set - { - m_CanDrag = value; - if (m_CanDrag) - { - BindDrag(); - } - } - } - - protected override void OnCreate() - { - base.OnCreate(); - BindDrag(); - } - - private void BindDrag() - { - if (m_CanDrag) - { - BindBeginDragEvent(delegate (DragItem item, PointerEventData data) - { - if (!m_CanDrag) - { - return; - } - StartDragItem(UIDragType.Draging); - }); - - BindEndDragEvent(delegate (DragItem item, PointerEventData data) - { - if (!m_CanDrag) - { - return; - } - EndDrag(); - }); - } - } - - protected override void OnUpdate() - { - if (!m_CanDrag) - { - return; - } - UpdateDragPos(); - } - - private void StartDragItem(UIDragType type) - { - if (type != UIDragType.Drop) - { - m_ItemOldPos = transform.position; - Vector3 pos; - UISys.Mgr.GetMouseDownUiPos(out pos); - m_ItemCachePos = pos; - UpdateDragPos(); - m_DragState = type; - } - } - - private void EndDrag() - { - m_DragState = UIDragType.Drop; - transform.position = m_ItemOldPos; -#if UNITY_EDITOR - //Debug.LogError("m_ItemCachePos.y - m_ItemOldPos.y " + (m_ItemCachePos.y - m_ItemOldPos.y)); -#endif - if (m_ItemCachePos.y - m_ItemOldPos.y > 3) - { - - } - } - - private void UpdateDragPos() - { - if (m_DragState == UIDragType.Drop) - { - return; - } - - Vector3 pos; - UISys.Mgr.GetMouseDownUiPos(out pos); - transform.position += (pos - m_ItemCachePos); - m_ItemCachePos = pos; - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/UI/Extend/DragItem.cs.meta b/Assets/TEngine/Runtime/UI/Extend/DragItem.cs.meta deleted file mode 100644 index d3ccd5da..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/DragItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c7b94d5cb4dcf0a4fbaa02b3dc2bf15c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend/EmptyGraph.cs b/Assets/TEngine/Runtime/UI/Extend/EmptyGraph.cs deleted file mode 100644 index 32ff9e2f..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/EmptyGraph.cs +++ /dev/null @@ -1,18 +0,0 @@ -using UnityEngine.UI; - -public class EmptyGraph : Graphic -{ - public bool m_debug = false; - - protected override void OnPopulateMesh(VertexHelper vbo) - { - vbo.Clear(); - -#if UNITY_EDITOR - if (m_debug) - { - base.OnPopulateMesh(vbo); - } -#endif - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/UI/Extend/EmptyGraph.cs.meta b/Assets/TEngine/Runtime/UI/Extend/EmptyGraph.cs.meta deleted file mode 100644 index bc1552a3..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/EmptyGraph.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c5fa8a6d79d70d24fa5d3c3b233840f5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend/TipsUI.cs b/Assets/TEngine/Runtime/UI/Extend/TipsUI.cs deleted file mode 100644 index 18b36e70..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/TipsUI.cs +++ /dev/null @@ -1,253 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using TEngine; -using UnityEngine; -using UnityEngine.UI; - -namespace UI -{ - public class MsgUI : UIWindow - { - protected override void RegisterEvent() - { - base.RegisterEvent(); - } - } - - public class TipsEvent - { - public static int Log = StringId.StringToHash("TipsEvent.Log"); - } - - public class TipsUI : MonoBehaviour - { - //单例 - public static TipsUI Instance; - private void Awake() - { - Instance = this; - - AvailablePool = new List(); - UsedPool = new List(); - for (int i = 0; i < 5; i++) - { - AvailablePool.Add(Instantiate(Prefab, Mask.transform)); - AvailablePool[i].SetActive(false); - } - GameEventMgr.Instance.AddEventListener(TipsEvent.Log, TipsUI.Instance.Show); - } - //Prefab - public GameObject Prefab; - public GameObject Mask; - //对象池 - public List AvailablePool; - public List UsedPool; - //自定义内容 - [SerializeField] private float Speed; - //定时器 - private float timer1; - private float timer2; - void Start() - { - - } - - void Update() - { - timer1 += Time.deltaTime; - if (timer1 >= 2) - { - timer2 += Time.deltaTime; - if (timer2 > 1) - { - timer2 = 0; - if (UsedPool.Count > 0) - { - Text Tname = UsedPool[0].transform.Find("Name").GetComponent(); - Text Tmessage = UsedPool[0].transform.Find("Message").GetComponent(); - Image BG = UsedPool[0].GetComponent(); - StartCoroutine(AlphaDown(Tname)); - StartCoroutine(AlphaDown(Tmessage)); - StartCoroutine(ImageAlphaDown(BG)); - } - } - } - } - public void Show(string message) - { - GameObject go; - //使用对象池 - if (AvailablePool.Count > 0) - { - go = AvailablePool[0]; - AvailablePool.Remove(go); - UsedPool.Add(go); - } - else - { - go = UsedPool[0]; - UsedPool.Remove(go); - UsedPool.Add(go); - } - //进行一些初始化设定 - go.transform.localPosition = new Vector3(0, -75, 0); - go.SetActive(true); - go.GetComponent().color = new Color(0, 0, 0, 150f / 255f); - timer1 = timer2 = 0; - Text Tname = go.transform.Find("Name").GetComponent(); - Text Tmessage = go.transform.Find("Message").GetComponent(); - Tname.text = " " + "SYSTEM"; - Tmessage.text = " " + message; - float TnameWidth = Tname.preferredWidth; - float TmessageWidth = Tmessage.preferredWidth; - float goSizey = go.transform.GetComponent().sizeDelta.y; - go.transform.GetComponent().sizeDelta = new Vector2(TnameWidth + TmessageWidth, goSizey); - Tname.rectTransform.sizeDelta = new Vector2(TnameWidth, Tname.rectTransform.sizeDelta.y); - Tname.rectTransform.anchoredPosition = new Vector2(TnameWidth / 2, Tname.rectTransform.anchoredPosition.y); - Tmessage.rectTransform.sizeDelta = new Vector2(TmessageWidth, Tmessage.rectTransform.sizeDelta.y); - Tmessage.rectTransform.anchoredPosition = new Vector2(-TmessageWidth / 2, Tmessage.rectTransform.anchoredPosition.y); - StartCoroutine(AlphaUP(Tname)); - StartCoroutine(AlphaUP(Tmessage)); - foreach (GameObject go1 in UsedPool) - { - StartCoroutine(MoveUP(go1)); - } - if (UsedPool.Count >= 4) - { - Text Tname2 = UsedPool[UsedPool.Count - 4].transform.Find("Name").GetComponent(); - Text Tmessage2 = UsedPool[UsedPool.Count - 4].transform.Find("Message").GetComponent(); - Image BG = UsedPool[UsedPool.Count - 4].GetComponent(); - StartCoroutine(AlphaDown(Tname2)); - StartCoroutine(AlphaDown(Tmessage2)); - StartCoroutine(ImageAlphaDown(BG)); - } - } - - - public void Show(string name, string message) - { - GameObject go; - //使用对象池 - if (AvailablePool.Count > 0) - { - go = AvailablePool[0]; - AvailablePool.Remove(go); - UsedPool.Add(go); - } - else - { - go = UsedPool[0]; - UsedPool.Remove(go); - UsedPool.Add(go); - } - //进行一些初始化设定 - go.transform.localPosition = new Vector3(0, -75, 0); - go.SetActive(true); - go.GetComponent().color = new Color(0, 0, 0, 150f / 255f); - timer1 = timer2 = 0; - Text Tname = go.transform.Find("Name").GetComponent(); - Text Tmessage = go.transform.Find("Message").GetComponent(); - Tname.text = " " + name; - Tmessage.text = " " + message; - float TnameWidth = Tname.preferredWidth; - float TmessageWidth = Tmessage.preferredWidth; - float goSizey = go.transform.GetComponent().sizeDelta.y; - go.transform.GetComponent().sizeDelta = new Vector2(TnameWidth + TmessageWidth, goSizey); - Tname.rectTransform.sizeDelta = new Vector2(TnameWidth, Tname.rectTransform.sizeDelta.y); - Tname.rectTransform.anchoredPosition = new Vector2(TnameWidth / 2, Tname.rectTransform.anchoredPosition.y); - Tmessage.rectTransform.sizeDelta = new Vector2(TmessageWidth, Tmessage.rectTransform.sizeDelta.y); - Tmessage.rectTransform.anchoredPosition = new Vector2(-TmessageWidth / 2, Tmessage.rectTransform.anchoredPosition.y); - StartCoroutine(AlphaUP(Tname)); - StartCoroutine(AlphaUP(Tmessage)); - foreach (GameObject go1 in UsedPool) - { - StartCoroutine(MoveUP(go1)); - } - if (UsedPool.Count >= 4) - { - Text Tname2 = UsedPool[UsedPool.Count - 4].transform.Find("Name").GetComponent(); - Text Tmessage2 = UsedPool[UsedPool.Count - 4].transform.Find("Message").GetComponent(); - Image BG = UsedPool[UsedPool.Count - 4].GetComponent(); - StartCoroutine(AlphaDown(Tname2)); - StartCoroutine(AlphaDown(Tmessage2)); - StartCoroutine(ImageAlphaDown(BG)); - } - } - //文字透明度提高 - public IEnumerator AlphaUP(Text text) - { - text.color += new Color(0, 0, 0, -1); - while (true) - { - yield return new WaitForSeconds(0.01f); - text.color += new Color(0, 0, 0, 0.08f); - if (text.color.a >= 1) - { - yield break; - } - } - } - //向上移动 - public IEnumerator MoveUP(GameObject go) - { - float i = 0; - while (true) - { - yield return new WaitForSeconds(0.01f); - if (i + Speed >= 35) - { - go.transform.localPosition += new Vector3(0, 35 - i, 0); - yield break; - } - else - { - go.transform.localPosition += new Vector3(0, Speed, 0); - i += Speed; - } - } - } - //文字透明度下降 - public IEnumerator AlphaDown(Text text) - { - while (true) - { - yield return new WaitForSeconds(0.01f); - text.color -= new Color(0, 0, 0, 0.08f); - if (text.color.a <= 0) - { - yield break; - } - } - } - //背景透明度下降 - public IEnumerator ImageAlphaDown(Image image) - { - while (true) - { - yield return new WaitForSeconds(0.01f); - image.color -= new Color(0, 0, 0, 0.08f); - if (image.color.a <= 0) - { - image.gameObject.SetActive(false); - UsedPool.Remove(image.gameObject); - AvailablePool.Add(image.gameObject); - yield break; - } - } - } - //三个按钮的测试函数 - public void test() - { - Show("[没关系丶是爱情啊(安娜)]", "该睡觉咯。"); - } - public void test2() - { - Show("[没关系丶是爱情啊(安娜)]", "妈妈永远是对的。"); - } - public void test3() - { - Show("[没关系丶是爱情啊(安娜)]", "天降正义。"); - } - } - -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/UI/Extend/TipsUI.cs.meta b/Assets/TEngine/Runtime/UI/Extend/TipsUI.cs.meta deleted file mode 100644 index c021ae11..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/TipsUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ff16c005895bc442bc502480516be7b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend/TweenUtil.cs b/Assets/TEngine/Runtime/UI/Extend/TweenUtil.cs deleted file mode 100644 index db0e5dff..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/TweenUtil.cs +++ /dev/null @@ -1,112 +0,0 @@ -using TEngine; -using UnityEngine; - -namespace UI -{ - public enum TweenType - { - Position, - Rotation, - Scale, - Alpha, - } - - public class TweenUtil : MonoBehaviour - { - public bool isLocal; - public TweenType type; - public Vector3 from; - public Vector3 to; - public AnimationCurve curve = AnimationCurve.Linear(0, 0, 1, 1); - public float duration = 1f; - public bool isLoop; - public bool isPingPong; - private float timer = 0f; - private CanvasGroup canvasGroup; - - void Awake() - { - canvasGroup = gameObject.GetComponent(); - } - - void Update() - { - if (duration > 0) - { - timer += Time.deltaTime; - float curveValue; - if (isLoop) - { - float remainTime = timer % duration; - int loopCount = (int)(timer / duration); - float evaluateTime = remainTime / duration; - if (isPingPong) - { - evaluateTime = loopCount % 2 == 0 ? evaluateTime : 1 - evaluateTime; - } - curveValue = curve.Evaluate(evaluateTime); - } - else - { - curveValue = curve.Evaluate(timer); - } - var lerpValue = Vector3.Lerp(from, to, curveValue); - //if (lerpValue == lastValue) - //{ - // return; - //} - //lastValue = lerpValue; - switch (type) - { - case TweenType.Position: - if (isLocal) - { - transform.localPosition = lerpValue; - } - else - { - transform.position = lerpValue; - } - break; - case TweenType.Rotation: - if (isLocal) - { - transform.localEulerAngles = lerpValue; - } - else - { - transform.eulerAngles = lerpValue; - } - break; - case TweenType.Scale: - if (isLocal) - { - transform.localScale = lerpValue; - } - else - { - var value1 = VectorWiseDivision(transform.lossyScale, transform.localScale); - var value2 = VectorWiseDivision(lerpValue, value1); - transform.localScale = value2; - } - break; - case TweenType.Alpha: - if (canvasGroup != null) - { - canvasGroup.alpha = lerpValue.x; - } - else - { - TLogger.LogError("Change Alpha need Component: [CanvasGroup]"); - } - break; - } - } - } - - Vector3 VectorWiseDivision(Vector3 a, Vector3 b) - { - return new Vector3(a.x / b.x, a.y / b.y, a.z / b.z); - } - } -} \ No newline at end of file diff --git a/Assets/TEngine/Runtime/UI/Extend/TweenUtil.cs.meta b/Assets/TEngine/Runtime/UI/Extend/TweenUtil.cs.meta deleted file mode 100644 index aa171f11..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/TweenUtil.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b6456e1c76cbcd24697652f8c4b3ffd5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend/UIBackgroundImageStretch.cs b/Assets/TEngine/Runtime/UI/Extend/UIBackgroundImageStretch.cs deleted file mode 100644 index b161e06c..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/UIBackgroundImageStretch.cs +++ /dev/null @@ -1,18 +0,0 @@ -using UnityEngine; - -namespace TEngine -{ - /// - /// 背景图片等比拉伸 - /// - public class UIBackgroundImageStretch : MonoBehaviour - { - public bool NoClip; - - private void Start() - { - var imageRect = GetComponent(); - UIStretchUtil.Instance.DoStretch(imageRect, NoClip); - } - } -} diff --git a/Assets/TEngine/Runtime/UI/Extend/UIBackgroundImageStretch.cs.meta b/Assets/TEngine/Runtime/UI/Extend/UIBackgroundImageStretch.cs.meta deleted file mode 100644 index 08050a76..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/UIBackgroundImageStretch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ebb7766916c025e458ae78907718751e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TEngine/Runtime/UI/Extend/UIEventItem.cs b/Assets/TEngine/Runtime/UI/Extend/UIEventItem.cs deleted file mode 100644 index 78709a6d..00000000 --- a/Assets/TEngine/Runtime/UI/Extend/UIEventItem.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using TEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace UI -{ - public class UIEventItem : UIWindowWidget where T : UIEventItem - { - protected Button m_buttonClick; - private object[] m_eventParam; - public object EventParam1 - { - get - { - return m_eventParam != null && m_eventParam.Length > 0 ? m_eventParam[0] : null; - } - } - - public object EventParam2 - { - get - { - return m_eventParam != null && m_eventParam.Length > 1 ? m_eventParam[1] : null; - } - } - - public object EventParam3 - { - get { return m_eventParam != null && m_eventParam.Length > 2 ? m_eventParam[2] : null; } - } - - public object this[int index] - { - get { return m_eventParam != null && index < m_eventParam.Length ? m_eventParam[index] : null; } - } - - private Action m_clickAction; - private Action m_pressAction; - private Action m_beginDragAction; - private Action m_dragAction; - private Action m_endDragAction; - - public void BindClickEvent(Action clickAction, params object[] arg) - { - if (m_clickAction != null) - { - m_clickAction = clickAction; - } - else - { - m_clickAction = clickAction; - m_buttonClick = UnityUtil.AddMonoBehaviour