1
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52d66146caaa4114ba0f4258e240277d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6884082665aabe549ae4c6d9a142298d
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51b888818cbd7184b81f6f9643135c0e
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da055a807e845d14bb514ded002fc676
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51132773839ee5b45b08ac9ad19a8b38
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 606cac99b2a6e27418aa01e7eaae56a0
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8495279a91ea6114eba1ca274b91af74
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 303410e7f835f984595c60510bf4b9a2
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90a94cbc0cd73e446807e4ef2d405b1d
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,127 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a056d76ac19f13841ad836bae9f6c3c2
|
||||
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: 0
|
||||
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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,96 +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: Loading_ani
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
- time: 0
|
||||
value: {fileID: 21300000, guid: 6884082665aabe549ae4c6d9a142298d, type: 3}
|
||||
- time: 0.083333336
|
||||
value: {fileID: 21300000, guid: 51b888818cbd7184b81f6f9643135c0e, type: 3}
|
||||
- time: 0.16666667
|
||||
value: {fileID: 21300000, guid: da055a807e845d14bb514ded002fc676, type: 3}
|
||||
- time: 0.25
|
||||
value: {fileID: 21300000, guid: 51132773839ee5b45b08ac9ad19a8b38, type: 3}
|
||||
- time: 0.33333334
|
||||
value: {fileID: 21300000, guid: 606cac99b2a6e27418aa01e7eaae56a0, type: 3}
|
||||
- time: 0.41666666
|
||||
value: {fileID: 21300000, guid: 8495279a91ea6114eba1ca274b91af74, type: 3}
|
||||
- time: 0.5
|
||||
value: {fileID: 21300000, guid: 303410e7f835f984595c60510bf4b9a2, type: 3}
|
||||
- time: 0.5833333
|
||||
value: {fileID: 21300000, guid: 90a94cbc0cd73e446807e4ef2d405b1d, type: 3}
|
||||
- time: 0.6666667
|
||||
value: {fileID: 21300000, guid: a056d76ac19f13841ad836bae9f6c3c2, type: 3}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 114
|
||||
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
flags: 2
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 2015549526
|
||||
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
typeID: 114
|
||||
customType: 0
|
||||
isPPtrCurve: 1
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping:
|
||||
- {fileID: 21300000, guid: 6884082665aabe549ae4c6d9a142298d, type: 3}
|
||||
- {fileID: 21300000, guid: 51b888818cbd7184b81f6f9643135c0e, type: 3}
|
||||
- {fileID: 21300000, guid: da055a807e845d14bb514ded002fc676, type: 3}
|
||||
- {fileID: 21300000, guid: 51132773839ee5b45b08ac9ad19a8b38, type: 3}
|
||||
- {fileID: 21300000, guid: 606cac99b2a6e27418aa01e7eaae56a0, type: 3}
|
||||
- {fileID: 21300000, guid: 8495279a91ea6114eba1ca274b91af74, type: 3}
|
||||
- {fileID: 21300000, guid: 303410e7f835f984595c60510bf4b9a2, type: 3}
|
||||
- {fileID: 21300000, guid: 90a94cbc0cd73e446807e4ef2d405b1d, type: 3}
|
||||
- {fileID: 21300000, guid: a056d76ac19f13841ad836bae9f6c3c2, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.75
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
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: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8488f417302cba24fa328f9796d39402
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,72 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: anim
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 4470429071992645539}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &4177064496324344577
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Loading_ani
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 8488f417302cba24fa328f9796d39402, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &4470429071992645539
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 4177064496324344577}
|
||||
m_Position: {x: 200, y: 0, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 4177064496324344577}
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b32973ea88fca53489cd40f95b13c25f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -104,7 +104,7 @@ NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
@@ -117,12 +117,58 @@ NavMeshSettings:
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &109438803
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 109438805}
|
||||
- component: {fileID: 109438804}
|
||||
m_Layer: 0
|
||||
m_Name: LoadDll
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &109438804
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 109438803}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 467bc10b56c272043a89b12cbf23b3ef, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
domain: Test
|
||||
loadDomain: null
|
||||
--- !u!4 &109438805
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 109438803}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -10000, z: 0}
|
||||
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 &212485936
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -154,7 +200,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1072993626}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -209,6 +254,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 705507995}
|
||||
- component: {fileID: 705507994}
|
||||
- component: {fileID: 705507996}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
@@ -285,14 +331,37 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!114 &705507996
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 3
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_LightLayerMask: 1
|
||||
m_RenderingLayers: 1
|
||||
m_CustomShadowLayers: 0
|
||||
m_ShadowLayerMask: 1
|
||||
m_ShadowRenderingLayers: 1
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
m_SoftShadowQuality: 0
|
||||
--- !u!1 &712712064
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -323,6 +392,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
@@ -352,13 +422,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 712712064}
|
||||
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: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &963194225
|
||||
GameObject:
|
||||
@@ -400,9 +470,17 @@ Camera:
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@@ -436,13 +514,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1072993622
|
||||
GameObject:
|
||||
@@ -520,7 +598,9 @@ Canvas:
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
@@ -538,7 +618,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 212485937}
|
||||
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}
|
||||
@@ -562,7 +641,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!114 &1382820516
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -583,13 +662,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1382820515}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1.3929863, y: 2.0667238, z: -2.8396873}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1382820518
|
||||
MonoBehaviour:
|
||||
@@ -606,3 +685,13 @@ MonoBehaviour:
|
||||
width: 1080
|
||||
height: 1920
|
||||
uiBlackType: 3
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 963194228}
|
||||
- {fileID: 705507995}
|
||||
- {fileID: 712712067}
|
||||
- {fileID: 1072993626}
|
||||
- {fileID: 1382820517}
|
||||
- {fileID: 109438805}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
using SkierFramework;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
public class Launcher : MonoBehaviour
|
||||
{
|
||||
public GameObject Splash;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (Splash == null)
|
||||
{
|
||||
Splash = GameObject.Find(nameof(Splash));
|
||||
}
|
||||
|
||||
StartCor();
|
||||
}
|
||||
|
||||
private async void StartCor()
|
||||
{
|
||||
var resourceCore = ResourceManager.Instance.GetResourceCore(UIConfig.UIPackageName);
|
||||
|
||||
await resourceCore.InitializeAsync(UIConfig.UIPackageName);
|
||||
|
||||
await UIManager.Instance.InitUIConfig();
|
||||
|
||||
await UIManager.Instance.Preload<UILoadingView>();
|
||||
|
||||
Loading.Instance.StartLoading(EnterGameCor);
|
||||
|
||||
if (Splash != null)
|
||||
{
|
||||
Splash.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator EnterGameCor(Action<float, string> loadingRefresh)
|
||||
{
|
||||
loadingRefresh?.Invoke(0.3f, "loading..........1");
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
loadingRefresh?.Invoke(0.6f, "loading..........2");
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
loadingRefresh?.Invoke(1, "loading..........3");
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
UIManager.Instance.Open<UILoginView>();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65f866947dd129249bcabba14c4a3ab2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6dfc2278343e60244b14072cb9d82107
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 248dd1fd11fe15a4695d69cb2d9e4950
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,94 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class LoadingData
|
||||
{
|
||||
public LoadingFunc loadingFunc;
|
||||
public bool isCleanupAsset = false;
|
||||
}
|
||||
|
||||
public delegate IEnumerator LoadingFunc(Action<float, string> loadingRefresh);
|
||||
|
||||
/// <summary>
|
||||
/// 实际游戏中的loading
|
||||
/// </summary>
|
||||
public class Loading : SingletonMono<Loading>
|
||||
{
|
||||
private LoadingData _loadingData;
|
||||
private Coroutine _cor;
|
||||
|
||||
public void StartLoading(LoadingFunc loadingFunc, bool isCleanupAsset = false)
|
||||
{
|
||||
StartLoading(new LoadingData { loadingFunc = loadingFunc, isCleanupAsset = isCleanupAsset });
|
||||
}
|
||||
|
||||
private void StartLoading(LoadingData loadingData)
|
||||
{
|
||||
//开启UI
|
||||
UIManager.Instance.Open<UILoadingView>();
|
||||
|
||||
if (loadingData.loadingFunc != null)
|
||||
{
|
||||
_loadingData = loadingData;
|
||||
|
||||
if (_cor != null)
|
||||
{
|
||||
StopCoroutine(_cor);
|
||||
}
|
||||
_cor = StartCoroutine(CorLoading());
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("加载错误,没有参数LoadingData!");
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator CorLoading()
|
||||
{
|
||||
yield return StartCoroutine(_loadingData.loadingFunc(RefreshLoading));
|
||||
|
||||
// if (_loadingData != null && _loadingData.isCleanupAsset)
|
||||
// {
|
||||
// yield return ResourceManager.Instance.GetResourceCore(UIConfig.UIPackageName).CleanupAsync();
|
||||
// yield return Resources.UnloadUnusedAssets();
|
||||
// }
|
||||
|
||||
// Pool.ReleaseAll();
|
||||
// yield return null;
|
||||
|
||||
GC.Collect();
|
||||
yield return null;
|
||||
|
||||
Exit();
|
||||
|
||||
_cor = null;
|
||||
}
|
||||
|
||||
private void RefreshLoading(float loading, string desc)
|
||||
{
|
||||
// 刷新
|
||||
var view = UIManager.Instance.GetView<UILoadingView>();
|
||||
if (view != null)
|
||||
{
|
||||
view.SetLoading(loading, desc);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(desc))
|
||||
{
|
||||
Debug.Log(desc);
|
||||
}
|
||||
}
|
||||
|
||||
private void Exit()
|
||||
{
|
||||
// 关闭UI
|
||||
UIManager.Instance.Close<UILoadingView>();
|
||||
|
||||
ObjectPool<LoadingData>.Release(_loadingData);
|
||||
_loadingData = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 713b44a81c68b61488afc7bb065ca96a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,10 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public enum UIEvent
|
||||
{
|
||||
None,
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8e3dcb8d2c6dd349927abfcb3361078
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,46 +0,0 @@
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class UILoadingView : UIView
|
||||
{
|
||||
#region 控件绑定变量声明,自动生成请勿手改
|
||||
#pragma warning disable 0649
|
||||
[ControlBinding]
|
||||
private TextMeshProUGUI TextDes;
|
||||
[ControlBinding]
|
||||
private Image Aniloading;
|
||||
|
||||
#pragma warning restore 0649
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
public override void OnOpen(object userData)
|
||||
{
|
||||
base.OnOpen(userData);
|
||||
Reset();
|
||||
}
|
||||
|
||||
public void SetLoading(float value, string desc)
|
||||
{
|
||||
TextDes.text = $"{desc} {value * 100:F0}%";
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
Reset();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
|
||||
TextDes.text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9958976e3e375d148b96f791743cc13a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,106 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using System.Collections;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class UITestItem : UILoopItem
|
||||
{
|
||||
#region 控件绑定变量声明,自动生成请勿手改
|
||||
|
||||
#pragma warning disable 0649
|
||||
[ControlBinding] private TextMeshProUGUI Text;
|
||||
[ControlBinding] private Button Button;
|
||||
[ControlBinding] private GameObject Select;
|
||||
|
||||
#pragma warning restore 0649
|
||||
|
||||
#endregion
|
||||
|
||||
public override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
Button.AddClick(() => { UIScrollView.Select(Index); });
|
||||
}
|
||||
|
||||
public override void CheckSelect(int index)
|
||||
{
|
||||
base.CheckSelect(index);
|
||||
Select.SetActive(index == Index);
|
||||
}
|
||||
|
||||
protected override void OnUpdateData(IList dataList, int index, object userData)
|
||||
{
|
||||
base.OnUpdateData(dataList, index, userData);
|
||||
|
||||
Text.text = dataList[index].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public class UILoginView : UIView
|
||||
{
|
||||
#region 控件绑定变量声明,自动生成请勿手改
|
||||
|
||||
#pragma warning disable 0649
|
||||
[ControlBinding] private Button ButtonStart;
|
||||
[ControlBinding] private Button ButtonSetting;
|
||||
[ControlBinding] private UIScrollView UIScrollView;
|
||||
[ControlBinding] private GameObject Item;
|
||||
[ControlBinding] private RawImage RawImage;
|
||||
|
||||
#pragma warning restore 0649
|
||||
|
||||
#endregion
|
||||
|
||||
public override void OnInit(UIControlData uIControlData, UIViewController controller)
|
||||
{
|
||||
base.OnInit(uIControlData, controller);
|
||||
|
||||
ButtonStart.AddClick(() =>
|
||||
{
|
||||
UIManager.Instance.Open<UIMessageBoxView>(ObjectPool<MessageBoxData>.Get()
|
||||
.Set("提示", "测试弹窗。", () => { Debug.Log("确认"); }));
|
||||
});
|
||||
ButtonSetting.AddClick(() => { UIManager.Instance.Open<UITestView>(); });
|
||||
|
||||
UIScrollView.OnSelectChanged += (index) => { Debug.Log("选中了:" + index); };
|
||||
}
|
||||
|
||||
public override void OnOpen(object userData)
|
||||
{
|
||||
base.OnOpen(userData);
|
||||
|
||||
// 模拟100个数据
|
||||
List<int> list = new List<int>();
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
list.Add(i);
|
||||
}
|
||||
|
||||
UIScrollView.UpdateList(list, Item, typeof(UITestItem));
|
||||
UIScrollView.Select(10);
|
||||
|
||||
UIModelManager.Instance.LoadModelToRawImage("Assets/UI/UISystemPackage/TestModel.prefab", RawImage,
|
||||
scale: Vector3.one * 6, isOrth: false, orthSizeOrFOV: 60);
|
||||
}
|
||||
|
||||
public override void OnAddListener()
|
||||
{
|
||||
base.OnAddListener();
|
||||
}
|
||||
|
||||
public override void OnRemoveListener()
|
||||
{
|
||||
base.OnRemoveListener();
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
UIModelManager.Instance.UnLoadModelByRawImage(RawImage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 767534c58c67230489467f81f1bfd94b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,127 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public enum MessageBoxType
|
||||
{
|
||||
TwoButton,
|
||||
OneButton,
|
||||
}
|
||||
|
||||
public class MessageBoxData
|
||||
{
|
||||
const string DefaultConfirmName = "确认";
|
||||
const string DefaultCancelName = "取消";
|
||||
|
||||
public string title;
|
||||
public string content;
|
||||
public Action confirm;
|
||||
public Action cancel;
|
||||
public string confirmName;
|
||||
public string cancelName;
|
||||
public MessageBoxType type;
|
||||
|
||||
public MessageBoxData Set(string title, string content, Action confirm, Action cancel = null
|
||||
, string confirmName = DefaultConfirmName, string cancelName = DefaultCancelName)
|
||||
{
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.confirm = confirm;
|
||||
this.cancel = cancel;
|
||||
this.confirmName = confirmName;
|
||||
this.cancelName = cancelName;
|
||||
this.type = MessageBoxType.TwoButton;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MessageBoxData SetOneButton(string title, string content, Action confirm, Action cancel = null
|
||||
, string confirmName = DefaultConfirmName)
|
||||
{
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.confirm = confirm;
|
||||
this.cancel = cancel;
|
||||
this.confirmName = confirmName;
|
||||
this.cancelName = null;
|
||||
this.type = MessageBoxType.OneButton;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public class UIMessageBoxView : UIView
|
||||
{
|
||||
#region 控件绑定变量声明,自动生成请勿手改
|
||||
#pragma warning disable 0649
|
||||
[ControlBinding]
|
||||
protected Button ButtonConfirm;
|
||||
[ControlBinding]
|
||||
protected TextMeshProUGUI TextTitle;
|
||||
[ControlBinding]
|
||||
protected TextMeshProUGUI TextContent;
|
||||
[ControlBinding]
|
||||
protected Button[] ButtonCloses;
|
||||
[ControlBinding]
|
||||
protected TextMeshProUGUI TextConfirm;
|
||||
[ControlBinding]
|
||||
protected TextMeshProUGUI TextCancel;
|
||||
|
||||
#pragma warning restore 0649
|
||||
#endregion
|
||||
|
||||
MessageBoxData data;
|
||||
|
||||
public override void OnInit(UIControlData uIControlData, UIViewController controller)
|
||||
{
|
||||
base.OnInit(uIControlData, controller);
|
||||
|
||||
foreach (var button in ButtonCloses)
|
||||
{
|
||||
button.AddClick(() =>
|
||||
{
|
||||
data.cancel?.Invoke();
|
||||
UIManager.Instance.Close(this);
|
||||
});
|
||||
}
|
||||
ButtonConfirm.AddClick(() =>
|
||||
{
|
||||
data.confirm?.Invoke();
|
||||
UIManager.Instance.Close(this);
|
||||
});
|
||||
}
|
||||
|
||||
public override void OnOpen(object userData)
|
||||
{
|
||||
base.OnOpen(userData);
|
||||
data = userData as MessageBoxData;
|
||||
|
||||
TextTitle.text = data.title;
|
||||
TextContent.text = data.content;
|
||||
TextConfirm.text = data.confirmName;
|
||||
TextCancel.text = data.cancelName;
|
||||
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(TextContent.rectTransform);
|
||||
|
||||
ButtonCloses[1].gameObject.SetActive(data.type == MessageBoxType.TwoButton);
|
||||
}
|
||||
|
||||
public override void OnAddListener()
|
||||
{
|
||||
base.OnAddListener();
|
||||
}
|
||||
|
||||
public override void OnRemoveListener()
|
||||
{
|
||||
base.OnRemoveListener();
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
ObjectPool<MessageBoxData>.Release(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05f58bedeae24be49a48df8fbdf016f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class UITestView : UIView
|
||||
{
|
||||
#region 控件绑定变量声明,自动生成请勿手改
|
||||
#pragma warning disable 0649
|
||||
[ControlBinding]
|
||||
private Button ButtonClose;
|
||||
|
||||
#pragma warning restore 0649
|
||||
#endregion
|
||||
|
||||
public override void OnInit(UIControlData uIControlData, UIViewController controller)
|
||||
{
|
||||
base.OnInit(uIControlData, controller);
|
||||
|
||||
ButtonClose.AddClick(() =>
|
||||
{
|
||||
UIManager.Instance.Close(this);
|
||||
});
|
||||
}
|
||||
|
||||
public override void OnOpen(object userData)
|
||||
{
|
||||
base.OnOpen(userData);
|
||||
}
|
||||
|
||||
public override void OnAddListener()
|
||||
{
|
||||
base.OnAddListener();
|
||||
}
|
||||
|
||||
public override void OnRemoveListener()
|
||||
{
|
||||
base.OnRemoveListener();
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1da5d512acbd21a458b830596dc3fb29
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c06dd7c57ad1314eae1902d6cdb444f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfe5d63d6291646498e52273c1322822
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,292 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
/* 获取内置图片
|
||||
* AssetDatabase.GetBuiltinExtraResource
|
||||
* "UI/Skin/UISprite.psd"
|
||||
"UI/Skin/Background.psd"
|
||||
"UI/Skin/InputFieldBackground.psd"
|
||||
"UI/Skin/Knob.psd"
|
||||
"UI/Skin/Checkmark.psd"
|
||||
"UI/Skin/DropdownArrow.psd"
|
||||
"UI/Skin/UIMask.psd"
|
||||
*/
|
||||
public class OverrideUICreate
|
||||
{
|
||||
[MenuItem("GameObject/UI/Image", true)]
|
||||
public static void IgnoreImage()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Image.")]
|
||||
public static void CreateImage()
|
||||
{
|
||||
var image = Create<Image>();
|
||||
image.raycastTarget = false;
|
||||
image.maskable = image.GetComponentInParent<RectMask2D>() != null || image.GetComponentInParent<Mask>() != null;
|
||||
image.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Raw Image", true)]
|
||||
public static void IgnoreRawImage()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/RawImage")]
|
||||
public static void CreateRawImage()
|
||||
{
|
||||
var image = Create<RawImage>();
|
||||
image.raycastTarget = false;
|
||||
image.maskable = image.GetComponentInParent<RectMask2D>() != null || image.GetComponentInParent<Mask>() != null;
|
||||
image.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Button")]
|
||||
public static void CreateButton()
|
||||
{
|
||||
var image = Create<Image>("Button");
|
||||
var button = image.AddComponent<Button>();
|
||||
image.maskable = image.GetComponentInParent<RectMask2D>() != null || image.GetComponentInParent<Mask>() != null;
|
||||
image.rectTransform.sizeDelta = new Vector2(160, 30);
|
||||
image.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Text - TextMeshPro", true)]
|
||||
public static void IgnoreTextMeshPro()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Text - TextMeshPro")]
|
||||
public static void CreateTextMeshPro()
|
||||
{
|
||||
var textMeshPro = Create<TextMeshProUGUI>("Text");
|
||||
textMeshPro.raycastTarget = false;
|
||||
textMeshPro.color = Color.black;
|
||||
textMeshPro.maskable = textMeshPro.GetComponentInParent<RectMask2D>() != null || textMeshPro.GetComponentInParent<Mask>() != null;
|
||||
textMeshPro.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Button - TextMeshPro", true)]
|
||||
public static void IgnoreButtonTextMeshPro()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Button - TextMeshPro")]
|
||||
public static void CreateButtonTextMeshPro()
|
||||
{
|
||||
var image = Create<Image>("Button");
|
||||
var button = image.AddComponent<Button>();
|
||||
var textMeshPro = Create<TextMeshProUGUI>("Text", button.transform);
|
||||
textMeshPro.raycastTarget = false;
|
||||
textMeshPro.maskable = textMeshPro.GetComponentInParent<RectMask2D>() != null || textMeshPro.GetComponentInParent<Mask>() != null;
|
||||
textMeshPro.text = "Button";
|
||||
textMeshPro.alignment = TextAlignmentOptions.Center;
|
||||
textMeshPro.alignment = TextAlignmentOptions.Midline;
|
||||
|
||||
textMeshPro.rectTransform.anchorMin = Vector3.zero;
|
||||
textMeshPro.rectTransform.anchorMax = Vector3.one;
|
||||
textMeshPro.rectTransform.sizeDelta = Vector2.zero;
|
||||
textMeshPro.color = Color.black;
|
||||
textMeshPro.fontSize = 24;
|
||||
|
||||
image.maskable = textMeshPro.maskable;
|
||||
image.rectTransform.sizeDelta = new Vector2(160, 30);
|
||||
image.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
#region ScrollRect
|
||||
[MenuItem("GameObject/UI/Scroll View", true)]
|
||||
public static void IgnoreScrollView()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/UIScrollView")]
|
||||
public static ScrollRect CreateScrollView()
|
||||
{
|
||||
var image = Create<Image>("UIScrollView");
|
||||
image.raycastTarget = true;
|
||||
image.maskable = false;
|
||||
image.rectTransform.sizeDelta = new Vector2(200, 200);
|
||||
var scrollRect = image.AddComponent<ScrollRect>();
|
||||
var uIScrollView = image.AddComponent<UIScrollView>();
|
||||
|
||||
var viewportImage = Create<Image>("Viewport", uIScrollView.transform);
|
||||
viewportImage.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/UIMask.psd");
|
||||
viewportImage.type = Image.Type.Sliced;
|
||||
viewportImage.raycastTarget = true;
|
||||
viewportImage.maskable = true;
|
||||
|
||||
var viewport = viewportImage.transform as RectTransform;
|
||||
viewport.AddComponent<RectMask2D>();
|
||||
viewport.anchorMin = Vector2.zero;
|
||||
viewport.anchorMax = Vector2.one;
|
||||
viewport.pivot = new Vector2(0, 1);
|
||||
viewport.sizeDelta = Vector2.zero;
|
||||
viewport.anchoredPosition = Vector2.zero;
|
||||
|
||||
scrollRect.viewport = viewport;
|
||||
|
||||
var content = Create<RectTransform>("Content", viewport);
|
||||
content.anchorMin = new Vector2(0, 1);
|
||||
content.anchorMax = new Vector2(1, 1);
|
||||
content.pivot = new Vector2(0, 1);
|
||||
content.sizeDelta = new Vector2(0, 300);
|
||||
content.anchoredPosition = Vector2.zero;
|
||||
|
||||
scrollRect.content = content;
|
||||
|
||||
uIScrollView.m_ScrollRect = scrollRect;
|
||||
uIScrollView.m_Content = content;
|
||||
scrollRect.gameObject.SetLayerRecursively(Layer.UI);
|
||||
return scrollRect;
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/UIScrollView - Horizontal")]
|
||||
public static void CreateScrollViewHorizontal()
|
||||
{
|
||||
var scrollRect = CreateScrollView();
|
||||
|
||||
scrollRect.horizontalScrollbar = CreateScrollBar("Scrollbar Horizontal", scrollRect.transform);
|
||||
scrollRect.horizontalScrollbar.direction = Scrollbar.Direction.LeftToRight;
|
||||
scrollRect.verticalScrollbarVisibility = scrollRect.horizontalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
|
||||
scrollRect.verticalScrollbarSpacing = scrollRect.horizontalScrollbarSpacing = -3;
|
||||
|
||||
var uiScrollView = scrollRect.GetComponent<UIScrollView>();
|
||||
uiScrollView.m_AxisType = RectTransform.Axis.Horizontal;
|
||||
uiScrollView.m_AlignType = AlignType.Left;
|
||||
|
||||
scrollRect.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/UIScrollView - Vertical")]
|
||||
public static void CreateScrollViewVertical()
|
||||
{
|
||||
var scrollRect = CreateScrollView();
|
||||
|
||||
scrollRect.verticalScrollbar = CreateScrollBar("Scrollbar Vertical", scrollRect.transform);
|
||||
var verticalRect = scrollRect.verticalScrollbar.transform as RectTransform;
|
||||
verticalRect.anchorMin = new Vector2(1, 0);
|
||||
verticalRect.anchorMax = new Vector2(1, 1);
|
||||
verticalRect.pivot = new Vector2(1, 1);
|
||||
verticalRect.sizeDelta = new Vector2(20, 0);
|
||||
verticalRect.anchoredPosition = Vector2.zero;
|
||||
scrollRect.verticalScrollbar.direction = Scrollbar.Direction.BottomToTop;
|
||||
|
||||
scrollRect.verticalScrollbarVisibility = scrollRect.horizontalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
|
||||
scrollRect.verticalScrollbarSpacing = scrollRect.horizontalScrollbarSpacing = -3;
|
||||
|
||||
scrollRect.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/UIScrollView - All")]
|
||||
public static void CreateScrollViewAll()
|
||||
{
|
||||
var scrollRect = CreateScrollView();
|
||||
|
||||
scrollRect.horizontalScrollbar = CreateScrollBar("Scrollbar Horizontal", scrollRect.transform);
|
||||
scrollRect.horizontalScrollbar.direction = Scrollbar.Direction.LeftToRight;
|
||||
|
||||
scrollRect.verticalScrollbar = CreateScrollBar("Scrollbar Vertical", scrollRect.transform);
|
||||
var verticalRect = scrollRect.verticalScrollbar.transform as RectTransform;
|
||||
verticalRect.anchorMin = new Vector2(1, 0);
|
||||
verticalRect.anchorMax = new Vector2(1, 1);
|
||||
verticalRect.pivot = new Vector2(1, 1);
|
||||
verticalRect.sizeDelta = new Vector2(20, 0);
|
||||
verticalRect.anchoredPosition = Vector2.zero;
|
||||
scrollRect.verticalScrollbar.direction = Scrollbar.Direction.BottomToTop;
|
||||
|
||||
scrollRect.verticalScrollbarVisibility = scrollRect.horizontalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
|
||||
scrollRect.verticalScrollbarSpacing = scrollRect.horizontalScrollbarSpacing = -3;
|
||||
|
||||
scrollRect.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
public static Scrollbar CreateScrollBar(string name, Transform parent)
|
||||
{
|
||||
var verticalScorllImage = Create<Image>(name, parent);
|
||||
verticalScorllImage.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/Background.psd");
|
||||
verticalScorllImage.type = Image.Type.Sliced;
|
||||
var verticalScroll = verticalScorllImage.AddComponent<Scrollbar>();
|
||||
var verticalRect = verticalScroll.transform as RectTransform;
|
||||
verticalRect.anchorMin = Vector2.zero;
|
||||
verticalRect.anchorMax = new Vector2(1, 0);
|
||||
verticalRect.pivot = Vector2.zero;
|
||||
verticalRect.sizeDelta = new Vector2(0, 20);
|
||||
verticalRect.anchoredPosition = Vector2.zero;
|
||||
|
||||
var handle = Create<Image>("Handle", verticalRect.transform);
|
||||
handle.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/UISprite.psd");
|
||||
handle.type = Image.Type.Sliced;
|
||||
handle.rectTransform.anchorMin = Vector2.zero;
|
||||
handle.rectTransform.anchorMax = Vector2.one;
|
||||
handle.rectTransform.sizeDelta = Vector2.zero;
|
||||
handle.rectTransform.anchoredPosition = Vector2.zero;
|
||||
|
||||
verticalScroll.handleRect = handle.rectTransform;
|
||||
|
||||
return verticalScroll;
|
||||
}
|
||||
#endregion
|
||||
|
||||
[MenuItem("GameObject/UI/Slider", true)]
|
||||
public static void IgnoreSlider()
|
||||
{
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/UI/Slider.")]
|
||||
public static void CreateSlider()
|
||||
{
|
||||
var image = Create<Image>("Slider");
|
||||
image.color = Color.grey;
|
||||
image.rectTransform.sizeDelta = new Vector2(160, 20);
|
||||
var slider = image.AddComponent<Slider>();
|
||||
slider.interactable = false;
|
||||
slider.transition = Selectable.Transition.None;
|
||||
|
||||
var fill = Create<Image>("Fill", slider.transform);
|
||||
fill.rectTransform.anchorMin = Vector2.zero;
|
||||
fill.rectTransform.anchorMax = new Vector2(0, 1);
|
||||
fill.rectTransform.sizeDelta = Vector2.zero;
|
||||
fill.rectTransform.anchoredPosition = Vector2.zero;
|
||||
slider.fillRect = fill.rectTransform;
|
||||
|
||||
var handle = Create<Image>("Handle", slider.transform);
|
||||
handle.rectTransform.anchorMin = Vector2.zero;
|
||||
handle.rectTransform.anchorMax = new Vector2(0, 1);
|
||||
handle.rectTransform.sizeDelta = new Vector2(20, 0);
|
||||
handle.rectTransform.anchoredPosition = Vector2.zero;
|
||||
handle.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/Knob.psd");
|
||||
slider.handleRect = handle.rectTransform;
|
||||
|
||||
image.gameObject.SetLayerRecursively(Layer.UI);
|
||||
}
|
||||
|
||||
public static T Create<T>(string name = null, Transform parent = null) where T : Component
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
name = typeof(T).Name;
|
||||
GameObject go = new GameObject(name);
|
||||
if (parent == null)
|
||||
{
|
||||
go.transform.SetParent(Selection.activeTransform);
|
||||
Selection.activeGameObject = go;
|
||||
}
|
||||
else
|
||||
{
|
||||
go.transform.SetParent(parent);
|
||||
}
|
||||
go.transform.localScale = Vector3.one;
|
||||
go.transform.localPosition = Vector3.zero;
|
||||
go.transform.localRotation = Quaternion.identity;
|
||||
return go.AddComponent<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b2cf4ddaea9fe1499bfdd7e4516b3b2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8cd8920119b49bc95c6755ae94d1b26
|
||||
timeCreated: 1758179166
|
||||
@@ -1,41 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenAlpha))]
|
||||
public class TweenAlphaEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenAlpha tw = target as TweenAlpha;
|
||||
GUI.changed = false;
|
||||
|
||||
var from = EditorGUILayout.Slider("From", tw.from, 0f, 1f);
|
||||
var to = EditorGUILayout.Slider("To", tw.to, 0f, 1f);
|
||||
|
||||
var ds = tw.autoCleanup;
|
||||
var pn = tw.colorProperty;
|
||||
|
||||
if (tw.GetComponent<MeshRenderer>() != null)
|
||||
{
|
||||
ds = EditorGUILayout.Toggle("Auto-cleanup", tw.autoCleanup);
|
||||
pn = EditorGUILayout.TextField("Color Property", tw.colorProperty);
|
||||
}
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
tw.autoCleanup = ds;
|
||||
tw.colorProperty = pn;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ca1a2b070be6f04f9dc2b6756d084ff
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,30 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenColor))]
|
||||
public class TweenColorEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenColor tw = target as TweenColor;
|
||||
GUI.changed = false;
|
||||
|
||||
Color from = EditorGUILayout.ColorField("From", tw.from);
|
||||
Color to = EditorGUILayout.ColorField("To", tw.to);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7928b5af346eed04ba391047b8b0ddc8
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,30 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenFOV))]
|
||||
public class TweenFOVEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenFOV tw = target as TweenFOV;
|
||||
GUI.changed = false;
|
||||
|
||||
float from = EditorGUILayout.Slider("From", tw.from, 1f, 180f);
|
||||
float to = EditorGUILayout.Slider("To", tw.to, 1f, 180f);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11db62d6da2a5f34590f41ebb958bd94
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,46 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenHeight))]
|
||||
public class TweenHeightEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenHeight tw = target as TweenHeight;
|
||||
GUI.changed = false;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginDisabledGroup(tw.fromTarget != null);
|
||||
var from = EditorGUILayout.FloatField("From", tw.from);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
var fc = (RectTransform)EditorGUILayout.ObjectField(tw.fromTarget, typeof(RectTransform), true, GUILayout.Width(110f));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginDisabledGroup(tw.toTarget != null);
|
||||
var to = EditorGUILayout.FloatField("To", tw.to);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
var tc = (RectTransform)EditorGUILayout.ObjectField(tw.toTarget, typeof(RectTransform), true, GUILayout.Width(110f));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (from < 0) from = 0;
|
||||
if (to < 0) to = 0;
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
tw.fromTarget = fc;
|
||||
tw.toTarget = tc;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c135e5506eb921409b47fa6543134ec
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,33 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenOrthoSize))]
|
||||
public class TweenOrthoSizeEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenOrthoSize tw = target as TweenOrthoSize;
|
||||
GUI.changed = false;
|
||||
|
||||
float from = EditorGUILayout.FloatField("From", tw.from);
|
||||
float to = EditorGUILayout.FloatField("To", tw.to);
|
||||
|
||||
if (from < 0f) from = 0f;
|
||||
if (to < 0f) to = 0f;
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37cda4ddb333a6d469473d36a439d20e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,30 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenPosition))]
|
||||
public class TweenPositionEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenPosition tw = target as TweenPosition;
|
||||
GUI.changed = false;
|
||||
|
||||
Vector3 from = EditorGUILayout.Vector3Field("From", tw.from);
|
||||
Vector3 to = EditorGUILayout.Vector3Field("To", tw.to);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c3ed7d7dc3fe434d8fbe43ba848c7de
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,32 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenRotation))]
|
||||
public class TweenRotationEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenRotation tw = target as TweenRotation;
|
||||
GUI.changed = false;
|
||||
|
||||
Vector3 from = EditorGUILayout.Vector3Field("From", tw.from);
|
||||
Vector3 to = EditorGUILayout.Vector3Field("To", tw.to);
|
||||
var quat = EditorGUILayout.Toggle("Quaternion", tw.quaternionLerp);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
tw.quaternionLerp = quat;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37920e4b9f98bd44fa1250a9d995475c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,30 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenScale))]
|
||||
public class TweenScaleEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenScale tw = target as TweenScale;
|
||||
GUI.changed = false;
|
||||
|
||||
Vector3 from = EditorGUILayout.Vector3Field("From", tw.from);
|
||||
Vector3 to = EditorGUILayout.Vector3Field("To", tw.to);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50b7b0504ae552a42b20841c085dc185
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,9 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenTransform))]
|
||||
public class TweenTransformEditor : UITweenerEditor
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ff6713338f44844c82de82685521dd3
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,30 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenVolume))]
|
||||
public class TweenVolumeEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenVolume tw = target as TweenVolume;
|
||||
GUI.changed = false;
|
||||
|
||||
float from = EditorGUILayout.Slider("From", tw.from, 0f, 1f);
|
||||
float to = EditorGUILayout.Slider("To", tw.to, 0f, 1f);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 023e6404a70e48148b315cf9737211af
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,46 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenWidth))]
|
||||
public class TweenWidthEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenWidth tw = target as TweenWidth;
|
||||
GUI.changed = false;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginDisabledGroup(tw.fromTarget != null);
|
||||
var from = EditorGUILayout.FloatField("From", tw.from);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
var fc = (RectTransform)EditorGUILayout.ObjectField(tw.fromTarget, typeof(RectTransform), true, GUILayout.Width(110f));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginDisabledGroup(tw.toTarget != null);
|
||||
var to = EditorGUILayout.FloatField("To", tw.to);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
var tc = (RectTransform)EditorGUILayout.ObjectField(tw.toTarget, typeof(RectTransform), true, GUILayout.Width(110f));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (from < 0) from = 0;
|
||||
if (to < 0) to = 0;
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
tw.fromTarget = fc;
|
||||
tw.toTarget = tc;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d35cd8e39586acb4a842a0c77019d598
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,118 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
//-------------------------------------------------
|
||||
// NGUI: Next-Gen UI kit
|
||||
// Copyright © 2011-2020 Tasharen Entertainment Inc
|
||||
//-------------------------------------------------
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(UITweener), true)]
|
||||
public class UITweenerEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 110f;
|
||||
base.OnInspectorGUI();
|
||||
DrawCommonProperties();
|
||||
}
|
||||
|
||||
static public bool DrawHeader(string text, string key, bool forceOn, bool minimalistic)
|
||||
{
|
||||
bool state = EditorPrefs.GetBool(key, true);
|
||||
|
||||
if (!minimalistic) GUILayout.Space(3f);
|
||||
if (!forceOn && !state) GUI.backgroundColor = new Color(0.8f, 0.8f, 0.8f);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUI.changed = false;
|
||||
|
||||
if (minimalistic)
|
||||
{
|
||||
if (state) text = "\u25BC" + (char)0x200a + text;
|
||||
else text = "\u25BA" + (char)0x200a + text;
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUI.contentColor = EditorGUIUtility.isProSkin ? new Color(1f, 1f, 1f, 0.7f) : new Color(0f, 0f, 0f, 0.7f);
|
||||
if (!GUILayout.Toggle(true, text, "PreToolbar2", GUILayout.MinWidth(20f))) state = !state;
|
||||
GUI.contentColor = Color.white;
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "<b><size=11>" + text + "</size></b>";
|
||||
if (state) text = "\u25BC " + text;
|
||||
else text = "\u25BA " + text;
|
||||
if (!GUILayout.Toggle(true, text, "dragtab", GUILayout.MinWidth(20f))) state = !state;
|
||||
}
|
||||
|
||||
if (GUI.changed) EditorPrefs.SetBool(key, state);
|
||||
|
||||
if (!minimalistic) GUILayout.Space(2f);
|
||||
GUILayout.EndHorizontal();
|
||||
GUI.backgroundColor = Color.white;
|
||||
if (!forceOn && !state) GUILayout.Space(3f);
|
||||
return state;
|
||||
}
|
||||
|
||||
static public void BeginContents()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(GUILayout.MinHeight(10f));
|
||||
GUILayout.Space(10f);
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Space(2f);
|
||||
}
|
||||
static public void EndContents()
|
||||
{
|
||||
GUILayout.Space(3f);
|
||||
GUILayout.EndVertical();
|
||||
EditorGUILayout.EndHorizontal();
|
||||
GUILayout.Space(3f);
|
||||
}
|
||||
|
||||
protected void DrawCommonProperties ()
|
||||
{
|
||||
UITweener tw = target as UITweener;
|
||||
|
||||
if (DrawHeader("Tweener", "Tweener", false , true))
|
||||
{
|
||||
BeginContents();
|
||||
EditorGUIUtility.labelWidth = 110f;
|
||||
|
||||
GUI.changed = false;
|
||||
|
||||
UITweener.Style style = (UITweener.Style)EditorGUILayout.EnumPopup("Play Style", tw.style);
|
||||
AnimationCurve curve = EditorGUILayout.CurveField("Animation Curve", tw.animationCurve, GUILayout.Width(170f), GUILayout.Height(62f));
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
float dur = EditorGUILayout.FloatField("Duration", tw.duration, GUILayout.Width(170f));
|
||||
GUILayout.Label("seconds");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
float del = EditorGUILayout.FloatField("Start Delay", tw.delay, GUILayout.Width(170f));
|
||||
GUILayout.Label("seconds");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
var deff = (UITweener.DelayAffects)EditorGUILayout.EnumPopup("Delay Affects", tw.delayAffects);
|
||||
|
||||
int tg = EditorGUILayout.IntField("Tween Group", tw.tweenGroup, GUILayout.Width(170f));
|
||||
bool ts = EditorGUILayout.Toggle("Ignore TimeScale", tw.ignoreTimeScale);
|
||||
bool fx = EditorGUILayout.Toggle("Use Fixed Update", tw.useFixedUpdate);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
tw.animationCurve = curve;
|
||||
tw.style = style;
|
||||
tw.ignoreTimeScale = ts;
|
||||
tw.tweenGroup = tg;
|
||||
tw.duration = dur;
|
||||
tw.delay = del;
|
||||
tw.delayAffects = deff;
|
||||
tw.useFixedUpdate = fx;
|
||||
}
|
||||
EndContents();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3564c93409a4aaa44a48de1e49be56ba
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 391048bfcbd4480ebaf66c91987b291f
|
||||
timeCreated: 1758179210
|
||||
@@ -1,252 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Linq;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class ControlItemDrawer
|
||||
{
|
||||
private UIControlDataEditor _container;
|
||||
private CtrlItemData _itemData;
|
||||
private bool _foldout = true;
|
||||
private int _controlTypeIdx = 0;
|
||||
|
||||
public ControlItemDrawer(UIControlDataEditor container, CtrlItemData item)
|
||||
{
|
||||
_container = container;
|
||||
_itemData = item;
|
||||
}
|
||||
|
||||
public bool Draw()
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Rect rect = EditorGUILayout.BeginVertical();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
{
|
||||
EditorGUILayout.LabelField("变量名 ", UIControlDataEditor.skin.label, GUILayout.Width(60f));
|
||||
string newName = EditorGUILayout.TextField(_itemData.name, UIControlDataEditor.skin.textField).Trim();
|
||||
|
||||
if (newName != _itemData.name)
|
||||
{
|
||||
_itemData.name = newName;
|
||||
(_container.target as UIControlData).SetDirty();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
_foldout = EditorGUILayout.Foldout(_foldout, _foldout ? "收起" : "展开", true);
|
||||
|
||||
if (GUILayout.Button("+", EditorStyles.miniButton))
|
||||
{
|
||||
_container.AddControlAfter(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("-", EditorStyles.miniButton))
|
||||
{
|
||||
_container.RemoveControl(this);
|
||||
return false;
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// 控件列表
|
||||
if (_foldout)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
{
|
||||
EditorGUILayout.LabelField("变量类型 ", UIControlDataEditor.skin.label, GUILayout.Width(60f));
|
||||
|
||||
if (_controlTypeIdx == 0 && !string.IsNullOrEmpty(_itemData.type))
|
||||
_controlTypeIdx = FindTypeIdx(_itemData.type);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
(_container.target as UIControlData).SetDirty();
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
_controlTypeIdx = EditorGUILayout.Popup(_controlTypeIdx, _container.allTypeNames, UIControlDataEditor.popupAlignLeft);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
if(_controlTypeIdx != 0)
|
||||
{
|
||||
if (!ChangeControlsTypeTo(_controlTypeIdx))
|
||||
_controlTypeIdx = 0; // 切换失败,重置回自动
|
||||
}
|
||||
else // 被主动设置为了自动
|
||||
_itemData.type = string.Empty;
|
||||
|
||||
(_container.target as UIControlData).SetDirty();
|
||||
return false;
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
|
||||
EditorGUILayout.Space();
|
||||
for (int i = 0, imax = _itemData.targets.Length; i < imax; i++)
|
||||
{
|
||||
Object obj = _itemData.targets[i];
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
_itemData.targets[i] = EditorGUILayout.ObjectField(obj, typeof(Object), true);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
(_container.target as UIControlData).SetDirty();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space();
|
||||
if (GUILayout.Button("+", EditorStyles.miniButton))
|
||||
{
|
||||
InsertItem(i + 1);
|
||||
return false;
|
||||
}
|
||||
if (GUILayout.Button("-", EditorStyles.miniButton))
|
||||
{
|
||||
if(_itemData.targets.Length == 1)
|
||||
{
|
||||
Debug.LogError("至少应保留一个控件");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveItem(i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
if (EditorGUIUtility.isProSkin)
|
||||
GUI.Box(new Rect(rect.x - 10f, rect.y - 5f, rect.width + 20f, rect.height + 15f), "");
|
||||
else
|
||||
GUI.Box(new Rect(rect.x - 10f, rect.y - 5f, rect.width + 20f, rect.height + 15f), "", UIControlDataEditor.skin.box);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
(_container.target as UIControlData).SetDirty();
|
||||
}
|
||||
|
||||
PostProcess();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void PostProcess()
|
||||
{
|
||||
// 默认将新添加的第一个控件的名字作为变量名
|
||||
if (_itemData.targets.Length > 0 && _itemData.targets[0] != null && string.IsNullOrEmpty(_itemData.name))
|
||||
_itemData.name = _itemData.targets[0].name.Trim();
|
||||
}
|
||||
|
||||
private int FindTypeIdx(string typeName)
|
||||
{
|
||||
string[] allTypeNames = _container.allTypeNames;
|
||||
for (int i = 0, imax = allTypeNames.Length; i < imax; i++)
|
||||
{
|
||||
if(allTypeNames[i] == typeName)
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void InsertItem(int idx)
|
||||
{
|
||||
Object[] newArr = new Object[_itemData.targets.Length + 1];
|
||||
for(int i = 0; i < idx; i++)
|
||||
{
|
||||
newArr[i] = _itemData.targets[i];
|
||||
}
|
||||
newArr[idx] = null;
|
||||
for(int i = idx + 1; i < newArr.Length; i++)
|
||||
{
|
||||
newArr[i] = _itemData.targets[i - 1];
|
||||
}
|
||||
|
||||
_itemData.targets = newArr;
|
||||
}
|
||||
|
||||
private void RemoveItem(int idx)
|
||||
{
|
||||
Object[] newArr = new Object[_itemData.targets.Length - 1];
|
||||
for(int i = 0; i < idx; i++)
|
||||
{
|
||||
newArr[i] = _itemData.targets[i];
|
||||
}
|
||||
|
||||
for(int i = idx; i < newArr.Length; i++)
|
||||
{
|
||||
newArr[idx] = _itemData.targets[i + 1];
|
||||
}
|
||||
|
||||
_itemData.targets = newArr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将控件切换到指定类型
|
||||
/// </summary>
|
||||
/// <param name="typeIdx"></param>
|
||||
private bool ChangeControlsTypeTo(int typeIdx)
|
||||
{
|
||||
System.Type targetType = _container.allTypes[typeIdx];
|
||||
string targetTypeName = _container.allTypeNames[typeIdx];
|
||||
bool isGameObject = targetType == typeof(GameObject);
|
||||
|
||||
|
||||
for(int i = 0, imax = _itemData.targets.Length; i < imax; i++)
|
||||
{
|
||||
Object obj = _itemData.targets[i];
|
||||
if (obj == null)
|
||||
{
|
||||
Debug.LogErrorFormat("[{0}.{1}] control[{2}] is null"
|
||||
, _container.target.name, _itemData.name, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(obj.GetType() != typeof(GameObject))
|
||||
{
|
||||
if((obj as Component) == null)
|
||||
{
|
||||
Debug.LogErrorFormat("[{0}.{1}] control[{2}] [{3}] must be GameObject or a Component"
|
||||
, _container.target.name, _itemData.name, i, obj.name);
|
||||
return false;
|
||||
}
|
||||
obj = (obj as Component).gameObject;
|
||||
}
|
||||
|
||||
GameObject go = obj as GameObject;
|
||||
if (isGameObject)
|
||||
_itemData.targets[i] = go;
|
||||
else
|
||||
{
|
||||
Component comp = go.GetComponent(targetType);
|
||||
if(comp == null)
|
||||
{
|
||||
Debug.LogErrorFormat("[{0}.{1}] control[{2}] [{3}] isn't a {4}"
|
||||
, _container.target.name, _itemData.name, i, go.name, targetTypeName);
|
||||
return false;
|
||||
}
|
||||
_itemData.targets[i] = comp;
|
||||
}
|
||||
}
|
||||
|
||||
_itemData.type = targetTypeName;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a19fd525bc43e2439c14dac7ed67295
|
||||
timeCreated: 1521794417
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,73 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class SubUIItemDrawer
|
||||
{
|
||||
private UIControlDataEditor _container;
|
||||
private SubUIItemData _itemData;
|
||||
private bool _foldout = true;
|
||||
|
||||
public SubUIItemDrawer(UIControlDataEditor container, SubUIItemData itemData)
|
||||
{
|
||||
_container = container;
|
||||
_itemData = itemData;
|
||||
}
|
||||
|
||||
public bool Draw()
|
||||
{
|
||||
Rect rect = EditorGUILayout.BeginVertical();
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
{
|
||||
EditorGUILayout.LabelField("子UI名 ", UIControlDataEditor.skin.label);
|
||||
_itemData.name = EditorGUILayout.TextField(_itemData.name, UIControlDataEditor.skin.textField).Trim();
|
||||
EditorGUILayout.Space();
|
||||
_foldout = EditorGUILayout.Foldout(_foldout, _foldout ? "收起" : "展开", true);
|
||||
|
||||
if (GUILayout.Button("+", EditorStyles.miniButton))
|
||||
{
|
||||
_container.AddSubUIAfter(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("-", EditorStyles.miniButton))
|
||||
{
|
||||
_container.RemoveSubUI(this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
|
||||
if (_foldout)
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
_itemData.subUIData = EditorGUILayout.ObjectField(_itemData.subUIData as Object, typeof(UIControlData), true) as UIControlData;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
if (EditorGUIUtility.isProSkin)
|
||||
GUI.Box(new Rect(rect.x - 10f, rect.y - 5f, rect.width + 20f, rect.height + 15f), "");
|
||||
else
|
||||
GUI.Box(new Rect(rect.x - 10f, rect.y - 5f, rect.width + 20f, rect.height + 15f), "", UIControlDataEditor.skin.box);
|
||||
|
||||
PostProcess();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void PostProcess()
|
||||
{
|
||||
// 默认将控件的名字作为变量名
|
||||
if (_itemData.subUIData != null && string.IsNullOrEmpty(_itemData.name))
|
||||
_itemData.name = _itemData.subUIData.name.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2db1a302384342148abb76d0508f2944
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,234 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
[CustomEditor(typeof(UIControlData))]
|
||||
public class UIControlDataEditor : Editor
|
||||
{
|
||||
public static GUISkin skin;
|
||||
public static GUIStyle popupAlignLeft; // TODO 挪出去一个 SkinManager
|
||||
|
||||
public string[] allTypeNames;
|
||||
public Type[] allTypes;
|
||||
|
||||
private List<CtrlItemData> _ctrlItemDatas;
|
||||
private List<SubUIItemData> _subUIItemDatas;
|
||||
|
||||
private List<ControlItemDrawer> _ctrlItemDrawers;
|
||||
private List<SubUIItemDrawer> _subUIItemDrawers;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if(skin == null)
|
||||
{
|
||||
if (EditorGUIUtility.isProSkin)
|
||||
skin = Resources.Load("Editor/UIControlDataSkinPro") as GUISkin;
|
||||
else
|
||||
skin = Resources.Load("Editor/UIControlDataSkinPersonal") as GUISkin;
|
||||
}
|
||||
|
||||
if(popupAlignLeft == null)
|
||||
{
|
||||
popupAlignLeft = new GUIStyle("Popup");
|
||||
popupAlignLeft.alignment = TextAnchor.MiddleLeft;
|
||||
}
|
||||
|
||||
allTypeNames = UIControlData.GetAllTypeNames();
|
||||
allTypes = UIControlData.GetAllTypes();
|
||||
|
||||
UIControlData uIControlData = target as UIControlData;
|
||||
if (uIControlData != null)
|
||||
{
|
||||
uIControlData.CorrectComponents();
|
||||
uIControlData.CheckSubUIs();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (skin == null || skin.customStyles == null || skin.customStyles.Length == 0)
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
UIControlData data = target as UIControlData;
|
||||
if(data.ctrlItemDatas == null)
|
||||
data.ctrlItemDatas = new List<CtrlItemData>();
|
||||
|
||||
if(data.subUIItemDatas == null)
|
||||
data.subUIItemDatas = new List<SubUIItemData>();
|
||||
|
||||
_ctrlItemDatas = data.ctrlItemDatas;
|
||||
_subUIItemDatas = data.subUIItemDatas;
|
||||
CheckDrawers();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
|
||||
// 绘制控件绑定
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("控件绑定", skin.customStyles[0]);
|
||||
if(_ctrlItemDrawers.Count == 0)
|
||||
{
|
||||
if(GUILayout.Button("+", EditorStyles.miniButton))
|
||||
{
|
||||
AddControlAfter(-1);
|
||||
Repaint();
|
||||
return;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
foreach (var drawer in _ctrlItemDrawers)
|
||||
{
|
||||
GUILayout.Space(10f);
|
||||
if (!drawer.Draw())
|
||||
{
|
||||
Repaint();
|
||||
return;
|
||||
}
|
||||
GUILayout.Space(10f);
|
||||
}
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
// 绘制子UI
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("子UI绑定", skin.customStyles[0]);
|
||||
if(_subUIItemDrawers.Count == 0)
|
||||
{
|
||||
if (GUILayout.Button("+", EditorStyles.miniButton))
|
||||
{
|
||||
AddSubUIAfter(-1);
|
||||
Repaint();
|
||||
return;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
foreach(var drawer in _subUIItemDrawers)
|
||||
{
|
||||
GUILayout.Space(10f);
|
||||
if (!drawer.Draw())
|
||||
{
|
||||
Repaint();
|
||||
return;
|
||||
}
|
||||
GUILayout.Space(10f);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(); EditorGUILayout.Space();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
this.Repaint();
|
||||
}
|
||||
|
||||
public void AddControlAfter(ControlItemDrawer drawer)
|
||||
{
|
||||
int idx = _ctrlItemDrawers.IndexOf(drawer);
|
||||
Debug.Assert(idx != -1);
|
||||
|
||||
AddControlAfter(idx);
|
||||
}
|
||||
|
||||
public void AddSubUIAfter(SubUIItemDrawer drawer)
|
||||
{
|
||||
int idx = _subUIItemDrawers.IndexOf(drawer);
|
||||
Debug.Assert(idx != -1);
|
||||
|
||||
AddSubUIAfter(idx);
|
||||
}
|
||||
|
||||
public void RemoveControl(ControlItemDrawer drawer)
|
||||
{
|
||||
int idx = _ctrlItemDrawers.IndexOf(drawer);
|
||||
Debug.Assert(idx != -1);
|
||||
|
||||
RemoveControl(idx);
|
||||
}
|
||||
|
||||
public void RemoveSubUI(SubUIItemDrawer drawer)
|
||||
{
|
||||
int idx = _subUIItemDrawers.IndexOf(drawer);
|
||||
Debug.Assert(idx != -1);
|
||||
|
||||
RemoveSubUI(idx);
|
||||
}
|
||||
|
||||
#region Private
|
||||
private void CheckDrawers()
|
||||
{
|
||||
if (_ctrlItemDrawers == null)
|
||||
{
|
||||
_ctrlItemDrawers = new List<ControlItemDrawer>(100);
|
||||
foreach(var item in _ctrlItemDatas)
|
||||
{
|
||||
ControlItemDrawer drawer = new ControlItemDrawer(this, item);
|
||||
_ctrlItemDrawers.Add(drawer);
|
||||
}
|
||||
}
|
||||
|
||||
if(_subUIItemDrawers == null)
|
||||
{
|
||||
_subUIItemDrawers = new List<SubUIItemDrawer>(100);
|
||||
foreach(var item in _subUIItemDatas)
|
||||
{
|
||||
SubUIItemDrawer drawer = new SubUIItemDrawer(this, item);
|
||||
_subUIItemDrawers.Add(drawer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddControlAfter(int idx)
|
||||
{
|
||||
CtrlItemData itemData = new CtrlItemData();
|
||||
_ctrlItemDatas.Insert(idx + 1, itemData);
|
||||
|
||||
ControlItemDrawer drawer = new ControlItemDrawer(this, itemData);
|
||||
_ctrlItemDrawers.Insert(idx + 1, drawer);
|
||||
|
||||
SetPrefabDirty();
|
||||
}
|
||||
|
||||
private void AddSubUIAfter(int idx)
|
||||
{
|
||||
SubUIItemData itemData = new SubUIItemData();
|
||||
_subUIItemDatas.Insert(idx + 1, itemData);
|
||||
|
||||
SubUIItemDrawer drawer = new SubUIItemDrawer(this, itemData);
|
||||
_subUIItemDrawers.Insert(idx + 1, drawer);
|
||||
|
||||
SetPrefabDirty();
|
||||
}
|
||||
|
||||
private void RemoveControl(int idx)
|
||||
{
|
||||
_ctrlItemDatas.RemoveAt(idx);
|
||||
_ctrlItemDrawers.RemoveAt(idx);
|
||||
|
||||
SetPrefabDirty();
|
||||
}
|
||||
|
||||
private void RemoveSubUI(int idx)
|
||||
{
|
||||
_subUIItemDatas.RemoveAt(idx);
|
||||
_subUIItemDrawers.RemoveAt(idx);
|
||||
|
||||
SetPrefabDirty();
|
||||
}
|
||||
|
||||
private void SetPrefabDirty()
|
||||
{
|
||||
UIControlData uIControlData = target as UIControlData;
|
||||
uIControlData.SetDirty();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27c41d595322d554a9afea0d2b516863
|
||||
timeCreated: 1521786373
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,564 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.IO;
|
||||
using SkierFramework;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using YooAsset.Editor;
|
||||
|
||||
public class UICreateWindow : EditorWindow
|
||||
{
|
||||
#region MenuItem
|
||||
|
||||
[MenuItem("Assets/Create/CreateUI")]
|
||||
private static void CopyUI()
|
||||
{
|
||||
if (Selection.activeObject == null || !(Selection.activeObject is GameObject))
|
||||
{
|
||||
Debug.LogError("请选择UI预制体!");
|
||||
return;
|
||||
}
|
||||
|
||||
UICreateWindow.OpenWindow().uiPrefab = Selection.activeObject as GameObject;
|
||||
}
|
||||
|
||||
[MenuItem("Tools/UI管理")]
|
||||
public static UICreateWindow OpenWindow()
|
||||
{
|
||||
var window = GetWindow<UICreateWindow>("UI管理");
|
||||
if (window == null)
|
||||
{
|
||||
window = CreateWindow<UICreateWindow>("UI管理");
|
||||
}
|
||||
|
||||
window.name = "UI管理";
|
||||
window.Focus();
|
||||
return window;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private string _packageName;
|
||||
private string _mInput;
|
||||
|
||||
private Vector2 _scroll;
|
||||
private Vector2 _scroll2;
|
||||
private Vector2 _scroll3;
|
||||
private string _uiViewTemplate = "UIViewTemplate";
|
||||
private string _uiConfig = "UIConfig";
|
||||
private string _uiType = "UIType";
|
||||
private string _saveUIPath = "SaveUIPath";
|
||||
private string _uiName;
|
||||
public GameObject uiPrefab;
|
||||
private Dictionary<string, string> _uiNames = new Dictionary<string, string>();
|
||||
private Dictionary<string, UIConfigJson> _uiJsonDatas = new Dictionary<string, UIConfigJson>();
|
||||
|
||||
private bool _isWindow = true;
|
||||
private UILayer _layer = UILayer.NormalLayer;
|
||||
|
||||
private IEnumerable<Type> uiViews;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
TryGetPath(ref _uiViewTemplate, _uiViewTemplate, ".txt");
|
||||
TryGetPath(ref _uiType, _uiType, ".cs");
|
||||
TryGetPath(ref _uiConfig, _uiConfig, ".json");
|
||||
_saveUIPath = PlayerPrefs.GetString(_saveUIPath, "Assets/Scripts");
|
||||
|
||||
_uiJsonDatas.Clear();
|
||||
_uiNames.Clear();
|
||||
// string[] strs = Enum.GetNames(typeof(UIType));
|
||||
uiViews = ReflectionHelper.GetAllUIViewTypes();
|
||||
foreach (var uiView in uiViews)
|
||||
{
|
||||
string str = uiView.Name;
|
||||
if (str.Equals("Max")) continue;
|
||||
|
||||
var jsonData = GetUIJson(str);
|
||||
if (jsonData == null || string.IsNullOrEmpty(jsonData.path)) continue;
|
||||
var scriptPath = GetUIScript(str, true);
|
||||
_uiNames.AddOrUpdate(str, scriptPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("通过[Tools/UI管理]可以打开");
|
||||
_scroll = EditorGUILayout.BeginScrollView(_scroll);
|
||||
{
|
||||
EditorGUILayout.HelpBox("UI基础文件", MessageType.Info);
|
||||
{
|
||||
_packageName = StringInputFild("PackageName", "UIPackageName");
|
||||
PathField("UI模板文件.txt", ref _uiViewTemplate, nameof(_uiViewTemplate), ".txt");
|
||||
PathField("UI配置文件.json", ref _uiConfig, nameof(_uiConfig), ".json");
|
||||
PathField("UIType.cs", ref _uiType, nameof(_uiType), ".cs");
|
||||
}
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
{
|
||||
_scroll2 = EditorGUILayout.BeginScrollView(_scroll2, "box", GUILayout.Width(position.width * 0.4f - 6));
|
||||
{
|
||||
EditorGUILayout.HelpBox("已创建的UI", MessageType.Info);
|
||||
_mInput = EditorGUILayout.TextField(_mInput, EditorStyles.toolbarSearchField, GUILayout.Height(20));
|
||||
//string[] strs = Enum.GetNames(typeof(UIType));
|
||||
foreach (var uiView in uiViews)
|
||||
{
|
||||
string str = uiView.Name;
|
||||
if (str.Equals("Max")) continue;
|
||||
if (!string.IsNullOrEmpty(_mInput) && !str.Contains(_mInput)) continue;
|
||||
|
||||
var jsonData = GetUIJson(str);
|
||||
var scriptPath = GetUIScript(str);
|
||||
if (jsonData == null || string.IsNullOrEmpty(jsonData.path) ||
|
||||
string.IsNullOrEmpty(scriptPath)) continue;
|
||||
|
||||
var defaultColor = GUI.color;
|
||||
if (str.Equals(_uiName))
|
||||
{
|
||||
GUI.color = Color.yellow;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal("box");
|
||||
if (GUILayout.Button("选中"))
|
||||
{
|
||||
uiPrefab = AssetDatabase.LoadAssetAtPath<GameObject>(jsonData.path);
|
||||
}
|
||||
|
||||
EditorGUILayout.ObjectField(AssetDatabase.LoadAssetAtPath<GameObject>(jsonData.path),
|
||||
typeof(GameObject), true);
|
||||
EditorGUILayout.ObjectField(AssetDatabase.LoadAssetAtPath<TextAsset>(scriptPath),
|
||||
typeof(TextAsset), true);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
GUI.color = defaultColor;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("标记资源"))
|
||||
{
|
||||
Mask();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
_scroll3 = EditorGUILayout.BeginScrollView(_scroll3, "box", GUILayout.Width(position.width * 0.6f - 6));
|
||||
{
|
||||
EditorGUILayout.HelpBox("UI操作", MessageType.Info);
|
||||
uiPrefab = EditorGUILayout.ObjectField("UI预制体", uiPrefab, typeof(GameObject), true) as GameObject;
|
||||
if (uiPrefab != null)
|
||||
{
|
||||
_uiName = uiPrefab.name;
|
||||
var uiScriptPath = GetUIScript(_uiName);
|
||||
if (string.IsNullOrEmpty(uiScriptPath))
|
||||
{
|
||||
if (GUILayout.Button($"选择创建路径:{_saveUIPath}"))
|
||||
{
|
||||
var newPath = EditorUtility.OpenFolderPanel("UI生成路径", _saveUIPath, "");
|
||||
_saveUIPath = newPath.Replace(Application.dataPath, "Assets");
|
||||
PlayerPrefs.SetString(nameof(_saveUIPath), _saveUIPath);
|
||||
}
|
||||
|
||||
if (uiPrefab != null)
|
||||
{
|
||||
EditorGUILayout.TextField("UI生成路径", $"{_saveUIPath}/{_uiName}.cs");
|
||||
}
|
||||
|
||||
_isWindow = EditorGUILayout.Toggle("是否为窗口", _isWindow);
|
||||
_layer = (UILayer)EditorGUILayout.EnumPopup("UILayer设置", _layer);
|
||||
|
||||
var defaultColor = GUI.color;
|
||||
GUI.color = Color.green;
|
||||
if (GUILayout.Button("创建UI"))
|
||||
{
|
||||
// 生成代码
|
||||
string str = Regex.Replace(File.ReadAllText(_uiViewTemplate), "UIXXXView", _uiName);
|
||||
UIControlData uiControlData = uiPrefab.GetComponent<UIControlData>();
|
||||
if (uiControlData != null)
|
||||
{
|
||||
uiControlData.CopyCodeToClipBoardPrivate();
|
||||
}
|
||||
|
||||
str = Regex.Replace(str, "//UIControlData",
|
||||
uiControlData != null ? UnityEngine.GUIUtility.systemCopyBuffer : "");
|
||||
string newPath = $"{_saveUIPath}/{_uiName}.cs";
|
||||
File.WriteAllText(newPath, str);
|
||||
|
||||
var jsonData = new UIConfigJson
|
||||
{
|
||||
uiType = _uiName,
|
||||
path = AssetDatabase.GetAssetPath(uiPrefab),
|
||||
isWindow = _isWindow,
|
||||
uiLayer = _layer.ToString(),
|
||||
};
|
||||
|
||||
_uiJsonDatas.Add(_uiName, jsonData);
|
||||
_uiNames.Add(_uiName, newPath);
|
||||
SaveJson();
|
||||
|
||||
// 生成UIType
|
||||
var newStr = Regex.Replace(File.ReadAllText(_uiType), "Max,", $"{_uiName},\n\t\tMax,");
|
||||
File.Delete(_uiType);
|
||||
File.WriteAllText(_uiType, newStr);
|
||||
|
||||
Debug.Log("生成成功:" + newPath);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
GUI.color = defaultColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
var jsonData = GetUIJson(_uiName);
|
||||
if (UnityEditor.PrefabUtility.IsPartOfPrefabAsset(uiPrefab))
|
||||
{
|
||||
// 预制体资源就是自身
|
||||
jsonData.path = UnityEditor.AssetDatabase.GetAssetPath(uiPrefab);
|
||||
}
|
||||
|
||||
EditorGUILayout.ObjectField("已创建脚本",
|
||||
AssetDatabase.LoadAssetAtPath(uiScriptPath, typeof(TextAsset)), typeof(TextAsset),
|
||||
true);
|
||||
jsonData.isWindow = EditorGUILayout.Toggle("是否为窗口", jsonData.isWindow);
|
||||
Enum.TryParse(jsonData.uiLayer, out UILayer layer);
|
||||
jsonData.uiLayer = EditorGUILayout.EnumPopup("UILayer设置", layer).ToString();
|
||||
|
||||
var defaultColor = GUI.color;
|
||||
GUI.color = Color.green;
|
||||
if (GUILayout.Button("保存设置"))
|
||||
{
|
||||
SaveJson();
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
GUI.color = defaultColor;
|
||||
|
||||
GUI.color = Color.red;
|
||||
if (GUILayout.Button("删除UI脚本"))
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("是否确认删除",
|
||||
$"请确认是否删除:\n{uiScriptPath}\n同时会清除Json,UIType中相关数据", "确定", "取消"))
|
||||
{
|
||||
// 清除UIType中指定类型
|
||||
var uiTypeStr = File.ReadAllText(_uiType);
|
||||
int index = uiTypeStr.IndexOf(_uiName);
|
||||
int leftIndex = uiTypeStr.Substring(0, index).LastIndexOf(',') + 1;
|
||||
int rightIndex = uiTypeStr.Substring(index, uiTypeStr.Length - index).IndexOf(',') +
|
||||
index + 1;
|
||||
var newStr = uiTypeStr.Substring(0, leftIndex) +
|
||||
uiTypeStr.Substring(rightIndex, uiTypeStr.Length - rightIndex);
|
||||
File.Delete(_uiType);
|
||||
File.WriteAllText(_uiType, newStr);
|
||||
// 清除UIConfig中的指定类型
|
||||
_uiJsonDatas.Remove(_uiName);
|
||||
_uiNames.Remove(_uiName);
|
||||
SaveJson();
|
||||
// 删除文件
|
||||
File.Delete(uiScriptPath);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
_uiNames.Remove(_uiName);
|
||||
}
|
||||
}
|
||||
|
||||
GUI.color = defaultColor;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_uiName = "";
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void SaveJson()
|
||||
{
|
||||
List<UIConfigJson> list = new List<UIConfigJson>();
|
||||
foreach (var name in _uiNames.Keys)
|
||||
{
|
||||
if (_uiJsonDatas.TryGetValue(name, out var data))
|
||||
{
|
||||
list.Add(data);
|
||||
}
|
||||
}
|
||||
|
||||
File.Delete(_uiConfig);
|
||||
File.WriteAllText(_uiConfig, JsonConvert.SerializeObject(list, Formatting.Indented));
|
||||
}
|
||||
|
||||
private void TryGetPath(ref string path, string pathName, string endsWith)
|
||||
{
|
||||
path = PlayerPrefs.GetString(pathName);
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
string[] ids = AssetDatabase.FindAssets(pathName);
|
||||
if (ids != null)
|
||||
{
|
||||
foreach (var id in ids)
|
||||
{
|
||||
var str = AssetDatabase.GUIDToAssetPath(id);
|
||||
if (str.EndsWith(endsWith))
|
||||
{
|
||||
path = str;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string GetUIScript(string name, bool tryFind = false)
|
||||
{
|
||||
if (_uiNames.TryGetValue(name, out string path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
if (!tryFind)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if (GetUIJson(name) == null) return string.Empty;
|
||||
|
||||
string[] ids = AssetDatabase.FindAssets(name);
|
||||
if (ids != null)
|
||||
{
|
||||
foreach (var id in ids)
|
||||
{
|
||||
var str = AssetDatabase.GUIDToAssetPath(id);
|
||||
if (str.EndsWith(".cs"))
|
||||
{
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private UIConfigJson GetUIJson(string name)
|
||||
{
|
||||
if (_uiJsonDatas.Count == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(_uiConfig);
|
||||
var list = JsonConvert.DeserializeObject<List<UIConfigJson>>(json);
|
||||
foreach (var item in list)
|
||||
{
|
||||
_uiJsonDatas.AddOrUpdate(item.uiType, item);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (_uiJsonDatas.TryGetValue(name, out var jsonData))
|
||||
{
|
||||
return jsonData;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string StringInputFild(string name, string endsWith)
|
||||
{
|
||||
string value = PlayerPrefs.GetString(name);
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(endsWith))
|
||||
{
|
||||
PlayerPrefs.SetString(name, endsWith);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
endsWith = value;
|
||||
}
|
||||
|
||||
return EditorGUILayout.TextField(name, endsWith);
|
||||
}
|
||||
|
||||
private void PathField(string name, ref string path, string pathName, string endsWith)
|
||||
{
|
||||
var obj = EditorGUILayout.ObjectField(name, AssetDatabase.LoadAssetAtPath(path, typeof(TextAsset)),
|
||||
typeof(TextAsset), true);
|
||||
if (obj != null)
|
||||
{
|
||||
var newPath = AssetDatabase.GetAssetPath(obj);
|
||||
if (newPath.EndsWith(endsWith) && !newPath.Equals(path))
|
||||
{
|
||||
path = newPath;
|
||||
PlayerPrefs.SetString(pathName, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Mask
|
||||
|
||||
public void Mask()
|
||||
{
|
||||
// //清空主包旧数据
|
||||
AssetBundleCollectorPackage assetBundleCollectorPackage = null;
|
||||
foreach (var package in AssetBundleCollectorSettingData.Setting.Packages)
|
||||
{
|
||||
if (package.PackageName == _packageName)
|
||||
{
|
||||
assetBundleCollectorPackage = package;
|
||||
}
|
||||
}
|
||||
|
||||
if (assetBundleCollectorPackage == null)
|
||||
{
|
||||
var setting = YooAsset.Editor.AssetBundleCollectorSettingData.Setting;
|
||||
setting.ShowPackageView = true;
|
||||
setting.UniqueBundleName = true;
|
||||
//创建Package文件
|
||||
assetBundleCollectorPackage = YooAsset.Editor.AssetBundleCollectorSettingData.CreatePackage(_packageName);
|
||||
}
|
||||
|
||||
//检测Packages是否存在TestPackage
|
||||
assetBundleCollectorPackage.PackageName = _packageName;
|
||||
assetBundleCollectorPackage.EnableAddressable = false;
|
||||
assetBundleCollectorPackage.IncludeAssetGUID = true;
|
||||
assetBundleCollectorPackage.AutoCollectShaders = true;
|
||||
assetBundleCollectorPackage.IgnoreRuleName = "NormalIgnoreRule";
|
||||
|
||||
//标记json配置文件
|
||||
if (!string.IsNullOrEmpty(_uiConfig))
|
||||
{
|
||||
var collectorGroup = ReflectionHelper.RemoveGroup(assetBundleCollectorPackage, "Config");
|
||||
var guid = ReflectionHelper.GetGUIDByRelativePath(_uiConfig);
|
||||
AssetBundleCollector collector = new AssetBundleCollector()
|
||||
{
|
||||
CollectPath = _uiConfig,
|
||||
CollectorGUID = guid,
|
||||
CollectorType = ECollectorType.MainAssetCollector,
|
||||
AddressRuleName = nameof(AddressByFolderAndFileName),
|
||||
};
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(collectorGroup, collector);
|
||||
}
|
||||
|
||||
//标记预制体
|
||||
foreach (var data in _uiJsonDatas)
|
||||
{
|
||||
var collectorGroup = ReflectionHelper.RemoveGroup(assetBundleCollectorPackage, "Prefab");
|
||||
|
||||
|
||||
var guid = ReflectionHelper.GetGUIDByRelativePath(data.Value.path);
|
||||
AssetBundleCollector collector = new AssetBundleCollector()
|
||||
{
|
||||
CollectPath = data.Value.path,
|
||||
CollectorGUID = guid,
|
||||
CollectorType = ECollectorType.MainAssetCollector,
|
||||
AddressRuleName = nameof(AddressByFolderAndFileName),
|
||||
AssetTags = data.Value.uiLayer.ToString(),
|
||||
};
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(collectorGroup, collector);
|
||||
}
|
||||
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.SaveFile();
|
||||
|
||||
Debug.Log("MarkAsset Successful");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static class ReflectionHelper
|
||||
{
|
||||
public static IEnumerable<T> CreateAllInstancesOf<T>()
|
||||
{
|
||||
return typeof(ReflectionHelper).Assembly.GetTypes() //获取当前类库下所有类型
|
||||
.Where(t => typeof(T).IsAssignableFrom(t)) //获取间接或直接继承t的所有类型
|
||||
.Where(t => !t.IsAbstract && t.IsClass) //获取非抽象类 排除接口继承
|
||||
.Select(t => (T)Activator.CreateInstance(t)); //创造实例,并返回结果(项目需求,可删除)
|
||||
}
|
||||
|
||||
// 新增方法:专门用于查找UIView类型的所有实现类
|
||||
public static IEnumerable<Type> GetAllUIViewTypes()
|
||||
{
|
||||
// 查找所有程序集中的UIView类型实现
|
||||
var uiviewType = typeof(UIView);
|
||||
List<Type> result = new List<Type>();
|
||||
|
||||
// 遍历所有已加载的程序集
|
||||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
try
|
||||
{
|
||||
result.AddRange(assembly.GetTypes()
|
||||
.Where(t => uiviewType.IsAssignableFrom(t))
|
||||
.Where(t => !t.IsAbstract && t.IsClass));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// 忽略无法访问的程序集
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据相对路径获取资源的GUID
|
||||
/// </summary>
|
||||
/// <param name="relativePath">相对于Assets目录的路径,例如:"Assets/UI/Prefabs/LoginPanel.prefab"</param>
|
||||
/// <returns>资源的GUID字符串,如果路径无效则返回空字符串</returns>
|
||||
public static string GetGUIDByRelativePath(string relativePath)
|
||||
{
|
||||
// 检查路径是否为空
|
||||
if (string.IsNullOrEmpty(relativePath))
|
||||
{
|
||||
Debug.LogError("相对路径不能为空");
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// 检查路径是否存在
|
||||
if (!AssetDatabase.IsValidFolder(Path.GetDirectoryName(relativePath)) &&
|
||||
!System.IO.File.Exists(Path.Combine(Application.dataPath, relativePath.Replace("Assets/", ""))))
|
||||
{
|
||||
Debug.LogError(string.Format("路径不存在: {0}", relativePath));
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// 获取GUID
|
||||
string guid = AssetDatabase.AssetPathToGUID(relativePath);
|
||||
|
||||
if (string.IsNullOrEmpty(guid))
|
||||
{
|
||||
Debug.LogWarning(string.Format("无法获取路径的GUID: {0}", relativePath));
|
||||
}
|
||||
|
||||
return guid;
|
||||
}
|
||||
|
||||
public static AssetBundleCollectorGroup RemoveGroup(AssetBundleCollectorPackage package, string groupName)
|
||||
{
|
||||
//删除的Group
|
||||
var groupToDelete = package.Groups.FirstOrDefault(g => g.GroupName == groupName);
|
||||
|
||||
if (groupToDelete == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError($"在Package中未找到Group '{groupName}'!");
|
||||
}
|
||||
|
||||
// 3. 从Package的Groups集合中删除该Group
|
||||
package.Groups.Remove(groupToDelete);
|
||||
return YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(package, groupName);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96a0d05f5869aed43bd7ab82a8bd430c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class UIXXXView : UIView
|
||||
{
|
||||
//UIControlData
|
||||
|
||||
public override void OnInit(UIControlData uIControlData, UIViewController controller)
|
||||
{
|
||||
base.OnInit(uIControlData, controller);
|
||||
}
|
||||
|
||||
public override void OnOpen(object userData)
|
||||
{
|
||||
base.OnOpen(userData);
|
||||
}
|
||||
|
||||
public override void OnAddListener()
|
||||
{
|
||||
base.OnAddListener();
|
||||
}
|
||||
|
||||
public override void OnRemoveListener()
|
||||
{
|
||||
base.OnRemoveListener();
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca37d3bfaabc8124cabb4b71f309b4c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 125226ccd07f47c5bf3b94157bf12fc3
|
||||
timeCreated: 1758179120
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6e218215da269c45b6b578b4eb0da12
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,268 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
|
||||
public enum AnchorPresets
|
||||
{
|
||||
TopLeft,
|
||||
TopCenter,
|
||||
TopRight,
|
||||
|
||||
MiddleLeft,
|
||||
MiddleCenter,
|
||||
MiddleRight,
|
||||
|
||||
BottomLeft,
|
||||
BottonCenter,
|
||||
BottomRight,
|
||||
BottomStretch,
|
||||
|
||||
VertStretchLeft,
|
||||
VertStretchRight,
|
||||
VertStretchCenter,
|
||||
|
||||
HorStretchTop,
|
||||
HorStretchMiddle,
|
||||
HorStretchBottom,
|
||||
|
||||
StretchAll
|
||||
}
|
||||
|
||||
public enum PivotPresets
|
||||
{
|
||||
TopLeft,
|
||||
TopCenter,
|
||||
TopRight,
|
||||
|
||||
MiddleLeft,
|
||||
MiddleCenter,
|
||||
MiddleRight,
|
||||
|
||||
BottomLeft,
|
||||
BottomCenter,
|
||||
BottomRight,
|
||||
}
|
||||
|
||||
public static class UIExtension
|
||||
{
|
||||
public static void SetAnchor(this RectTransform source, AnchorPresets allign, int offsetX = 0, int offsetY = 0)
|
||||
{
|
||||
source.anchoredPosition = new Vector3(offsetX, offsetY, 0);
|
||||
|
||||
switch (allign)
|
||||
{
|
||||
case (AnchorPresets.TopLeft):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 1);
|
||||
source.anchorMax = new Vector2(0, 1);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.TopCenter):
|
||||
{
|
||||
source.anchorMin = new Vector2(0.5f, 1);
|
||||
source.anchorMax = new Vector2(0.5f, 1);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.TopRight):
|
||||
{
|
||||
source.anchorMin = new Vector2(1, 1);
|
||||
source.anchorMax = new Vector2(1, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
case (AnchorPresets.MiddleLeft):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 0.5f);
|
||||
source.anchorMax = new Vector2(0, 0.5f);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.MiddleCenter):
|
||||
{
|
||||
source.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
source.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.MiddleRight):
|
||||
{
|
||||
source.anchorMin = new Vector2(1, 0.5f);
|
||||
source.anchorMax = new Vector2(1, 0.5f);
|
||||
break;
|
||||
}
|
||||
|
||||
case (AnchorPresets.BottomLeft):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 0);
|
||||
source.anchorMax = new Vector2(0, 0);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.BottonCenter):
|
||||
{
|
||||
source.anchorMin = new Vector2(0.5f, 0);
|
||||
source.anchorMax = new Vector2(0.5f, 0);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.BottomRight):
|
||||
{
|
||||
source.anchorMin = new Vector2(1, 0);
|
||||
source.anchorMax = new Vector2(1, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
case (AnchorPresets.HorStretchTop):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 1);
|
||||
source.anchorMax = new Vector2(1, 1);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.HorStretchMiddle):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 0.5f);
|
||||
source.anchorMax = new Vector2(1, 0.5f);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.HorStretchBottom):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 0);
|
||||
source.anchorMax = new Vector2(1, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
case (AnchorPresets.VertStretchLeft):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 0);
|
||||
source.anchorMax = new Vector2(0, 1);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.VertStretchCenter):
|
||||
{
|
||||
source.anchorMin = new Vector2(0.5f, 0);
|
||||
source.anchorMax = new Vector2(0.5f, 1);
|
||||
break;
|
||||
}
|
||||
case (AnchorPresets.VertStretchRight):
|
||||
{
|
||||
source.anchorMin = new Vector2(1, 0);
|
||||
source.anchorMax = new Vector2(1, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
case (AnchorPresets.StretchAll):
|
||||
{
|
||||
source.anchorMin = new Vector2(0, 0);
|
||||
source.anchorMax = new Vector2(1, 1);
|
||||
source.sizeDelta = Vector2.zero;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetPivot(this RectTransform source, PivotPresets preset)
|
||||
{
|
||||
|
||||
switch (preset)
|
||||
{
|
||||
case (PivotPresets.TopLeft):
|
||||
{
|
||||
source.pivot = new Vector2(0, 1);
|
||||
break;
|
||||
}
|
||||
case (PivotPresets.TopCenter):
|
||||
{
|
||||
source.pivot = new Vector2(0.5f, 1);
|
||||
break;
|
||||
}
|
||||
case (PivotPresets.TopRight):
|
||||
{
|
||||
source.pivot = new Vector2(1, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
case (PivotPresets.MiddleLeft):
|
||||
{
|
||||
source.pivot = new Vector2(0, 0.5f);
|
||||
break;
|
||||
}
|
||||
case (PivotPresets.MiddleCenter):
|
||||
{
|
||||
source.pivot = new Vector2(0.5f, 0.5f);
|
||||
break;
|
||||
}
|
||||
case (PivotPresets.MiddleRight):
|
||||
{
|
||||
source.pivot = new Vector2(1, 0.5f);
|
||||
break;
|
||||
}
|
||||
|
||||
case (PivotPresets.BottomLeft):
|
||||
{
|
||||
source.pivot = new Vector2(0, 0);
|
||||
break;
|
||||
}
|
||||
case (PivotPresets.BottomCenter):
|
||||
{
|
||||
source.pivot = new Vector2(0.5f, 0);
|
||||
break;
|
||||
}
|
||||
case (PivotPresets.BottomRight):
|
||||
{
|
||||
source.pivot = new Vector2(1, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static CanvasGroup CreateBlackMask(Transform parent, float alpha = 0, string name = null)
|
||||
{
|
||||
GameObject maskGo = new GameObject("Black Mask");
|
||||
RectTransform rectTransform = maskGo.AddComponent<RectTransform>();
|
||||
rectTransform.SetParentEx(parent);
|
||||
rectTransform.anchorMin = Vector2.zero;
|
||||
rectTransform.anchorMax = Vector2.one;
|
||||
Image image = maskGo.AddComponent<Image>();
|
||||
image.color = Color.black;
|
||||
image.raycastTarget = false;
|
||||
CanvasGroup canvasGroup = maskGo.AddComponent<CanvasGroup>();
|
||||
canvasGroup.alpha = alpha;
|
||||
if(name != null)
|
||||
canvasGroup.name = name;
|
||||
return canvasGroup;
|
||||
}
|
||||
|
||||
public static Canvas CreateLayerCanvas(UILayer layer, bool is3D, Transform parent, Camera camera, float width, float height)
|
||||
{
|
||||
GameObject canvasGo = new GameObject(layer.ToString());
|
||||
RectTransform rectTransform = canvasGo.AddComponent<RectTransform>();
|
||||
rectTransform.SetParentEx(parent);
|
||||
rectTransform.anchorMin = Vector2.zero;
|
||||
rectTransform.anchorMax = Vector2.one;
|
||||
canvasGo.layer = is3D ? Layer.Default : Layer.UI;
|
||||
Canvas canvas = canvasGo.AddComponent<Canvas>();
|
||||
canvas.renderMode = is3D ? RenderMode.WorldSpace : RenderMode.ScreenSpaceCamera;
|
||||
canvas.overrideSorting = true;
|
||||
canvas.sortingOrder = (int)layer;
|
||||
canvas.worldCamera = camera;
|
||||
canvas.pixelPerfect = false;
|
||||
CanvasScaler canvasScaler = canvasGo.AddComponent<CanvasScaler>();
|
||||
canvasScaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
canvasScaler.referenceResolution = new Vector2(height,width);
|
||||
canvasScaler.screenMatchMode = CanvasScaler.ScreenMatchMode.Expand;
|
||||
|
||||
canvasGo.AddComponent<GraphicRaycaster>();
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为方便统一处理点击音效等
|
||||
/// </summary>
|
||||
public static void AddClick(this Button button, UnityAction callback)
|
||||
{
|
||||
button.onClick.AddListener(callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b521dcf8e49760e4fa28db6a6436ebc3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab9e1d815209d5e469824bfa1bbc399c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public static class Layer
|
||||
{
|
||||
public const int Default = 0;
|
||||
public const int TransparentFX = 1;
|
||||
public const int IgnoreRaycast = 2;
|
||||
public const int Water = 4;
|
||||
public const int UI = 5;
|
||||
public const int UIRenderToTarget = 6;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f57fecb20b667bb45a6240fd6b16fc80
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,65 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public static class ObjectExtension
|
||||
{
|
||||
private static readonly List<Transform> s_CachedTransforms = new List<Transform>();
|
||||
|
||||
public static T GetOrAddComponent<T>(this Component obj) where T : Component
|
||||
{
|
||||
return obj.gameObject.GetOrAddComponent<T>();
|
||||
}
|
||||
|
||||
public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component
|
||||
{
|
||||
T t = gameObject.GetComponent<T>();
|
||||
if (t == null)
|
||||
t = gameObject.AddComponent<T>();
|
||||
return t;
|
||||
}
|
||||
|
||||
public static Component GetOrAddComponent(this Component obj, Type type)
|
||||
{
|
||||
return obj.gameObject.GetOrAddComponent(type);
|
||||
}
|
||||
|
||||
public static Component GetOrAddComponent(this GameObject gameObject, Type type)
|
||||
{
|
||||
if (gameObject == null) return null;
|
||||
|
||||
Component component = gameObject.GetComponent(type);
|
||||
if (component == null)
|
||||
component = gameObject.AddComponent(type);
|
||||
return component;
|
||||
}
|
||||
|
||||
public static void SetParentEx(this Transform transform, Transform parent)
|
||||
{
|
||||
transform.SetParent(parent);
|
||||
transform.localPosition = Vector3.zero;
|
||||
transform.localRotation = Quaternion.identity;
|
||||
transform.localScale = Vector3.one;
|
||||
}
|
||||
|
||||
public static void SetLayerRecursively(this GameObject gameObject, int layer)
|
||||
{
|
||||
gameObject.GetComponentsInChildren(true, s_CachedTransforms);
|
||||
for (int i = 0; i < s_CachedTransforms.Count; i++)
|
||||
{
|
||||
s_CachedTransforms[i].gameObject.layer = layer;
|
||||
}
|
||||
s_CachedTransforms.Clear();
|
||||
}
|
||||
|
||||
public static void AddOrUpdate<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, TValue value)
|
||||
{
|
||||
if (dict.ContainsKey(key))
|
||||
dict[key] = value;
|
||||
else
|
||||
dict.Add(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1255735e746b217478dc63262723567a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,194 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public static class Pool
|
||||
{
|
||||
public readonly static List<PoolBase> AllPool = new List<PoolBase>();
|
||||
|
||||
public static void ReleaseAll()
|
||||
{
|
||||
foreach (var pool in AllPool)
|
||||
{
|
||||
pool.Dispose();
|
||||
}
|
||||
AllPool.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public interface IObject
|
||||
{
|
||||
void OnRelease();
|
||||
}
|
||||
|
||||
public interface PoolBase
|
||||
{
|
||||
void Dispose();
|
||||
}
|
||||
|
||||
public class ObjectPool<T> : PoolBase where T : new()
|
||||
{
|
||||
private static ObjectPool<T> Instance;
|
||||
|
||||
private Stack<T> _pool;
|
||||
|
||||
private ObjectPool() { }
|
||||
|
||||
|
||||
private static void Init()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = new ObjectPool<T>();
|
||||
Instance._pool = new Stack<T>();
|
||||
Pool.AllPool.Add(Instance);
|
||||
}
|
||||
}
|
||||
|
||||
public static T Get()
|
||||
{
|
||||
Init();
|
||||
|
||||
if (Instance._pool.Count > 0)
|
||||
{
|
||||
return Instance._pool.Pop();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Release(T obj)
|
||||
{
|
||||
if (obj == null || Instance == null) return;
|
||||
|
||||
if (obj is IObject interfac)
|
||||
{
|
||||
interfac.OnRelease();
|
||||
}
|
||||
Instance._pool.Push(obj);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Instance != null)
|
||||
{
|
||||
if (Instance._pool != null)
|
||||
{
|
||||
Instance._pool.Clear();
|
||||
Instance._pool = null;
|
||||
}
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ListPool<T> : PoolBase
|
||||
{
|
||||
private static ListPool<T> Instance;
|
||||
|
||||
private Stack<List<T>> _pool;
|
||||
|
||||
private ListPool() { }
|
||||
|
||||
private static void Init()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = new ListPool<T>();
|
||||
Instance._pool = new Stack<List<T>>();
|
||||
Pool.AllPool.Add(Instance);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<T> Get()
|
||||
{
|
||||
Init();
|
||||
|
||||
if (Instance._pool.Count > 0)
|
||||
{
|
||||
return Instance._pool.Pop();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<T>();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Release(List<T> list)
|
||||
{
|
||||
if (list == null || Instance == null) return;
|
||||
list.Clear();
|
||||
Instance._pool.Push(list);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Instance != null)
|
||||
{
|
||||
if (Instance._pool != null)
|
||||
{
|
||||
Instance._pool.Clear();
|
||||
Instance._pool = null;
|
||||
}
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DictionaryPool<Key, Value> : PoolBase
|
||||
{
|
||||
private static DictionaryPool<Key, Value> Instance;
|
||||
|
||||
private Stack<Dictionary<Key, Value>> _pool;
|
||||
|
||||
private DictionaryPool() { }
|
||||
|
||||
private static void Init()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = new DictionaryPool<Key, Value>();
|
||||
Instance._pool = new Stack<Dictionary<Key, Value>>();
|
||||
Pool.AllPool.Add(Instance);
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<Key, Value> Get()
|
||||
{
|
||||
Init();
|
||||
|
||||
if (Instance._pool.Count > 0)
|
||||
{
|
||||
return Instance._pool.Pop();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Dictionary<Key, Value>();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Release(Dictionary<Key, Value> dict)
|
||||
{
|
||||
if (dict == null || Instance == null) return;
|
||||
dict.Clear();
|
||||
Instance._pool.Push(dict);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Instance != null)
|
||||
{
|
||||
if (Instance._pool != null)
|
||||
{
|
||||
Instance._pool.Clear();
|
||||
Instance._pool = null;
|
||||
}
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59e9f74cfa6aa344c91bcdcc6db78ac6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,140 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class PrefabPool
|
||||
{
|
||||
/// <summary>
|
||||
/// 如果名字一样,则使用同一个池子
|
||||
/// </summary>
|
||||
public static Dictionary<string, PrefabPool> s_Pools = new Dictionary<string, PrefabPool>();
|
||||
|
||||
private string _poolName;
|
||||
private GameObject _prefab;
|
||||
private List<GameObject> _pool;
|
||||
private List<GameObject> _useList;
|
||||
|
||||
public GameObject Prefab => _prefab;
|
||||
public List<GameObject> UseList => _useList;
|
||||
|
||||
private PrefabPool() { }
|
||||
|
||||
private void Init(string poolName, GameObject prefab)
|
||||
{
|
||||
_pool = ListPool<GameObject>.Get();
|
||||
_useList = ListPool<GameObject>.Get();
|
||||
_prefab = prefab;
|
||||
_poolName = poolName;
|
||||
}
|
||||
|
||||
public static PrefabPool Get(string poolName)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(poolName))
|
||||
{
|
||||
if (s_Pools.TryGetValue(poolName, out var prefabPool))
|
||||
{
|
||||
return prefabPool;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static PrefabPool Create(GameObject prefab, string poolName = null)
|
||||
{
|
||||
if (prefab == null) return null;
|
||||
if (!string.IsNullOrEmpty(poolName))
|
||||
{
|
||||
if (s_Pools.TryGetValue(poolName, out var prefabPool))
|
||||
{
|
||||
return prefabPool;
|
||||
}
|
||||
}
|
||||
var pool = new PrefabPool();
|
||||
pool.Init(poolName, prefab);
|
||||
if (!string.IsNullOrEmpty(poolName))
|
||||
{
|
||||
s_Pools.Add(poolName, pool);
|
||||
}
|
||||
return pool;
|
||||
}
|
||||
|
||||
public GameObject Get(Transform parent = null)
|
||||
{
|
||||
if (_prefab == null) return null;
|
||||
|
||||
GameObject go = null;
|
||||
if (_pool.Count > 0)
|
||||
{
|
||||
go = _pool[0];
|
||||
_pool.RemoveAt(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
go = GameObject.Instantiate(_prefab);
|
||||
}
|
||||
go.transform.parent = parent;
|
||||
go.transform.localScale = Vector3.one;
|
||||
go.transform.localPosition = Vector3.zero;
|
||||
go.transform.localRotation = Quaternion.identity;
|
||||
go.SetActive(true);
|
||||
go.transform.SetAsLastSibling();
|
||||
_useList.Add(go);
|
||||
return go;
|
||||
}
|
||||
|
||||
public void Recycle(GameObject go)
|
||||
{
|
||||
if (go != null)
|
||||
{
|
||||
go.SetActive(false);
|
||||
_pool.Add(go);
|
||||
_useList.Remove(go);
|
||||
}
|
||||
}
|
||||
|
||||
public void RecycleUseList()
|
||||
{
|
||||
foreach (var go in _useList)
|
||||
{
|
||||
if (go != null)
|
||||
{
|
||||
go.SetActive(false);
|
||||
_pool.Add(go);
|
||||
}
|
||||
}
|
||||
_useList.Clear();
|
||||
}
|
||||
|
||||
public void Destroy()
|
||||
{
|
||||
foreach (var go in _pool)
|
||||
{
|
||||
if (go != null)
|
||||
{
|
||||
GameObject.Destroy(go);
|
||||
}
|
||||
}
|
||||
_pool.Clear();
|
||||
foreach (var go in _useList)
|
||||
{
|
||||
if (go != null)
|
||||
{
|
||||
GameObject.Destroy(go);
|
||||
}
|
||||
}
|
||||
_useList.Clear();
|
||||
|
||||
ListPool<GameObject>.Release(_pool);
|
||||
ListPool<GameObject>.Release(_useList);
|
||||
|
||||
s_Pools.Remove(_poolName);
|
||||
|
||||
_pool = null;
|
||||
_useList = null;
|
||||
_prefab = null;
|
||||
_poolName = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02cdac12da067fa479f36e34fafd0987
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,71 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class Singleton<T> where T : new()
|
||||
{
|
||||
private static T _ServiceContext;
|
||||
private readonly static object lockObj = new object();
|
||||
|
||||
/// <summary>
|
||||
/// 禁止外部进行实例化
|
||||
/// </summary>
|
||||
protected Singleton()
|
||||
{
|
||||
OnInitialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取唯一实例,双锁定防止多线程并发时重复创建实例
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ServiceContext == null)
|
||||
{
|
||||
lock (lockObj)
|
||||
{
|
||||
if (_ServiceContext == null)
|
||||
{
|
||||
_ServiceContext = new T();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _ServiceContext;
|
||||
}
|
||||
}
|
||||
public virtual void OnInitialize() { }
|
||||
|
||||
public void Init() { }
|
||||
}
|
||||
|
||||
|
||||
public class SingletonMono<T> : MonoBehaviour where T : MonoBehaviour
|
||||
{
|
||||
private static T _instance;
|
||||
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = (T)FindObjectOfType(typeof(T));
|
||||
if (_instance == null)
|
||||
{
|
||||
GameObject singleton = new GameObject();
|
||||
_instance = singleton.AddComponent<T>();
|
||||
singleton.name = typeof(T).ToString();
|
||||
DontDestroyOnLoad(singleton);
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnDestroy()
|
||||
{
|
||||
_instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26a0ecd7bd1fa9441a7229d39408180c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,52 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class TreeNode
|
||||
{
|
||||
public Dictionary<ulong, TreeNode> childs;
|
||||
public ulong id;
|
||||
public object data;
|
||||
|
||||
public TreeNode Get(ulong id)
|
||||
{
|
||||
if (childs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
childs.TryGetValue(id, out var node);
|
||||
return node;
|
||||
}
|
||||
|
||||
public TreeNode GetOrAdd(ulong id)
|
||||
{
|
||||
if (childs == null)
|
||||
{
|
||||
childs = new Dictionary<ulong, TreeNode>();
|
||||
}
|
||||
if (!childs.TryGetValue(id, out var node))
|
||||
{
|
||||
node = ObjectPool<TreeNode>.Get();
|
||||
node.id = id;
|
||||
childs.Add(id, node);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
public void CleanUp()
|
||||
{
|
||||
if (childs != null)
|
||||
{
|
||||
foreach (var item in childs.Values)
|
||||
{
|
||||
item.CleanUp();
|
||||
ObjectPool<TreeNode>.Release(item);
|
||||
}
|
||||
childs.Clear();
|
||||
}
|
||||
id = 0;
|
||||
data = default;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc97d6286a198a946a032cc4fa7fe2cf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1c08d26fe3fa4740b2a4398ea9ee65b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,135 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SkierFramework
|
||||
{
|
||||
public class InstancePool
|
||||
{
|
||||
private static string GameObjectName = "GameObjectPool";
|
||||
private static string RecycleName = "RecyclePool";
|
||||
private Dictionary<string, Stack<GameObject>> _allInstances = new Dictionary<string, Stack<GameObject>>();
|
||||
private Transform _instancePoolTransRoot = null;
|
||||
private Transform _recyclePoolTransRoot = null;
|
||||
|
||||
public InstancePool()
|
||||
{
|
||||
var go = new GameObject(GameObjectName);
|
||||
GameObject.DontDestroyOnLoad(go);
|
||||
|
||||
_instancePoolTransRoot = go.transform;
|
||||
go.SetActive(true);
|
||||
|
||||
_recyclePoolTransRoot = _instancePoolTransRoot.Find(RecycleName);
|
||||
if (_recyclePoolTransRoot == null)
|
||||
{
|
||||
_recyclePoolTransRoot = new GameObject(RecycleName).transform;
|
||||
_recyclePoolTransRoot.SetParent(_instancePoolTransRoot);
|
||||
}
|
||||
|
||||
_recyclePoolTransRoot.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public GameObject Get(string key)
|
||||
{
|
||||
Stack<GameObject> objects = null;
|
||||
if (!_allInstances.TryGetValue(key, out objects))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objects == null || objects.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return objects.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
public void Recycle(string key, GameObject obj, bool forceDestroy = false)
|
||||
{
|
||||
//强制删除
|
||||
if (forceDestroy)
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GameObject.Destroy(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameObject.DestroyImmediate(obj);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Stack<GameObject> objects = null;
|
||||
if (!_allInstances.TryGetValue(key, out objects))
|
||||
{
|
||||
objects = new Stack<GameObject>();
|
||||
_allInstances[key] = objects;
|
||||
}
|
||||
|
||||
InitInst(obj, false);
|
||||
objects.Push(obj);
|
||||
}
|
||||
|
||||
public void Clear(string key)
|
||||
{
|
||||
Stack<GameObject> objects = null;
|
||||
if (_allInstances.TryGetValue(key, out objects))
|
||||
{
|
||||
while (objects.Count > 0)
|
||||
{
|
||||
GameObject objToDestroy = objects.Pop();
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GameObject.Destroy(objToDestroy);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameObject.DestroyImmediate(objToDestroy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearAll()
|
||||
{
|
||||
foreach (var item in _allInstances)
|
||||
{
|
||||
while (item.Value.Count > 0)
|
||||
{
|
||||
GameObject objToDestroy = item.Value.Pop();
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GameObject.Destroy(objToDestroy);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameObject.DestroyImmediate(objToDestroy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_allInstances.Clear();
|
||||
}
|
||||
|
||||
public void InitInst(GameObject inst, bool active = true)
|
||||
{
|
||||
if (inst != null)
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
inst.transform.SetParent(_instancePoolTransRoot, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
inst.transform.SetParent(_recyclePoolTransRoot, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b78b11e8c4a134f478ab61d5c6334deb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||