This commit is contained in:
2025-04-29 19:31:24 +08:00
parent ae24d91515
commit 1807699ca5
38 changed files with 17712 additions and 484 deletions
@@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: 09546aca93a801441859af2a811fe53b
m_currentHash:
serializedVersion: 2
Hash: c6c253b0d45ab932619b53118a46f44e
Hash: 73852bd68af7d997a5cdd2bc66154ca0
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_BundleLocalCatalog: 0
@@ -48,10 +48,9 @@ MonoBehaviour:
- {fileID: 11400000, guid: b9026802c7966cf4799a8df997d603e3, type: 2}
- {fileID: 11400000, guid: d582f9080605ab34cbcde3249c980030, type: 2}
- {fileID: 11400000, guid: 54799118a585dda439cab043d56ec68c, type: 2}
- {fileID: 11400000, guid: 7ef6dfbb568739341818a3c18623ef6a, type: 2}
- {fileID: 11400000, guid: b593dc98ea11a484995123de77d9bf1a, type: 2}
- {fileID: 11400000, guid: 62a92c74b9bd5bd439690727c1831500, type: 2}
- {fileID: 11400000, guid: 999dab2963249f7468bdacbd80c1b764, type: 2}
- {fileID: 11400000, guid: 2534b5778664d10419ffabfb1f40ef7d, type: 2}
m_BuildSettings:
m_CompileScriptsInVirtualMode: 0
m_CleanupStreamingAssetsAfterBuilds: 1
@@ -1,25 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Localization-String-Tables-Chinese (Simplified) (zh-CN)
m_EditorClassIdentifier:
m_GroupName: Localization-String-Tables-Chinese (Simplified) (zh-CN)
m_Data:
m_SerializedData: []
m_GUID: 1286725e540dd7f498d254a37fce2a41
m_SerializeEntries: []
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: e6fa94631f87f64439fc98bbce5af43e, type: 2}
- {fileID: 11400000, guid: 462b87e9eedc0ed47a704ccb15bc9561, type: 2}
@@ -1,25 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Localization-String-Tables-Chinese (Simplified)
m_EditorClassIdentifier:
m_GroupName: Localization-String-Tables-Chinese (Simplified)
m_Data:
m_SerializedData: []
m_GUID: bdbc72e78cb33e843a2297674bf0b5a0
m_SerializeEntries: []
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: e4c5064f0e9c5ff4184a3545a21a498e, type: 2}
- {fileID: 11400000, guid: 1cf23ea6537d81a4991a494f80aaea01, type: 2}
@@ -10,22 +10,21 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Materials
m_Name: Prefabs
m_EditorClassIdentifier:
m_GroupName: Materials
m_GroupName: Prefabs
m_Data:
m_SerializedData: []
m_GUID: 61998f079a4793a4f9c56cdcc10d47dd
m_GUID: 23852c46474a08d41941621c301886a3
m_SerializeEntries:
- m_GUID: 3235960cb099ec949b5b899a120e1b58
m_Address: DotLine
- m_GUID: ed63c928b4f8ed14f9f8aa674886e952
m_Address: CutLine
m_ReadOnly: 0
m_SerializedLabels:
- default
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: 8dcbcb75139c50a409bd7e72b9dc0fb2, type: 2}
- {fileID: 11400000, guid: e1683146c41aba0479be8d0a07fe61ad, type: 2}
- {fileID: 11400000, guid: 2bcd0e1e759f58642bfebbbfb2675973, type: 2}
- {fileID: 11400000, guid: 72228f7d1b854a642aca5fbc9bc7488c, type: 2}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 158c1667780dd1f40bb79b05662be53c
guid: 2534b5778664d10419ffabfb1f40ef7d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
@@ -1,45 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Localization-String-Tables-Chinese (Simplified) (zh-CN)_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 7ef6dfbb568739341818a3c18623ef6a, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 2ae6a7549097a9b4caefe44b61b1fcc5
m_LoadPath:
m_Id: 631ec5c677ab8084fb9be9b9ee39c6ef
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_BundleNaming: 1
m_AssetLoadMode: 0
@@ -1,16 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Localization-String-Tables-Chinese (Simplified) (zh-CN)_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 7ef6dfbb568739341818a3c18623ef6a, type: 2}
m_StaticContent: 0
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 462b87e9eedc0ed47a704ccb15bc9561
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,45 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Localization-String-Tables-Chinese (Simplified)_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 999dab2963249f7468bdacbd80c1b764, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 2ae6a7549097a9b4caefe44b61b1fcc5
m_LoadPath:
m_Id: 631ec5c677ab8084fb9be9b9ee39c6ef
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_BundleNaming: 1
m_AssetLoadMode: 0
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e4c5064f0e9c5ff4184a3545a21a498e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,16 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Localization-String-Tables-Chinese (Simplified)_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 999dab2963249f7468bdacbd80c1b764, type: 2}
m_StaticContent: 0
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 1cf23ea6537d81a4991a494f80aaea01
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8dcbcb75139c50a409bd7e72b9dc0fb2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e1683146c41aba0479be8d0a07fe61ad
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -10,9 +10,9 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Materials_BundledAssetGroupSchema
m_Name: Prefabs_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 158c1667780dd1f40bb79b05662be53c, type: 2}
m_Group: {fileID: 11400000, guid: 2534b5778664d10419ffabfb1f40ef7d, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7ef6dfbb568739341818a3c18623ef6a
guid: 2bcd0e1e759f58642bfebbbfb2675973
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
@@ -10,7 +10,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Materials_ContentUpdateGroupSchema
m_Name: Prefabs_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 158c1667780dd1f40bb79b05662be53c, type: 2}
m_Group: {fileID: 11400000, guid: 2534b5778664d10419ffabfb1f40ef7d, type: 2}
m_StaticContent: 0
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e6fa94631f87f64439fc98bbce5af43e
guid: 72228f7d1b854a642aca5fbc9bc7488c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
@@ -0,0 +1,153 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5940362540916563197
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 829612481035973972}
- component: {fileID: 2306539385056223248}
- component: {fileID: 5800310329352418143}
m_Layer: 0
m_Name: CutLine
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &829612481035973972
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5940362540916563197}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.1454616, y: -1.0817454, z: -0.80590516}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!120 &2306539385056223248
LineRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5940362540916563197}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 3235960cb099ec949b5b899a120e1b58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1134468525
m_SortingLayer: 10
m_SortingOrder: 6
m_Positions:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 1}
m_Parameters:
serializedVersion: 3
widthMultiplier: 0.5
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 1
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 1
m_Loop: 1
m_ApplyActiveColorSpace: 1
--- !u!114 &5800310329352418143
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5940362540916563197}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5842a5c9314449c8a972472b796da927, type: 3}
m_Name:
m_EditorClassIdentifier:
lineRenderer: {fileID: 0}
clickRadius: 0.5
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 999dab2963249f7468bdacbd80c1b764
NativeFormatImporter:
guid: ed63c928b4f8ed14f9f8aa674886e952
PrefabImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+153
View File
@@ -0,0 +1,153 @@
fileFormatVersion: 2
guid: d01c0cb5c0aef2748882aee25f266429
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
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
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 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
ignorePlatformSupport: 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
ignorePlatformSupport: 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
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
+2 -34
View File
@@ -1,38 +1,6 @@
title: Start
tags:
---
<<load_scene ExpressFixScene>>
peipei: 正常对话
me: 正常对话1
<<fade_in>>
CenterText: 中央对话1
CenterText: 中央对话2
<<fade_out>>
me: 正常对话2
-> CenterOption: 中心选项1
me: 正常对话3
-> CenterOption: 中心选项2
me: 正常对话4
<<switch_fix_system_to BodyModule>>
===
title: LungPlugIn
tags:
---
<<open_screen>>
LungModule: 肺部模块已连接
LungModule: 等待下一步指令
LungModule: 等待下一步指令
LungModule: 等待下一步指令
普通对话
->分析
<<hide_dialog>>
<<clear_screen>>
Analysing: A部分正常
Analysing: B部分异常
Analysing: C部分分析中
<<close_screen>>
->返回
<<close_screen>>
<<switch_fix_system_to "BodyModule" "Head">>
移除测试
===
+4 -4
View File
@@ -2970,7 +2970,7 @@ RectTransform:
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_AnchoredPosition: {x: 200, y: 0}
m_SizeDelta: {x: 0, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &190932926
@@ -4047,7 +4047,7 @@ RectTransform:
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_AnchoredPosition: {x: 200, y: 0}
m_SizeDelta: {x: 0, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &237392156
@@ -21082,7 +21082,7 @@ RectTransform:
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_AnchoredPosition: {x: 200, y: 0}
m_SizeDelta: {x: 0, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1611684201
@@ -24568,7 +24568,7 @@ RectTransform:
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_AnchoredPosition: {x: 200, y: 0}
m_SizeDelta: {x: 0, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1960600463
+14 -180
View File
@@ -4881,6 +4881,7 @@ MonoBehaviour:
socketPos: {fileID: 1099217312}
data:
moduleName: Lung
clickRadius: 0.5
--- !u!1 &604681209
GameObject:
m_ObjectHideFlags: 0
@@ -5333,6 +5334,7 @@ MonoBehaviour:
socketPos: {fileID: 0}
data:
moduleName: Memory
clickRadius: 0.5
--- !u!1 &706512415
GameObject:
m_ObjectHideFlags: 0
@@ -6190,6 +6192,7 @@ MonoBehaviour:
socketPos: {fileID: 770761741}
data:
moduleName: Heart
clickRadius: 0.5
--- !u!1 &836879223
GameObject:
m_ObjectHideFlags: 0
@@ -7323,37 +7326,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &959172186
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 959172187}
m_Layer: 0
m_Name: Resource Refs
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &959172187
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 959172186}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9210352354887959609}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &983979845
GameObject:
m_ObjectHideFlags: 3
@@ -7510,6 +7482,7 @@ MonoBehaviour:
socketPos: {fileID: 1313913286}
data:
moduleName: Liver
clickRadius: 0.5
--- !u!1 &1003515190
GameObject:
m_ObjectHideFlags: 0
@@ -9513,6 +9486,7 @@ MonoBehaviour:
socketPos: {fileID: 0}
data:
moduleName: Speak
clickRadius: 0.5
--- !u!1 &1313913285
GameObject:
m_ObjectHideFlags: 0
@@ -9805,6 +9779,7 @@ MonoBehaviour:
socketPos: {fileID: 1632657861}
data:
moduleName: Stomach
clickRadius: 0.5
--- !u!1 &1327587426
GameObject:
m_ObjectHideFlags: 0
@@ -10117,6 +10092,7 @@ MonoBehaviour:
socketPos: {fileID: 0}
data:
moduleName: Eye
clickRadius: 0.5
--- !u!1 &1425842437
GameObject:
m_ObjectHideFlags: 0
@@ -10250,6 +10226,7 @@ MonoBehaviour:
socketPos: {fileID: 0}
data:
moduleName: Emo
clickRadius: 0.5
--- !u!1 &1474095200
GameObject:
m_ObjectHideFlags: 0
@@ -12228,6 +12205,7 @@ MonoBehaviour:
socketPos: {fileID: 0}
data:
moduleName: Logic
clickRadius: 0.5
--- !u!1 &1688364244
GameObject:
m_ObjectHideFlags: 0
@@ -12732,145 +12710,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1726429791}
m_CullTransparentMesh: 1
--- !u!1 &1746691364
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1746691366}
- component: {fileID: 1746691365}
m_Layer: 0
m_Name: Line
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!120 &1746691365
LineRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746691364}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 3235960cb099ec949b5b899a120e1b58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: 1, y: 0, z: 1}
- {x: 3, y: 2, z: 1}
- {x: 5, y: 3, z: 1}
- {x: 6, y: 1, z: 1}
- {x: 20, y: 1, z: 1}
m_Parameters:
serializedVersion: 3
widthMultiplier: 0.05
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 1
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 0
m_Loop: 0
m_ApplyActiveColorSpace: 0
--- !u!4 &1746691366
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746691364}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -32.666416, y: -8.49, z: -5.365305}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1765327822
GameObject:
m_ObjectHideFlags: 0
@@ -16825,6 +16664,10 @@ PrefabInstance:
propertyPath: m_Name
value: Editor Mode Func
objectReference: {fileID: 0}
- target: {fileID: 4214753503693131867, guid: 13f00ab6092291d49a9312e52873d80b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7611243318142021168, guid: 13f00ab6092291d49a9312e52873d80b, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@@ -16867,17 +16710,9 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 7611243318142021168, guid: 13f00ab6092291d49a9312e52873d80b, type: 3}
insertIndex: -1
addedObject: {fileID: 959172187}
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 13f00ab6092291d49a9312e52873d80b, type: 3}
--- !u!4 &9210352354887959609 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7611243318142021168, guid: 13f00ab6092291d49a9312e52873d80b, type: 3}
m_PrefabInstance: {fileID: 9210352354887959608}
m_PrefabAsset: {fileID: 0}
--- !u!212 &9219547770658025207
SpriteRenderer:
m_ObjectHideFlags: 0
@@ -16942,4 +16777,3 @@ SceneRoots:
- {fileID: 462594834}
- {fileID: 1211738976}
- {fileID: 1195838874}
- {fileID: 1746691366}
File diff suppressed because it is too large Load Diff
+12
View File
@@ -0,0 +1,12 @@
fileFormatVersion: 2
<<<<<<<< HEAD:Assets/Scenes/ExpressFixScene.unity.meta
guid: 0df376d007485054496c311356978311
========
guid: 2c99bb256d7eae145a3c3e601cd2680b
folderAsset: yes
>>>>>>>> feature/地铁功能:Assets/Resources/Yarn/SubWay.meta
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -4,7 +4,6 @@ using AibisDream.Framework;
using AibisDream.Utility;
using Newtonsoft.Json;
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace AibisDream.FixSystem
{
@@ -23,14 +22,15 @@ namespace AibisDream.FixSystem
private SpriteRenderer _targetSpriteRenderer; // 目标的 SpriteRenderer
private LineRenderer _dotLine;
private LineRenderer _cutLine;
private CutLine _cutLine;
#endregion
// 模块基本数据
[SerializeField] public BodyModuleData data;
public float clickRadius = 0.5f;
private bool _available = true;
private bool _cutting;
private void Awake()
{
@@ -49,6 +49,14 @@ namespace AibisDream.FixSystem
_alarmMaterial = Resources.Load<Material>("Materials/AlarmMaterial");
}
private void Update()
{
if (_cutting && Input.GetMouseButtonDown(0))
{
OnCut();
}
}
#region
public bool IsAvailable()
@@ -104,35 +112,37 @@ namespace AibisDream.FixSystem
public void EnableCut()
{
// 显示虚线
var dotLine = GetOrCreateDotLine();
// 指针转为锯片
// 打开或获取CutLine
ShowCutLine();
_cutting = true;
}
private void OnCut()
{
//
Vector2 mousePos = CommonUtil.GetMouseWorldPos(Input.mousePosition);
_cutLine.DetectLineClick(mousePos, clickRadius);
}
private LineRenderer GetOrCreateDotLine()
private void ShowCutLine()
{
if (_dotLine != null)
// 切割线不存在,就新建一个
if (_cutLine == null)
{
return _dotLine;
var prefab = ResourceKit.LoadAssetSync<GameObject>(ConstRef.CutLinePrefabName);
var cutLineObj = Instantiate(prefab, transform);
_cutLine = cutLineObj.GetComponent<CutLine>();
}
var dotLine = new GameObject("Dot Line").AddComponent<LineRenderer>();
// 设置Line的参数
dotLine.sortingLayerName = ConstRef.FixMiddleLayer;
dotLine.sortingOrder = 4;
dotLine.materials = new[] { ResourceKit.LoadAssetSync<Material>(ConstRef.DotLineMaterialName) };
dotLine.textureMode = LineTextureMode.Tile;
dotLine.loop = true;
// 对切割线进行初始化
var shapePoints = new List<Vector2>();
_targetSpriteRenderer.sprite.GetPhysicsShape(0, shapePoints);
if (shapePoints.Count <= 0)
{
Debug.LogWarning($"{name} has no shape");
return;
}
// 设置line的周长
_targetSpriteRenderer.sprite.GetPhysicsShape(0, new List<Vector2>());
return dotLine;
_cutLine.Init(shapePoints, clickRadius);
}
#endregion
@@ -0,0 +1,206 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace AibisDream
{
public class CutLine : MonoBehaviour
{
private LineRenderer _lineRenderer;
private Vector2[] _linePoints;
private float[] _normalizedLinePoints;
private Bounds _bounds;
private List<Vector2> _recordedRanges = new();
#region
public void Init(List<Vector2> shapePoints, float clickRadius)
{
_lineRenderer = GetComponent<LineRenderer>();
// 按照新点位重绘线条
RedrawLine(shapePoints);
// 生成归一化点
NormalizePoints(shapePoints);
// 生成基本的包围盒
GeneBoundingBox(clickRadius);
ClearRecordedRanges();
}
private void RedrawLine(List<Vector2> shapePoints)
{
var linePoints = shapePoints.Select(item => new Vector3(item.x, item.y, 0)).ToArray();
_lineRenderer.SetPositions(linePoints);
}
private void NormalizePoints(List<Vector2> shapePoints)
{
// 先生成首尾相连的点,默认Loop
shapePoints.Add(shapePoints[0]);
_linePoints = shapePoints.ToArray();
float totalLength = 0f;
var segmentLengths = new List<float>();
// 计算总长度和各段长度
for (var i = 1; i < _linePoints.Length; i++)
{
var segmentLength = Vector2.Distance(_linePoints[i - 1], _linePoints[i]);
segmentLengths.Add(segmentLength);
totalLength += segmentLength;
}
// 计算每个点的归一化位置
var normalizedLinePoints = new float[segmentLengths.Count + 1];
normalizedLinePoints[0] = 0f;
var accumulatedLength = 0f;
for (var i = 0; i < segmentLengths.Count; i++)
{
accumulatedLength += segmentLengths[i];
normalizedLinePoints[i + 1] = accumulatedLength / totalLength;
}
}
private void GeneBoundingBox(float clickRadius)
{
_bounds = new Bounds();
foreach (var point in _linePoints)
{
_bounds.Encapsulate(point);
}
_bounds.Expand(clickRadius * 2);
}
#endregion
#region
public void DetectLineClick(Vector2 clickPosition, float clickRadius)
{
// 先进行包围盒检测,不在包围盒直接返回
if (!_bounds.Contains(clickPosition))
{
return;
}
List<Vector2> newRanges = new List<Vector2>();
// 检查每条线段
for (int i = 1; i < _linePoints.Length; i++)
{
Vector2 start = _linePoints[i - 1];
Vector2 end = _linePoints[i];
// 计算点到线段的距离
float distance = DistanceToSegment(clickPosition, start, end);
if (distance <= clickRadius)
{
// 计算点击影响的范围
float normalizedStart = _normalizedLinePoints[i - 1];
float normalizedEnd = _normalizedLinePoints[i];
// 计算实际影响的范围(考虑点击半径)
float segmentLength = Vector2.Distance(start, end);
float radiusRatio = clickRadius / segmentLength;
float rangeStart = Mathf.Clamp01(normalizedStart - radiusRatio);
float rangeEnd = Mathf.Clamp01(normalizedEnd + radiusRatio);
newRanges.Add(new Vector2(rangeStart, rangeEnd));
}
}
// 合并新检测到的区间
foreach (Vector2 range in newRanges)
{
_recordedRanges.Add(range);
}
// 合并所有重叠区间
MergeRanges();
// 打印当前所有区间(调试用)
Debug.Log("Current recorded ranges:");
foreach (Vector2 range in _recordedRanges)
{
Debug.Log($"Range: {range.x} - {range.y}");
}
}
private float DistanceToSegment(Vector2 point, Vector2 segmentStart, Vector2 segmentEnd)
{
Vector2 segment = segmentEnd - segmentStart;
Vector2 pointToStart = point - segmentStart;
float dotProduct = Vector2.Dot(pointToStart, segment);
// 检查点是否在线段的投影范围内
if (dotProduct <= 0)
{
return Vector2.Distance(point, segmentStart);
}
float segmentLengthSquared = segment.sqrMagnitude;
if (dotProduct >= segmentLengthSquared)
{
return Vector2.Distance(point, segmentEnd);
}
// 计算垂直距离
return Mathf.Abs(segmentStart.y * segmentEnd.x - segmentStart.x * segmentEnd.y +
point.x * (segmentStart.y - segmentEnd.y) +
point.y * (segmentEnd.x - segmentStart.x)) /
Mathf.Sqrt(segmentLengthSquared);
}
private void MergeRanges()
{
if (_recordedRanges.Count <= 1) return;
// 先按起始位置排序
_recordedRanges.Sort((a, b) => a.x.CompareTo(b.x));
List<Vector2> mergedRanges = new List<Vector2>();
Vector2 currentRange = _recordedRanges[0];
for (int i = 1; i < _recordedRanges.Count; i++)
{
Vector2 nextRange = _recordedRanges[i];
// 检查是否有重叠或相邻
if (nextRange.x <= currentRange.y)
{
// 合并区间
currentRange.y = Mathf.Max(currentRange.y, nextRange.y);
}
else
{
mergedRanges.Add(currentRange);
currentRange = nextRange;
}
}
mergedRanges.Add(currentRange);
_recordedRanges = mergedRanges;
}
#endregion
// 获取当前所有记录的范围(0-1之间的值)
public List<Vector2> GetRecordedRanges()
{
return new List<Vector2>(_recordedRanges);
}
// 清除所有记录的范围
public void ClearRecordedRanges()
{
_recordedRanges.Clear();
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5842a5c9314449c8a972472b796da927
timeCreated: 1745912339
@@ -1,4 +1,5 @@
using UnityEngine;
using AibisDream.Utility;
using UnityEngine;
using UnityEngine.Localization;
using UnityEngine.Localization.Settings;
using UnityEngine.Localization.Tables;
@@ -9,7 +10,8 @@ namespace AibisDream.Framework
{
private static LocalizationTable _actorTableName;
public static LocalizationTable ActorTableName => _actorTableName ??= new LocalizationTable("ActorName");
public static LocalizationTable ActorTableName =>
_actorTableName ??= new LocalizationTable(ConstRef.ActorNameTable);
public static void SwitchLanguage(string localeCode)
{
@@ -47,7 +47,18 @@ namespace AibisDream.Framework
{
public void OnUpdate()
{
if (Input.GetKeyDown(KeyCode.K))
{
MonoCenter.Mono.StartCoroutine(FixSystemCenter.StateMachine.SwitchState(FixState.BodyModule, "Head"));
}
if (Input.GetKeyDown(KeyCode.Q))
{
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
var module = bodyModuleSystem.FindBodyModuleByName("Memory");
module.EnableCut();
}
}
}
+13
View File
@@ -116,6 +116,19 @@ namespace AibisDream.Utility
return _mainCam.ScreenToWorldPoint(mousePoint);
}
/// <summary>
/// 获取鼠标在世界中的位置
/// </summary>
/// <param name="mousePoint">鼠标界面位置</param>
/// <returns>世界位置</returns>
public static Vector3 GetMouseWorldPos(Vector3 mousePoint)
{
if (!_mainCam) _mainCam = Camera.main;
mousePoint.z = 0;
return _mainCam.ScreenToWorldPoint(mousePoint);
}
/// <summary>
/// 属性复制
/// </summary>
+8 -4
View File
@@ -14,14 +14,18 @@ namespace AibisDream.Utility
public static readonly string TestSaveFilePath = Application.streamingAssetsPath + "/TestSaveFiles";
public const string FixMiddleLayer = "FixMiddle";
public const string DotLineMaterialName = "DotLine";
#region
public const string UITextTable = "UIText";
public const string ActorNameTable = "ActorName";
#endregion
#region
public const string CutLinePrefabName = "CutLine";
#endregion
}
}
@@ -7,8 +7,8 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DotLine
m_Shader: {fileID: 10101, guid: 0000000000000000e000000000000000, type: 0}
m_Name: CutLineMaterial
m_Shader: {fileID: 4800000, guid: 131cdecbc3d0ba246ade9a5536a9ef8d, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
@@ -39,21 +39,33 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SecondaryTex:
m_Texture: {fileID: 2800000, guid: d01c0cb5c0aef2748882aee25f266429, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _texcoord:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BlurSize: 1
- _Cutoff: 0.5
- _EnableExternalAlpha: 0
- _InvFade: 0.01
- _LengthScale: 2.6
- _Number: 41.2
- _RangeCount: 1
- _Speed: 55
- _SwitchEnd: 0.716
- _SwitchStart: 0.419
- _TextureScale: 1
- _TotalLength: 2.6
- __dirty: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _Ranges: {r: 0.05, g: 0.2, b: 0.43, a: 0.63}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _TintColor: {r: 1, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
+103
View File
@@ -0,0 +1,103 @@
Shader "Custom/CutLine"
{
Properties
{
_MainTex ("Primary Texture", 2D) = "white" {}
_SecondaryTex ("Secondary Texture", 2D) = "white" {}
_TextureScale ("Texture Scale", Float) = 1.0
_Color ("Tint Color", Color) = (1,1,1,1)
_TotalLength ("Total Length", Float) = 1.0
_Ranges ("Ranges", Vector) = (0,0,0,0) // 用于传递范围数据
_RangeCount("Range Count", Int) = 0
}
SubShader
{
Tags
{
"RenderType"="Transparent"
"Queue"="Transparent"
"IgnoreProjector"="True"
"PreviewType"="Plane"
}
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
Cull Off
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#include "UnityCG.cginc"
// 定义最大支持的范围对数
#define MAX_RANGE_PAIRS 4 // 最多4对范围(8个值)
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 uv : TEXCOORD0;
float positionRatio : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
sampler2D _SecondaryTex;
float _TextureScale;
float _TotalLength;
fixed4 _Color;
// 使用数组存储范围数据
float4 _Ranges[MAX_RANGE_PAIRS]; // 每个float4存储2对范围(start1,end1,start2,end2)
int _RangeCount; // 实际范围对数
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.positionRatio = v.uv.x * _TextureScale / _TotalLength;
o.uv = float2(v.uv.x * _TextureScale, v.uv.y);
return o;
}
bool is_in_ranges(const float pos)
{
const float normalized_pos = frac(pos);
bool result = false;
// 遍历所有范围对
[loop]
for (int i = 0; i < _RangeCount; i++)
{
// 使用step函数代替分支
float4 range = _Ranges[i];
const float in_range1 = step(range.x, normalized_pos) * step(normalized_pos, range.y);
const float in_range2 = step(range.z, normalized_pos) * step(normalized_pos, range.w);
result = result || in_range2 + in_range1 > 0;
}
return result;
}
fixed4 frag(v2f i) : SV_Target
{
const bool in_range = is_in_ranges(i.positionRatio);
const fixed4 col = in_range ? tex2D(_SecondaryTex, i.uv) : tex2D(_MainTex, i.uv);
return col * _Color;
}
ENDCG
}
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 131cdecbc3d0ba246ade9a5536a9ef8d
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _SecondaryTex: {instanceID: 0}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: