Compare commits
8 Commits
versions/1
...
versions/1
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b721be77c | |||
| 35fbb762cc | |||
| 8b6861c100 | |||
| a2016ee01f | |||
| 2161b38432 | |||
| 65bc86a390 | |||
| ca52ce93d2 | |||
| faca20e535 |
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
obj/*
|
||||
Logs/*
|
||||
Temp/*
|
||||
Library/*
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f389d2b939cbc428181e66d788a3c509
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a296b112d7567477783e9c16409b3db5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/FeatureTests/11_trimming.fla
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec6ecc878c78246c7b2dda1979aae2c2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,9 @@
|
||||
###### Version 1.3.15
|
||||
* Add optional bitmap trimming
|
||||
* Fix preview leaks in the Editor mode
|
||||
* Add warning notes about outdated assets
|
||||
* Add log message about successfully converting
|
||||
|
||||
###### Version 1.3.14
|
||||
* Fix 2018.3.2f1 compilation
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
@@ -1,17 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e336e165518cf4d8680e2fff9c6b59ba
|
||||
timeCreated: 1514922180
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
@@ -21,37 +22,54 @@ TextureImporter:
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 16
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -25,24 +25,24 @@ MonoBehaviour:
|
||||
IndexCount: 126
|
||||
Vertices:
|
||||
- {x: 0.093291655, y: -0.5527766}
|
||||
- {x: 0.5906427, y: -0.49855503}
|
||||
- {x: 0.59064275, y: -0.49855503}
|
||||
- {x: 0.5825955, y: -0.7595181}
|
||||
- {x: 0.08524446, y: -0.81373966}
|
||||
- {x: 0.6724206, y: -0.36256573}
|
||||
- {x: 0.8942103, y: -0.48526812}
|
||||
- {x: 0.7557899, y: -0.7355155}
|
||||
- {x: 0.75578994, y: -0.7355155}
|
||||
- {x: 0.5340002, y: -0.6128131}
|
||||
- {x: 0.66955954, y: -0.7525534}
|
||||
- {x: 0.8318795, y: -0.6832502}
|
||||
- {x: 0.8691911, y: -0.79836786}
|
||||
- {x: 0.70687115, y: -0.8676711}
|
||||
- {x: 0.70687115, y: -0.867671}
|
||||
- {x: 0.43360725, y: -0.12802117}
|
||||
- {x: 0.88885266, y: -0.18992838}
|
||||
- {x: 0.80472267, y: -0.8087083}
|
||||
- {x: 0.3494773, y: -0.7468011}
|
||||
- {x: 0.3494773, y: -0.74680114}
|
||||
- {x: 0.37824008, y: -0.69763076}
|
||||
- {x: 0.49014634, y: -0.8738549}
|
||||
- {x: 0.38391614, y: -0.941326}
|
||||
- {x: 0.49014637, y: -0.8738549}
|
||||
- {x: 0.38391614, y: -0.9413261}
|
||||
- {x: 0.27200988, y: -0.76510197}
|
||||
- {x: 0.4438706, y: -0.5868737}
|
||||
- {x: 0.56574404, y: -0.6853528}
|
||||
@@ -58,20 +58,20 @@ MonoBehaviour:
|
||||
- {x: 0.4520743, y: -0.45683625}
|
||||
- {x: 0.86364335, y: -0.09722355}
|
||||
- {x: 0.96060354, y: -0.09934438}
|
||||
- {x: 0.9590185, y: -0.17182186}
|
||||
- {x: 0.95901847, y: -0.17182186}
|
||||
- {x: 0.86205834, y: -0.16970102}
|
||||
- {x: 0.5517408, y: -0.22355518}
|
||||
- {x: 1.0120615, y: -0.23362388}
|
||||
- {x: 1.0079622, y: -0.42106485}
|
||||
- {x: 0.54764163, y: -0.41099614}
|
||||
- {x: 1.0079623, y: -0.42106485}
|
||||
- {x: 0.54764163, y: -0.41099617}
|
||||
- {x: 0.49390063, y: -0.07256326}
|
||||
- {x: 1.039184, y: -0.08449037}
|
||||
- {x: 1.032505, y: -0.38989362}
|
||||
- {x: 0.48722172, y: -0.3779665}
|
||||
- {x: 0.48722172, y: -0.37796652}
|
||||
- {x: 0.6388158, y: -0.13516656}
|
||||
- {x: 0.7662644, y: -0.13795426}
|
||||
- {x: 0.7637611, y: -0.25242078}
|
||||
- {x: 0.63631254, y: -0.24963307}
|
||||
- {x: 0.63631254, y: -0.24963306}
|
||||
- {x: 0.69845474, y: -0.20390525}
|
||||
- {x: 0.7184471, y: -0.20434254}
|
||||
- {x: 0.7180098, y: -0.22433674}
|
||||
@@ -83,32 +83,32 @@ MonoBehaviour:
|
||||
- {x: 0.6183724, y: -0.18158044}
|
||||
- {x: 0.7728118, y: -0.18495853}
|
||||
- {x: 0.77112836, y: -0.26193565}
|
||||
- {x: 0.61668897, y: -0.2585576}
|
||||
- {x: 0.61668897, y: -0.25855756}
|
||||
- {x: 0.6127337, y: -0.099736005}
|
||||
- {x: 0.7977926, y: -0.10378384}
|
||||
- {x: 0.79564387, y: -0.20203815}
|
||||
- {x: 0.610585, y: -0.19799031}
|
||||
- {x: 0.507205, y: -0.11742941}
|
||||
- {x: 1.0924743, y: -0.13023114}
|
||||
- {x: 1.0924745, y: -0.13023114}
|
||||
- {x: 1.088419, y: -0.31567165}
|
||||
- {x: 0.50314957, y: -0.30286992}
|
||||
- {x: 0.42519823, y: -0.00019747685}
|
||||
- {x: 0.9140025, y: -0.010889203}
|
||||
- {x: 0.90442663, y: -0.44875968}
|
||||
- {x: 0.9140024, y: -0.010889203}
|
||||
- {x: 0.9044266, y: -0.44875968}
|
||||
- {x: 0.41562238, y: -0.43806794}
|
||||
- {x: 0.4386289, y: -0.40727332}
|
||||
- {x: 0.5306043, y: -0.40566462}
|
||||
- {x: 0.53292096, y: -0.5381406}
|
||||
- {x: 0.44094557, y: -0.53974926}
|
||||
- {x: 0.44094557, y: -0.5397493}
|
||||
- {x: 0.46142825, y: -0.5042712}
|
||||
- {x: 0.6632915, y: -0.4016091}
|
||||
- {x: 0.7555196, y: -0.58299005}
|
||||
- {x: 0.5536564, y: -0.68565214}
|
||||
- {x: 0.029411115, y: -0.035497963}
|
||||
- {x: 0.97329503, y: -0.035497963}
|
||||
- {x: 0.97329503, y: -0.8919796}
|
||||
- {x: 0.9732951, y: -0.035497963}
|
||||
- {x: 0.9732951, y: -0.8919796}
|
||||
- {x: 0.029411115, y: -0.8919796}
|
||||
UVs: 0000ffbfff19fff1ff56ff37ff73ff50ff1affecff26fffe0000ff5eff3dff8cff1affbfff27ffd4ff52ff76ff65ff87ff56ff51ff66ff59ff67ff5eff72ff7bff76ff0fff7dff19ff3eff5eff51ff8cff560000ff75ff36ff73ff5eff7eff6bff7aff1aff7cff1cff76ff1aff79ff1cff760000ff7eff0eff1affd5ff26ffebff2cff8dff3fffc80000ff8dff2bffbeff67ff51ff74ff5aff52ff5eff66ff7500000000ff55ff5d
|
||||
UVs: 0000ffbfff19fff1ff56ff37ff73ff50ff1affd5ff26ffe70000ff5eff3dff8cff1affbfff27ffd4ff52ff76ff65ff87ff56ff51ff66ff59ff67ff5eff72ff7bff76ff0fff7dff19ff3eff5eff51ff8cff560000ff75ff36ff74ff37ff7fff44ff7aff1aff7cff1cff76ff1aff79ff1cff760000ff7eff0eff73ff5eff7fff74ff2cff8dff3fffc80000ff8dff2bffbeff67ff51ff74ff5aff52ff5eff66ff7500000000ff55ff5d
|
||||
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200020002
|
||||
Materials:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a25723a1cd8b141a6b489606584a6f65
|
||||
timeCreated: 1494801036
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 65 KiB |
@@ -1,17 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1278c7f98af44db8a86e620305eb32b
|
||||
timeCreated: 1514922177
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
@@ -21,37 +22,54 @@ TextureImporter:
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 16
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -32,46 +32,46 @@ MonoBehaviour:
|
||||
- StartVertex: 28
|
||||
IndexCount: 156
|
||||
Vertices:
|
||||
- {x: 0.106315956, y: 0.12643726}
|
||||
- {x: 0.2629222, y: 0.12643726}
|
||||
- {x: 0.2629222, y: 0.0341479}
|
||||
- {x: 0.106315956, y: 0.0341479}
|
||||
- {x: 0.12205528, y: 0.09064017}
|
||||
- {x: 0.24796984, y: 0.09064017}
|
||||
- {x: 0.24796984, y: 0.044215832}
|
||||
- {x: 0.12205528, y: 0.044215832}
|
||||
- {x: 0.06176914, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.05434666}
|
||||
- {x: 0.06176914, y: 0.05434666}
|
||||
- {x: 0.096862756, y: 0.1299182}
|
||||
- {x: 0.1545074, y: 0.1299182}
|
||||
- {x: 0.1545074, y: 0.050229903}
|
||||
- {x: 0.096862756, y: 0.050229903}
|
||||
- {x: 0.17279011, y: 0.12516041}
|
||||
- {x: 0.19912747, y: 0.12392976}
|
||||
- {x: 0.19211169, y: 0.04833745}
|
||||
- {x: 0.16577433, y: 0.049568094}
|
||||
- {x: 0.19564708, y: 0.121027105}
|
||||
- {x: 0.23835461, y: 0.12022791}
|
||||
- {x: 0.23566528, y: 0.048127156}
|
||||
- {x: 0.10239033, y: 0.12267381}
|
||||
- {x: 0.1545074, y: 0.12267381}
|
||||
- {x: 0.1545074, y: 0.050229907}
|
||||
- {x: 0.10239033, y: 0.050229907}
|
||||
- {x: 0.17315288, y: 0.112304024}
|
||||
- {x: 0.19716635, y: 0.11118197}
|
||||
- {x: 0.19133706, y: 0.048373647}
|
||||
- {x: 0.16732359, y: 0.04949571}
|
||||
- {x: 0.19514674, y: 0.10761301}
|
||||
- {x: 0.23310898, y: 0.106902614}
|
||||
- {x: 0.23091999, y: 0.04821595}
|
||||
- {x: 0.19295773, y: 0.048926346}
|
||||
- {x: 0.20316595, y: 0.11463966}
|
||||
- {x: 0.24947853, y: 0.11463966}
|
||||
- {x: 0.24947853, y: 0.047944065}
|
||||
- {x: 0.20316595, y: 0.047944065}
|
||||
- {x: 0.20316595, y: 0.10286985}
|
||||
- {x: 0.24241391, y: 0.10286985}
|
||||
- {x: 0.24241391, y: 0.04794406}
|
||||
- {x: 0.20316595, y: 0.04794406}
|
||||
- {x: 0.06176914, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.14451343}
|
||||
- {x: 0.30489662, y: 0.05434666}
|
||||
- {x: 0.06176914, y: 0.05434666}
|
||||
- {x: 0.17883545, y: -0.33088514}
|
||||
- {x: 0.27924088, y: -0.41507185}
|
||||
- {x: 0.2792409, y: -0.41507185}
|
||||
- {x: 0.19028847, y: -0.52116114}
|
||||
- {x: 0.08988304, y: -0.43697444}
|
||||
- {x: 0.08988303, y: -0.43697444}
|
||||
- {x: 0.04699825, y: -0.5018102}
|
||||
- {x: 0.13262679, y: -0.57360697}
|
||||
- {x: 0.04558219, y: -0.67742085}
|
||||
- {x: 0.045582186, y: -0.67742085}
|
||||
- {x: -0.040046353, y: -0.60562414}
|
||||
- {x: 0.28633544, y: -0.32388517}
|
||||
- {x: 0.3912854, y: -0.4118823}
|
||||
- {x: 0.39128542, y: -0.4118823}
|
||||
- {x: 0.30582932, y: -0.5138017}
|
||||
- {x: 0.20087935, y: -0.42580456}
|
||||
- {x: 0.20087934, y: -0.42580456}
|
||||
- {x: 0.22631103, y: -0.35006085}
|
||||
- {x: 0.30587783, y: -0.41677502}
|
||||
- {x: 0.23916365, y: -0.49634182}
|
||||
@@ -98,11 +98,11 @@ MonoBehaviour:
|
||||
- {x: 0.19299999, y: -0.71853286}
|
||||
- {x: 0.315, y: -0.63199997}
|
||||
- {x: 0.45133758, y: -0.63199997}
|
||||
- {x: 0.45133758, y: -0.73108685}
|
||||
- {x: 0.315, y: -0.73108685}
|
||||
- {x: 0.45133758, y: -0.7310869}
|
||||
- {x: 0.315, y: -0.7310869}
|
||||
- {x: 0.305, y: -0.752}
|
||||
- {x: 0.44998062, y: -0.752}
|
||||
- {x: 0.44998062, y: -0.8315501}
|
||||
- {x: 0.44998065, y: -0.752}
|
||||
- {x: 0.44998065, y: -0.8315501}
|
||||
- {x: 0.305, y: -0.8315501}
|
||||
- {x: 0.337, y: -0.71599996}
|
||||
- {x: 0.442047, y: -0.71599996}
|
||||
@@ -125,17 +125,17 @@ MonoBehaviour:
|
||||
- {x: 0.5875, y: -0.65249896}
|
||||
- {x: 0.1575, y: -0.65249896}
|
||||
- {x: 0.13700001, y: 0.08049999}
|
||||
- {x: 0.65149796, y: 0.08049999}
|
||||
- {x: 0.65149796, y: -0.45499286}
|
||||
- {x: 0.13700001, y: -0.45499286}
|
||||
- {x: 0.262, y: -0.17849998}
|
||||
- {x: 0.36318973, y: -0.17849998}
|
||||
- {x: 0.36318973, y: -0.2919961}
|
||||
- {x: 0.262, y: -0.2919961}
|
||||
- {x: 0.13250002, y: -0.16}
|
||||
- {x: 0.21949664, y: -0.16}
|
||||
- {x: 0.21949664, y: -0.27586058}
|
||||
- {x: 0.13250002, y: -0.27586058}
|
||||
- {x: 0.651498, y: 0.08049999}
|
||||
- {x: 0.651498, y: -0.4549929}
|
||||
- {x: 0.13700001, y: -0.4549929}
|
||||
- {x: 0.27119905, y: -0.18795799}
|
||||
- {x: 0.36318973, y: -0.18795799}
|
||||
- {x: 0.36318973, y: -0.2825381}
|
||||
- {x: 0.27119905, y: -0.2825381}
|
||||
- {x: 0.1404088, y: -0.16827576}
|
||||
- {x: 0.21158785, y: -0.16827576}
|
||||
- {x: 0.21158785, y: -0.26758483}
|
||||
- {x: 0.1404088, y: -0.26758483}
|
||||
- {x: 0.11150001, y: -0.17449999}
|
||||
- {x: 0.52488655, y: -0.17449999}
|
||||
- {x: 0.52488655, y: -0.48745242}
|
||||
@@ -154,7 +154,7 @@ MonoBehaviour:
|
||||
- {x: 0.4270389, y: -0.5910202}
|
||||
- {x: 0.31725287, y: -0.5119459}
|
||||
- {x: 0.4556355, y: -0.5295364}
|
||||
- {x: 0.43754044, y: -0.6718882}
|
||||
- {x: 0.43754044, y: -0.67188823}
|
||||
- {x: 0.29915783, y: -0.6542977}
|
||||
- {x: 0.37866077, y: -0.5215725}
|
||||
- {x: 0.47597006, y: -0.5069908}
|
||||
@@ -162,9 +162,9 @@ MonoBehaviour:
|
||||
- {x: 0.39653975, y: -0.640886}
|
||||
- {x: 0.26679638, y: -0.53944594}
|
||||
- {x: 0.36222652, y: -0.596136}
|
||||
- {x: 0.29327887, y: -0.7122002}
|
||||
- {x: 0.19784872, y: -0.6555102}
|
||||
UVs: ffa000007ff37f63000000007f507f9a0000ff9a7f477fbfffa0ff63ffe4ff740000ffdd7f40fff80000ffbf7f3b7fdd000000007f507f9afff3ff27fffa7f2e7f437fd77f4affdcfff3ff2e7ffaff35ff4a7fd77f50ffdcffb97f75ffcbff83ff47fff17f4f7ff9fff3ff157ff9ff1ffff9ff15fffeff1cfff3ff457ff7ff4dff40fff17f47fffaff47ffb0ff4d7fbb7ffb7f207fff7f277ffc00007fffff08ff40ffdd7f507ff1ffa07f757fb97f81fff30000fffb7f15ff507f89ff6bffa27f077ff97f0dfffe00007ff9ff06fffeff3bffbf7f4dffd67fe5ff63fff67f797fcc7f75ffd8ff86fff3ff2e7ffaff35fff37f20fffa7f27ff0d7ff9ff137ffeff3b7fd7ff42ffdc
|
||||
- {x: 0.29327884, y: -0.7122002}
|
||||
- {x: 0.1978487, y: -0.6555102}
|
||||
UVs: 0000ff9a7f29ffea000000007f507f9affa00000ffe1ff20ffa07f537fd9ff62ffa07f217fd57f39ffa0ff39ffd1ff52000000007f507f9a7f1ffff77f267ffeff367ff1ff3dfff6ff297fed7f307ff4ff367ff77f3cfffcff297fccff3bffdaff0ffff77f177fffff497fcc7f4f7fd6ff307fedff357ff47f3f7fe3ff427febff427fcc7f497fd57f3c7fcc7f42ffd6ff437fdbff477fe27f3fffeb7f42fff400007feb7f0ffffeff0f7feb7f287ff7ff367fdbff3efff0ff29ff9aff447fb47f437fe37f487fe8ff29fffaff2f7fffff29ffb47f3bffcbff3bffb47f4d7fcaff297fdb7f36ffecff297fed7f307ff4ff17fff7ff1efffeff42ffd5ff48ffdaff29fff4ff307ffa
|
||||
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002
|
||||
Materials:
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@@ -1,17 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a799322aa44e44b38980bc9d307f0c38
|
||||
timeCreated: 1514922168
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
@@ -21,37 +22,54 @@ TextureImporter:
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 16
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -26,12 +26,12 @@ MonoBehaviour:
|
||||
Vertices:
|
||||
- {x: 1.139, y: -2.095}
|
||||
- {x: 1.2790855, y: -2.095}
|
||||
- {x: 1.2790855, y: -2.8981402}
|
||||
- {x: 1.139, y: -2.8981402}
|
||||
- {x: 1.2790855, y: -2.8981404}
|
||||
- {x: 1.139, y: -2.8981404}
|
||||
- {x: 1.1025, y: -1.056}
|
||||
- {x: 1.3759177, y: -1.056}
|
||||
- {x: 1.3759177, y: -2.7861564}
|
||||
- {x: 1.1025, y: -2.7861564}
|
||||
- {x: 1.3759177, y: -2.7861562}
|
||||
- {x: 1.1025, y: -2.7861562}
|
||||
- {x: 1.126, y: -1.0004998}
|
||||
- {x: 1.5205874, y: -1.0004998}
|
||||
- {x: 1.5205874, y: -2.9477496}
|
||||
@@ -42,8 +42,8 @@ MonoBehaviour:
|
||||
- {x: 0.8705, y: -2.4983816}
|
||||
- {x: 1.0625, y: -1.0354998}
|
||||
- {x: 1.3845642, y: -1.0354998}
|
||||
- {x: 1.3845642, y: -2.7268858}
|
||||
- {x: 1.0625, y: -2.7268858}
|
||||
- {x: 1.3845642, y: -2.726886}
|
||||
- {x: 1.0625, y: -2.726886}
|
||||
- {x: 1.253, y: -1.2565002}
|
||||
- {x: 1.4584018, y: -1.2565002}
|
||||
- {x: 1.4584018, y: -3.0470023}
|
||||
@@ -73,8 +73,8 @@ MonoBehaviour:
|
||||
- {x: 1.6529018, y: -2.812595}
|
||||
- {x: 1.4475, y: -2.812595}
|
||||
- {x: 0.5695001, y: 0.005499954}
|
||||
- {x: 1.5321016, y: 0.005499954}
|
||||
- {x: 1.5321016, y: -0.96880054}
|
||||
- {x: 1.5321018, y: 0.005499954}
|
||||
- {x: 1.5321018, y: -0.96880054}
|
||||
- {x: 0.5695001, y: -0.96880054}
|
||||
- {x: 1.3535, y: 0.005499954}
|
||||
- {x: 2.3156445, y: 0.005499954}
|
||||
@@ -93,8 +93,8 @@ MonoBehaviour:
|
||||
- {x: 2.5618057, y: -2.2865365}
|
||||
- {x: 1.4375, y: -2.2865365}
|
||||
- {x: 0.36249998, y: -1.4825}
|
||||
- {x: 1.4868057, y: -1.4825}
|
||||
- {x: 1.4868057, y: -2.2869847}
|
||||
- {x: 1.4868058, y: -1.4825}
|
||||
- {x: 1.4868058, y: -2.2869847}
|
||||
- {x: 0.36249998, y: -2.2869847}
|
||||
- {x: 0.7260001, y: -1.1345}
|
||||
- {x: 2.1597319, y: -1.1345}
|
||||
@@ -106,8 +106,8 @@ MonoBehaviour:
|
||||
- {x: 0.778, y: -1.8591814}
|
||||
- {x: 0.66600007, y: -0.48749998}
|
||||
- {x: 2.2209303, y: -0.48749998}
|
||||
- {x: 2.2209303, y: -1.3311706}
|
||||
- {x: 0.66600007, y: -1.3311706}
|
||||
- {x: 2.2209303, y: -1.3311707}
|
||||
- {x: 0.66600007, y: -1.3311707}
|
||||
- {x: 0.7415001, y: -0.57449996}
|
||||
- {x: 2.1793175, y: -0.57449996}
|
||||
- {x: 2.1793175, y: -1.3046691}
|
||||
@@ -137,38 +137,38 @@ MonoBehaviour:
|
||||
- {x: 0.8850208, y: -1.290926}
|
||||
- {x: 0.81250006, y: -1.290926}
|
||||
- {x: 1.7355, y: -0.92499995}
|
||||
- {x: 2.035947, y: -0.92499995}
|
||||
- {x: 2.035947, y: -1.2623844}
|
||||
- {x: 2.0359473, y: -0.92499995}
|
||||
- {x: 2.0359473, y: -1.2623844}
|
||||
- {x: 1.7355, y: -1.2623844}
|
||||
- {x: 1.8845, y: -1.153}
|
||||
- {x: 2.1408007, y: -1.153}
|
||||
- {x: 2.1408007, y: -0.79580396}
|
||||
- {x: 1.8845, y: -0.79580396}
|
||||
- {x: 1.7355, y: -0.92499995}
|
||||
- {x: 2.035947, y: -0.92499995}
|
||||
- {x: 2.035947, y: -1.2623844}
|
||||
- {x: 2.0359473, y: -0.92499995}
|
||||
- {x: 2.0359473, y: -1.2623844}
|
||||
- {x: 1.7355, y: -1.2623844}
|
||||
- {x: 0.7215001, y: -0.92499995}
|
||||
- {x: 1.1629382, y: -0.92499995}
|
||||
- {x: 1.1629382, y: -1.4857965}
|
||||
- {x: 0.7215001, y: -1.4857965}
|
||||
- {x: 1.4074999, y: -1.2465}
|
||||
- {x: 1.4563452, y: -1.2465}
|
||||
- {x: 1.4563452, y: -1.2653537}
|
||||
- {x: 1.4074999, y: -1.2653537}
|
||||
- {x: 1.4074999, y: -1.2465351}
|
||||
- {x: 1.4563452, y: -1.2465351}
|
||||
- {x: 1.4563452, y: -1.2653186}
|
||||
- {x: 1.4074999, y: -1.2653186}
|
||||
- {x: 1.3113072, y: -1.1273378}
|
||||
- {x: 1.6636108, y: -1.226211}
|
||||
- {x: 1.4024341, y: -1.3672544}
|
||||
- {x: 1.0501305, y: -1.2683811}
|
||||
- {x: 1.3955, y: -1.242}
|
||||
- {x: 1.4714679, y: -1.242}
|
||||
- {x: 1.4714679, y: -1.2697064}
|
||||
- {x: 1.3955, y: -1.2697064}
|
||||
- {x: 1.3870001, y: -1.2475}
|
||||
- {x: 1.4802694, y: -1.2475}
|
||||
- {x: 1.4802694, y: -1.2818046}
|
||||
- {x: 1.3870001, y: -1.2818046}
|
||||
UVs: 3fcd9f875fd89f89df4f7fcedf673fd23f265fd33f41dfd83f119ffaff1c7fff1f255fec9f3cdff03f5e5fd21f773fd5dfdadf85ffe5df87ff677fcebf7f3fd2bf1dffdabf387fe0df4f1fee9f5bfff21f25fff09f3c7ff53f5e5fd5df753fd83fcd1f7abfda7f873fcd9f6cbfdaff79ffb89f6cffc2bf7e1fc39f6c1fcdbf7edfda9f6cffe53f7c1fe69f6c3ff13f7c1ff5ff1edfffdf323f11bfe7bf187ffaffa29f6cbfae3f821ff5ff323fffff4600005fd31f11fff51ff500007ffedf1e3f115fd31f26dfdafffa9f6cdffe5f7e5ff19f6cdffadf7e9ffddf4e5fffdf4fbf49fff95f4e1ffedf7f7fcedf84ffd1bf3cfff05f411ff5df4f1ff39f573ff95f447f8a9f875fce000000005f8e5f8a00007f8a3f443fd37f8e0000fff47f6c
|
||||
- {x: 1.398241, y: -1.2420508}
|
||||
- {x: 1.4713373, y: -1.2420508}
|
||||
- {x: 1.4713373, y: -1.2696556}
|
||||
- {x: 1.398241, y: -1.2696556}
|
||||
- {x: 1.3873224, y: -1.2475418}
|
||||
- {x: 1.4791949, y: -1.2475418}
|
||||
- {x: 1.4791949, y: -1.2818046}
|
||||
- {x: 1.3873224, y: -1.2818046}
|
||||
UVs: 7f8eff879f99ff891f447fce1f5c3fd23f269fd03f411fd6bf585fd57f643fdadf253fe45f3dbfe81f445fd2ff5c3fd53fcdff855fd8ff873f5c7fceff733fd23f113fd83f2cbfdd9f645fd55f703fdadf25dfe85f3d5fed1f5d5fd2bf743fd53fcd7f78bfdadf853fcdff6abfda5f78ffb8ff6affc21f7d1fc3ff6a1fcd1f7ddfdaff6affe59f7adfdabf7affe55f8afff4ff1ebfffdf323f11dfddbf189ff0ffa2ff6abfae9f80fff4ff321fffff4600009fd01f113ff3fff400005ffedf1e3f119fd01f261fd81f445fd5ff471fe71fe6ff6a9fef3f7d7ffd1f473fff1f48df257ffb7f2a9fff1fe69f861feb1f8a7f3ddfe81f42ffec1f48ffe5df4f1fec1f447f8a1f875fce000000005f8e5f8a00007f8aff437fd07f8e0000dff4df6a
|
||||
AddColors: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
MulColors: 000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200000002000200020000000200020002000000020002000200010002000200020000000200020002000100020002000200010002
|
||||
Materials:
|
||||
|
||||
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
@@ -1,17 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47e46d443fd064d78ae33281e2840297
|
||||
timeCreated: 1514922172
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
@@ -21,37 +22,54 @@ TextureImporter:
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 16
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
MaxAtlasSize: 2048
|
||||
AtlasPadding: 1
|
||||
PixelsPerUnit: 100
|
||||
BitmapTrimming: 1
|
||||
GenerateMipMaps: 0
|
||||
AtlasPowerOfTwo: 1
|
||||
AtlasForceSquare: 1
|
||||
|
||||
@@ -10,7 +10,8 @@ using FTRuntime;
|
||||
namespace FTEditor.Editors {
|
||||
[CustomEditor(typeof(SwfAsset)), CanEditMultipleObjects]
|
||||
class SwfAssetEditor : Editor {
|
||||
List<SwfAsset> _assets = new List<SwfAsset>();
|
||||
bool _outdated = false;
|
||||
List<SwfAsset> _assets = new List<SwfAsset>();
|
||||
|
||||
//
|
||||
//
|
||||
@@ -129,6 +130,12 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
}
|
||||
|
||||
void DrawGUINotes() {
|
||||
if ( _outdated ) {
|
||||
SwfEditorUtils.DrawOutdatedGUINotes("SwfAsset", _assets);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Messages
|
||||
@@ -137,6 +144,7 @@ namespace FTEditor.Editors {
|
||||
|
||||
void OnEnable() {
|
||||
_assets = targets.OfType<SwfAsset>().ToList();
|
||||
_outdated = SwfEditorUtils.CheckForOutdatedAsset(_assets);
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
@@ -147,6 +155,7 @@ namespace FTEditor.Editors {
|
||||
serializedObject.Update();
|
||||
DrawDefaultInspector();
|
||||
DrawGUISettingsControls();
|
||||
DrawGUINotes();
|
||||
if ( GUI.changed ) {
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ using FTRuntime;
|
||||
namespace FTEditor.Editors {
|
||||
[CustomEditor(typeof(SwfClipAsset)), CanEditMultipleObjects]
|
||||
class SwfClipAssetEditor : Editor {
|
||||
List<SwfClipAsset> _clips = new List<SwfClipAsset>();
|
||||
bool _outdated = false;
|
||||
List<SwfClipAsset> _clips = new List<SwfClipAsset>();
|
||||
SwfClipAssetPreview _preview = null;
|
||||
|
||||
static string GetClipPath(SwfClipAsset clip) {
|
||||
return clip
|
||||
@@ -157,11 +159,30 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
|
||||
void DrawGUINotes() {
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.HelpBox(
|
||||
"Masks and blends of animation may not be displayed correctly in preview window. " +
|
||||
"Instance animation to the scene, to see how it will look like the animation in the game.",
|
||||
MessageType.Info);
|
||||
SwfEditorUtils.DrawMasksGUINotes();
|
||||
if ( _outdated ) {
|
||||
SwfEditorUtils.DrawOutdatedGUINotes("SwfClipAsset", _clips);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
void SetupPreviews() {
|
||||
ShutdownPreviews();
|
||||
_preview = new SwfClipAssetPreview();
|
||||
_preview.Initialize(targets
|
||||
.OfType<SwfClipAsset>()
|
||||
.Where(p => p)
|
||||
.ToArray());
|
||||
}
|
||||
|
||||
void ShutdownPreviews() {
|
||||
if ( _preview != null ) {
|
||||
_preview.Shutdown();
|
||||
_preview = null;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
@@ -172,6 +193,13 @@ namespace FTEditor.Editors {
|
||||
|
||||
void OnEnable() {
|
||||
_clips = targets.OfType<SwfClipAsset>().ToList();
|
||||
_outdated = SwfEditorUtils.CheckForOutdatedAsset(_clips);
|
||||
SetupPreviews();
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
ShutdownPreviews();
|
||||
_clips.Clear();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
@@ -188,7 +216,23 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
|
||||
public override bool RequiresConstantRepaint() {
|
||||
return true;
|
||||
return _clips.Count > 0;
|
||||
}
|
||||
|
||||
public override bool HasPreviewGUI() {
|
||||
return _clips.Count > 0;
|
||||
}
|
||||
|
||||
public override void OnPreviewSettings() {
|
||||
if ( _preview != null ) {
|
||||
_preview.OnPreviewSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnPreviewGUI(Rect r, GUIStyle background) {
|
||||
if ( _preview != null ) {
|
||||
_preview.OnPreviewGUI(r, background);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ using System.Linq;
|
||||
using FTRuntime;
|
||||
|
||||
namespace FTEditor.Editors {
|
||||
[CustomPreview(typeof(SwfClipAsset))]
|
||||
class SwfClipAssetPreview : ObjectPreview {
|
||||
int _sequence = 0;
|
||||
MaterialPropertyBlock _matPropBlock = null;
|
||||
@@ -33,15 +32,6 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
}
|
||||
|
||||
int targetSequenceCount {
|
||||
get {
|
||||
var clip = target as SwfClipAsset;
|
||||
return clip && clip.Sequences != null
|
||||
? clip.Sequences.Count
|
||||
: 0;
|
||||
}
|
||||
}
|
||||
|
||||
SwfClipAsset.Frame targetFrame {
|
||||
get {
|
||||
var clip = target as SwfClipAsset;
|
||||
@@ -135,17 +125,17 @@ namespace FTEditor.Editors {
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public void SetCurrentSequence(string sequence_name) {
|
||||
public void SetSequence(string sequence_name) {
|
||||
var clip = target as SwfClipAsset;
|
||||
_sequence = clip && clip.Sequences != null
|
||||
? Mathf.Max(0, clip.Sequences.FindIndex(p => p.Name == sequence_name))
|
||||
: 0;
|
||||
}
|
||||
|
||||
public void Shutdown() {
|
||||
_matPropBlock.Clear();
|
||||
_previewUtils.Cleanup();
|
||||
}
|
||||
public void Shutdown() {
|
||||
_matPropBlock.Clear();
|
||||
_previewUtils.Cleanup();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
@@ -168,27 +158,35 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
|
||||
public override void OnPreviewSettings() {
|
||||
var any_multi_sequences = m_Targets
|
||||
.OfType<SwfClipAsset>()
|
||||
.Any(p => p.Sequences != null && p.Sequences.Count > 1);
|
||||
if ( any_multi_sequences && GUILayout.Button("<", EditorStyles.miniButton) ) {
|
||||
--_sequence;
|
||||
var clip = m_Targets.Length == 1
|
||||
? m_Targets[0] as SwfClipAsset
|
||||
: null;
|
||||
|
||||
if ( !clip || clip.Sequences == null ) {
|
||||
return;
|
||||
}
|
||||
var sequence_names = m_Targets
|
||||
.OfType<SwfClipAsset>()
|
||||
.Select (p => GetSequenceForClip(p, _sequence))
|
||||
.Where (p => p != null && !string.IsNullOrEmpty(p.Name))
|
||||
.Select (p => p.Name)
|
||||
.ToArray();
|
||||
var label_text = string.Empty;
|
||||
for ( int i = 0, e = sequence_names.Length; i < e; ++i ) {
|
||||
label_text += string.Format(
|
||||
i > 0 ? ", {0}" : "{0}",
|
||||
sequence_names[i]);
|
||||
|
||||
if ( clip.Sequences.Count > 1 ) {
|
||||
if ( GUILayout.Button("<", EditorStyles.miniButton) ) {
|
||||
--_sequence;
|
||||
if ( _sequence < 0 ) {
|
||||
_sequence = clip.Sequences.Count - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
GUILayout.Label(label_text, EditorStyles.whiteLabel);
|
||||
if ( any_multi_sequences && GUILayout.Button(">", EditorStyles.miniButton) ) {
|
||||
++_sequence;
|
||||
|
||||
var sequence = GetSequenceForClip(clip, _sequence);
|
||||
if ( sequence != null && !string.IsNullOrEmpty(sequence.Name) ) {
|
||||
GUILayout.Label(sequence.Name, EditorStyles.whiteLabel);
|
||||
}
|
||||
|
||||
if ( clip.Sequences.Count > 1 ) {
|
||||
if ( GUILayout.Button(">", EditorStyles.miniButton) ) {
|
||||
++_sequence;
|
||||
if ( _sequence >= clip.Sequences.Count ) {
|
||||
_sequence = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ using FTRuntime;
|
||||
namespace FTEditor.Editors {
|
||||
[CustomEditor(typeof(SwfClip)), CanEditMultipleObjects]
|
||||
class SwfClipEditor : Editor {
|
||||
bool _outdated = false;
|
||||
List<SwfClip> _clips = new List<SwfClip>();
|
||||
Dictionary<SwfClip, SwfClipAssetPreview> _previews = new Dictionary<SwfClip, SwfClipAssetPreview>();
|
||||
|
||||
@@ -71,6 +72,12 @@ namespace FTEditor.Editors {
|
||||
return result;
|
||||
}
|
||||
|
||||
void DrawGUINotes() {
|
||||
if ( _outdated ) {
|
||||
SwfEditorUtils.DrawOutdatedGUINotes("SwfClip", _clips);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawSequence() {
|
||||
var all_sequences = GetAllSequences(true);
|
||||
if ( all_sequences.Count > 0 ) {
|
||||
@@ -131,38 +138,44 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
|
||||
void SetupPreviews() {
|
||||
ShutdownPreviews();
|
||||
foreach ( var clip in _clips.Where(p => !!p.clip) ) {
|
||||
var preview = new SwfClipAssetPreview();
|
||||
preview.Initialize(new Object[]{clip.clip});
|
||||
_previews.Add(clip, preview);
|
||||
}
|
||||
ShutdownPreviews();
|
||||
_previews = targets
|
||||
.OfType<SwfClip>()
|
||||
.Where(p => p.clip)
|
||||
.ToDictionary(p => p, p => {
|
||||
var preview = new SwfClipAssetPreview();
|
||||
preview.Initialize(new Object[] { p.clip });
|
||||
return preview;
|
||||
});
|
||||
}
|
||||
|
||||
void ShutdownPreviews() {
|
||||
foreach ( var p in _previews ) {
|
||||
p.Value.Shutdown();
|
||||
}
|
||||
_previews.Clear();
|
||||
}
|
||||
void ShutdownPreviews() {
|
||||
foreach ( var p in _previews ) {
|
||||
p.Value.Shutdown();
|
||||
}
|
||||
_previews.Clear();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Messages
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Messages
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void OnEnable() {
|
||||
void OnEnable() {
|
||||
_clips = targets.OfType<SwfClip>().ToList();
|
||||
_outdated = SwfEditorUtils.CheckForOutdatedAsset(_clips);
|
||||
SetupPreviews();
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
ShutdownPreviews();
|
||||
}
|
||||
void OnDisable() {
|
||||
ShutdownPreviews();
|
||||
_clips.Clear();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
public override void OnInspectorGUI() {
|
||||
serializedObject.Update();
|
||||
DrawGUINotes();
|
||||
DrawDefaultInspector();
|
||||
DrawSequence();
|
||||
DrawCurrentFrame();
|
||||
@@ -173,11 +186,11 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
|
||||
public override bool RequiresConstantRepaint() {
|
||||
return _previews.Count > 0;
|
||||
return _clips.Count > 0;
|
||||
}
|
||||
|
||||
public override bool HasPreviewGUI() {
|
||||
return _previews.Count > 0;
|
||||
return _clips.Count > 0;
|
||||
}
|
||||
|
||||
public override void OnPreviewGUI(Rect r, GUIStyle background) {
|
||||
@@ -185,7 +198,7 @@ namespace FTEditor.Editors {
|
||||
SwfClipAssetPreview preview;
|
||||
var clip = target as SwfClip;
|
||||
if ( _previews.TryGetValue(clip, out preview) ) {
|
||||
preview.SetCurrentSequence(clip.sequence);
|
||||
preview.SetSequence(clip.sequence);
|
||||
preview.DrawPreview(r);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,10 @@ namespace FTEditor.Postprocessors {
|
||||
if ( asset.Atlas ) {
|
||||
ConfigureAtlas(asset);
|
||||
ConfigureClips(asset, asset_data);
|
||||
Debug.LogFormat(
|
||||
asset,
|
||||
"<b>[FlashTools]</b> SwfAsset has been successfully converted:\nPath: {0}",
|
||||
AssetDatabase.GetAssetPath(asset));
|
||||
} else {
|
||||
_progressBar.UpdateTitle(asset.name);
|
||||
var new_data = ConfigureBitmaps(asset, asset_data);
|
||||
@@ -93,7 +97,7 @@ namespace FTEditor.Postprocessors {
|
||||
if ( bitmap.Redirect == 0 ) {
|
||||
textures.Add(new KeyValuePair<ushort, Texture2D>(
|
||||
bitmap.Id,
|
||||
LoadTextureFromData(bitmap)));
|
||||
LoadTextureFromData(bitmap, asset.Settings)));
|
||||
}
|
||||
}
|
||||
var rects = PackAndSaveBitmapsAtlas(
|
||||
@@ -109,14 +113,36 @@ namespace FTEditor.Postprocessors {
|
||||
return data;
|
||||
}
|
||||
|
||||
static Texture2D LoadTextureFromData(SwfBitmapData bitmap) {
|
||||
static Texture2D LoadTextureFromData(SwfBitmapData bitmap, SwfSettingsData settings) {
|
||||
var argb32 = settings.BitmapTrimming
|
||||
? TrimBitmapByRect(bitmap, bitmap.TrimmedRect)
|
||||
: bitmap.ARGB32;
|
||||
var widht = settings.BitmapTrimming
|
||||
? bitmap.TrimmedRect.width
|
||||
: bitmap.RealWidth;
|
||||
var height = settings.BitmapTrimming
|
||||
? bitmap.TrimmedRect.height
|
||||
: bitmap.RealHeight;
|
||||
var texture = new Texture2D(
|
||||
bitmap.RealWidth, bitmap.RealHeight,
|
||||
widht, height,
|
||||
TextureFormat.ARGB32, false);
|
||||
texture.LoadRawTextureData(bitmap.ARGB32);
|
||||
texture.LoadRawTextureData(argb32);
|
||||
return texture;
|
||||
}
|
||||
|
||||
static byte[] TrimBitmapByRect(SwfBitmapData bitmap, SwfRectIntData rect) {
|
||||
var argb32 = new byte[rect.area * 4];
|
||||
for ( var i = 0; i < rect.height; ++i ) {
|
||||
var src_index = rect.xMin + (rect.yMin + i) * bitmap.RealWidth;
|
||||
var dst_index = i * rect.width;
|
||||
Array.Copy(
|
||||
bitmap.ARGB32, src_index * 4,
|
||||
argb32, dst_index * 4,
|
||||
rect.width * 4);
|
||||
}
|
||||
return argb32;
|
||||
}
|
||||
|
||||
struct BitmapsAtlasInfo {
|
||||
public Texture2D Atlas;
|
||||
public Rect[] Rects;
|
||||
@@ -357,20 +383,23 @@ namespace FTEditor.Postprocessors {
|
||||
var bitmap = inst != null
|
||||
? FindBitmapFromAssetData(data, inst.Bitmap)
|
||||
: null;
|
||||
while ( bitmap != null && bitmap.Redirect > 0 ) {
|
||||
bitmap = FindBitmapFromAssetData(data, bitmap.Redirect);
|
||||
}
|
||||
if ( bitmap != null ) {
|
||||
var width = bitmap.RealWidth / 20.0f;
|
||||
var height = bitmap.RealHeight / 20.0f;
|
||||
var br = asset.Settings.BitmapTrimming
|
||||
? bitmap.TrimmedRect
|
||||
: new SwfRectIntData(bitmap.RealWidth, bitmap.RealHeight);
|
||||
|
||||
var v0 = new Vector2( 0, 0);
|
||||
var v1 = new Vector2(width, 0);
|
||||
var v2 = new Vector2(width, height);
|
||||
var v3 = new Vector2( 0, height);
|
||||
var v0 = new Vector2(br.xMin, br.yMin);
|
||||
var v1 = new Vector2(br.xMax, br.yMin);
|
||||
var v2 = new Vector2(br.xMax, br.yMax);
|
||||
var v3 = new Vector2(br.xMin, br.yMax);
|
||||
|
||||
var matrix =
|
||||
Matrix4x4.Scale(
|
||||
new Vector3(1.0f, -1.0f, 1.0f) /
|
||||
asset.Settings.PixelsPerUnit) *
|
||||
inst.Matrix.ToUMatrix();
|
||||
Matrix4x4.Scale(new Vector3(1.0f, -1.0f, 1.0f) / asset.Settings.PixelsPerUnit) *
|
||||
inst.Matrix.ToUMatrix() *
|
||||
Matrix4x4.Scale(new Vector3(1.0f / 20.0f, 1.0f / 20.0f, 1.0f));
|
||||
|
||||
baked_vertices.Add(matrix.MultiplyPoint3x4(v0));
|
||||
baked_vertices.Add(matrix.MultiplyPoint3x4(v1));
|
||||
|
||||
@@ -402,14 +402,44 @@ namespace FTEditor.Postprocessors {
|
||||
return library.Defines
|
||||
.Where (p => p.Value.Type == SwfLibraryDefineType.Bitmap)
|
||||
.ToDictionary(p => p.Key, p => p.Value as SwfLibraryBitmapDefine)
|
||||
.Select (p => new SwfBitmapData{
|
||||
Id = p.Key,
|
||||
ARGB32 = p.Value.ARGB32,
|
||||
Redirect = p.Value.Redirect,
|
||||
RealWidth = p.Value.Width,
|
||||
RealHeight = p.Value.Height})
|
||||
.Select (p => ConvertBitmap(p.Key, p.Value))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
static SwfBitmapData ConvertBitmap(ushort id, SwfLibraryBitmapDefine bitmap) {
|
||||
var trimmed_rect = bitmap.Redirect > 0
|
||||
? new SwfRectIntData(bitmap.Width, bitmap.Height)
|
||||
: CalculateBitmapTrimmedRect(bitmap);
|
||||
return new SwfBitmapData{
|
||||
Id = id,
|
||||
ARGB32 = bitmap.ARGB32,
|
||||
Redirect = bitmap.Redirect,
|
||||
RealWidth = bitmap.Width,
|
||||
RealHeight = bitmap.Height,
|
||||
TrimmedRect = trimmed_rect};
|
||||
}
|
||||
|
||||
static SwfRectIntData CalculateBitmapTrimmedRect(SwfLibraryBitmapDefine bitmap) {
|
||||
var rect = new SwfRectIntData{
|
||||
xMin = bitmap.Width,
|
||||
yMin = bitmap.Height,
|
||||
xMax = 0,
|
||||
yMax = 0};
|
||||
for ( var i = 0; i < bitmap.Height; ++i ) {
|
||||
for ( var j = 0; j < bitmap.Width; ++j ) {
|
||||
var a = bitmap.ARGB32[(j + i * bitmap.Width) * 4];
|
||||
if ( a > 0 ) {
|
||||
rect.xMin = Mathf.Min(j, rect.xMin);
|
||||
rect.yMin = Mathf.Min(i, rect.yMin);
|
||||
rect.xMax = Mathf.Max(j + 1, rect.xMax);
|
||||
rect.yMax = Mathf.Max(i + 1, rect.yMax);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rect.width < 1 || rect.height < 1
|
||||
? new SwfRectIntData(0, 0, 1, 1)
|
||||
: rect;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@@ -60,22 +60,96 @@ namespace FTEditor {
|
||||
public float yMin;
|
||||
public float yMax;
|
||||
|
||||
public SwfRectData(float w, float h) {
|
||||
this.xMin = 0;
|
||||
this.yMin = 0;
|
||||
this.xMax = w;
|
||||
this.yMax = h;
|
||||
}
|
||||
|
||||
public SwfRectData(float x, float y, float w, float h) {
|
||||
this.xMin = x;
|
||||
this.yMin = y;
|
||||
this.xMax = x + w;
|
||||
this.yMax = y + h;
|
||||
}
|
||||
|
||||
public float width {
|
||||
get {
|
||||
return xMax - xMin;
|
||||
}
|
||||
}
|
||||
|
||||
public float height {
|
||||
get {
|
||||
return yMax - yMin;
|
||||
}
|
||||
}
|
||||
|
||||
public float area {
|
||||
get {
|
||||
return width * height;
|
||||
}
|
||||
}
|
||||
|
||||
public static SwfRectData identity {
|
||||
get {
|
||||
return new SwfRectData{
|
||||
xMin = 0.0f,
|
||||
xMax = 0.0f,
|
||||
yMin = 0.0f,
|
||||
yMax = 0.0f};
|
||||
return new SwfRectData(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public static SwfRectData FromURect(Rect rect) {
|
||||
return new SwfRectData{
|
||||
xMin = rect.xMin,
|
||||
xMax = rect.xMax,
|
||||
yMin = rect.yMin,
|
||||
yMax = rect.yMax};
|
||||
return new SwfRectData(rect.xMin, rect.yMin, rect.width, rect.height);
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
struct SwfRectIntData {
|
||||
public int xMin;
|
||||
public int xMax;
|
||||
public int yMin;
|
||||
public int yMax;
|
||||
|
||||
public SwfRectIntData(int w, int h) {
|
||||
this.xMin = 0;
|
||||
this.yMin = 0;
|
||||
this.xMax = w;
|
||||
this.yMax = h;
|
||||
}
|
||||
|
||||
public SwfRectIntData(int x, int y, int w, int h) {
|
||||
this.xMin = x;
|
||||
this.yMin = y;
|
||||
this.xMax = x + w;
|
||||
this.yMax = y + h;
|
||||
}
|
||||
|
||||
public int width {
|
||||
get {
|
||||
return xMax - xMin;
|
||||
}
|
||||
}
|
||||
|
||||
public int height {
|
||||
get {
|
||||
return yMax - yMin;
|
||||
}
|
||||
}
|
||||
|
||||
public int area {
|
||||
get {
|
||||
return width * height;
|
||||
}
|
||||
}
|
||||
|
||||
public static SwfRectIntData identity {
|
||||
get {
|
||||
return new SwfRectIntData(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static SwfRectIntData FromURect(RectInt rect) {
|
||||
return new SwfRectIntData(rect.xMin, rect.yMin, rect.width, rect.height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,41 +261,42 @@ namespace FTEditor {
|
||||
Masked,
|
||||
MaskReset
|
||||
}
|
||||
public Types Type = Types.Group;
|
||||
public ushort ClipDepth = 0;
|
||||
public ushort Bitmap = 0;
|
||||
public SwfMatrixData Matrix = SwfMatrixData.identity;
|
||||
public SwfBlendModeData BlendMode = SwfBlendModeData.identity;
|
||||
public SwfColorTransData ColorTrans = SwfColorTransData.identity;
|
||||
public Types Type = Types.Group;
|
||||
public ushort ClipDepth = 0;
|
||||
public ushort Bitmap = 0;
|
||||
public SwfMatrixData Matrix = SwfMatrixData.identity;
|
||||
public SwfBlendModeData BlendMode = SwfBlendModeData.identity;
|
||||
public SwfColorTransData ColorTrans = SwfColorTransData.identity;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
class SwfFrameData {
|
||||
public string Anchor = string.Empty;
|
||||
public List<string> Labels = new List<string>();
|
||||
public List<SwfInstanceData> Instances = new List<SwfInstanceData>();
|
||||
public string Anchor = string.Empty;
|
||||
public List<string> Labels = new List<string>();
|
||||
public List<SwfInstanceData> Instances = new List<SwfInstanceData>();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
class SwfSymbolData {
|
||||
public string Name = string.Empty;
|
||||
public List<SwfFrameData> Frames = new List<SwfFrameData>();
|
||||
public string Name = string.Empty;
|
||||
public List<SwfFrameData> Frames = new List<SwfFrameData>();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
class SwfBitmapData {
|
||||
public ushort Id = 0;
|
||||
public byte[] ARGB32 = new byte[0];
|
||||
public ushort Redirect = 0;
|
||||
public int RealWidth = 0;
|
||||
public int RealHeight = 0;
|
||||
public SwfRectData SourceRect = SwfRectData.identity;
|
||||
public ushort Id = 0;
|
||||
public byte[] ARGB32 = new byte[0];
|
||||
public ushort Redirect = 0;
|
||||
public int RealWidth = 0;
|
||||
public int RealHeight = 0;
|
||||
public SwfRectData SourceRect = SwfRectData.identity;
|
||||
public SwfRectIntData TrimmedRect = SwfRectIntData.identity;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
class SwfAssetData {
|
||||
public float FrameRate = 0.0f;
|
||||
public List<SwfSymbolData> Symbols = new List<SwfSymbolData>();
|
||||
public List<SwfBitmapData> Bitmaps = new List<SwfBitmapData>();
|
||||
public float FrameRate = 0.0f;
|
||||
public List<SwfSymbolData> Symbols = new List<SwfSymbolData>();
|
||||
public List<SwfBitmapData> Bitmaps = new List<SwfBitmapData>();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using UnityEditor;
|
||||
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
@@ -307,6 +308,13 @@ namespace FTEditor {
|
||||
GetFileHash(path), SwfVersion.AsString);
|
||||
}
|
||||
|
||||
static string GetVersionFromFileHashWithVersion(string hash) {
|
||||
var index = hash.LastIndexOf('=');
|
||||
return index != -1
|
||||
? hash.Substring(index + 1)
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
static string GetFileHash(string path) {
|
||||
try {
|
||||
using ( var sha256 = SHA256.Create() ) {
|
||||
@@ -321,6 +329,117 @@ namespace FTEditor {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Outdated assets
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public static bool CheckForOutdatedAsset(SwfClip clip) {
|
||||
return clip
|
||||
&& CheckForOutdatedAsset(clip.clip);
|
||||
}
|
||||
|
||||
public static bool CheckForOutdatedAsset(SwfClipAsset clip_asset) {
|
||||
return clip_asset
|
||||
&& CheckForOutdatedAsset(AssetDatabase.LoadAssetAtPath<SwfAsset>(
|
||||
AssetDatabase.GUIDToAssetPath(clip_asset.AssetGUID)));
|
||||
}
|
||||
|
||||
public static bool CheckForOutdatedAsset(SwfAsset asset) {
|
||||
return asset
|
||||
&& GetVersionFromFileHashWithVersion(asset.Hash) != SwfVersion.AsString;
|
||||
}
|
||||
|
||||
public static bool CheckForOutdatedAsset(IEnumerable<SwfClip> clips) {
|
||||
var iter = clips.GetEnumerator();
|
||||
while ( iter.MoveNext() ) {
|
||||
if ( CheckForOutdatedAsset(iter.Current) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool CheckForOutdatedAsset(IEnumerable<SwfClipAsset> clip_assets) {
|
||||
var iter = clip_assets.GetEnumerator();
|
||||
while ( iter.MoveNext() ) {
|
||||
if ( CheckForOutdatedAsset(iter.Current) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool CheckForOutdatedAsset(IEnumerable<SwfAsset> assets) {
|
||||
var iter = assets.GetEnumerator();
|
||||
while ( iter.MoveNext() ) {
|
||||
if ( CheckForOutdatedAsset(iter.Current) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// GUI notes
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public static void DrawMasksGUINotes() {
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.HelpBox(
|
||||
"Masks and blends of animation may not be displayed correctly in the preview window. " +
|
||||
"Instance animation to the scene, to see how it will look like the animation in the game.",
|
||||
MessageType.Info);
|
||||
}
|
||||
|
||||
public static void DrawOutdatedGUINotes(string target, IEnumerable<SwfClip> clips) {
|
||||
DrawOutdatedGUINotes(target, clips
|
||||
.Select(p => p ? p.clip : null));
|
||||
}
|
||||
|
||||
public static void DrawOutdatedGUINotes(string target, IEnumerable<SwfClipAsset> clips) {
|
||||
DrawOutdatedGUINotes(target, clips
|
||||
.Select(p => {
|
||||
return p
|
||||
? AssetDatabase.LoadAssetAtPath<SwfAsset>(AssetDatabase.GUIDToAssetPath(p.AssetGUID))
|
||||
: null;
|
||||
}));
|
||||
}
|
||||
|
||||
public static void DrawOutdatedGUINotes(string target, IEnumerable<SwfAsset> assets) {
|
||||
var asset_count = assets.Count(p => p);
|
||||
if ( asset_count == 1 ) {
|
||||
var asset = assets.FirstOrDefault(p => p);
|
||||
if ( asset ) {
|
||||
var asset_version = GetVersionFromFileHashWithVersion(asset.Hash);
|
||||
if ( asset_version != SwfVersion.AsString ) {
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.HelpBox(string.Format(
|
||||
"The {0} was created in the {1} version of Flash Animation Toolset, and it's outdated.\n" +
|
||||
"Please, reimport the source .swf file. It's may be essential to correctness working.\n" +
|
||||
"You can do it in Tools/FlashTools menu.",
|
||||
target, asset_version),
|
||||
MessageType.Error);
|
||||
}
|
||||
}
|
||||
} else if ( asset_count > 1 ) {
|
||||
var any_outdated = assets
|
||||
.Any(p => GetVersionFromFileHashWithVersion(p.Hash) != SwfVersion.AsString);
|
||||
if ( any_outdated ) {
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.HelpBox(string.Format(
|
||||
"Some {0} is outdated.\n" +
|
||||
"Please, reimport the source .swf files. It's may be essential to correctness working.\n" +
|
||||
"You can do it in Tools/FlashTools menu.",
|
||||
target),
|
||||
MessageType.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Menu
|
||||
|
||||
@@ -15,12 +15,13 @@ namespace FTRuntime {
|
||||
AutomaticTruecolor = 2
|
||||
}
|
||||
|
||||
[SwfPowerOfTwoIfAttribute(5, 13, "AtlasPowerOfTwo")]
|
||||
[SwfPowerOfTwoIf(5, 13, "AtlasPowerOfTwo")]
|
||||
public int MaxAtlasSize;
|
||||
[SwfIntRange(0, int.MaxValue)]
|
||||
public int AtlasPadding;
|
||||
[SwfFloatRange(float.Epsilon, float.MaxValue)]
|
||||
public float PixelsPerUnit;
|
||||
public bool BitmapTrimming;
|
||||
public bool GenerateMipMaps;
|
||||
public bool AtlasPowerOfTwo;
|
||||
public bool AtlasForceSquare;
|
||||
@@ -33,6 +34,7 @@ namespace FTRuntime {
|
||||
MaxAtlasSize = 2048,
|
||||
AtlasPadding = 1,
|
||||
PixelsPerUnit = 100.0f,
|
||||
BitmapTrimming = true,
|
||||
GenerateMipMaps = false,
|
||||
AtlasPowerOfTwo = true,
|
||||
AtlasForceSquare = true,
|
||||
@@ -46,6 +48,7 @@ namespace FTRuntime {
|
||||
MaxAtlasSize == other.MaxAtlasSize &&
|
||||
AtlasPadding == other.AtlasPadding &&
|
||||
Mathf.Approximately(PixelsPerUnit, other.PixelsPerUnit) &&
|
||||
BitmapTrimming == other.BitmapTrimming &&
|
||||
GenerateMipMaps == other.GenerateMipMaps &&
|
||||
AtlasPowerOfTwo == other.AtlasPowerOfTwo &&
|
||||
AtlasForceSquare == other.AtlasForceSquare &&
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
public static class SwfVersion {
|
||||
public const int Major = 1;
|
||||
public const int Minor = 3;
|
||||
public const int Revision = 11;
|
||||
public const int Revision = 15;
|
||||
|
||||
public static string AsString {
|
||||
get {
|
||||
|
||||
@@ -1 +1 @@
|
||||
m_EditorVersion: 2017.4.17f1
|
||||
m_EditorVersion: 2017.4.23f1
|
||||
|
||||
@@ -58,8 +58,9 @@ https://gist.github.com/talecrafter/111ea3345911bd238f4998b4d5a04bf3
|
||||
**** TODO Поддержка задавать теги и сплит текстур на альфу для etc
|
||||
**** TODO Отдельный пакет ассета для возможности проигрывать анимации, без экспорта
|
||||
**** TODO Сделать опциональным вызов Stop на OnDisable SwfClipController
|
||||
**** TODO Выводить в лог успешную конвертацию с контекстом
|
||||
**** TODO Сделать внятную ошибку на большое количество вложенных масок
|
||||
**** TODO Поддержка LWRP
|
||||
**** TODO Поддержка освещения
|
||||
*** Баги
|
||||
**** TODO Скейлы клипов не проверяются в группах
|
||||
**** TODO graphics_scale не влияет на растр
|
||||
@@ -69,6 +70,14 @@ https://gist.github.com/talecrafter/111ea3345911bd238f4998b4d5a04bf3
|
||||
**** TODO Возможно проблемы с DX9
|
||||
UNITY_UV_STARTS_AT_TOP
|
||||
UNITY_HALF_TEXEL_OFFSET
|
||||
** DONE Версия 1.3.15
|
||||
*** Баги
|
||||
**** DONE Утечка превью в редакторе
|
||||
*** Улучшения
|
||||
**** DONE Выводить в лог успешную конвертацию с контекстом
|
||||
**** DONE Предупреждения о устаревших ассетах
|
||||
**** DONE Опциональный тримминг
|
||||
**** DONE Триммить изображения из swf (adou.fla)
|
||||
** DONE Версия 1.3.14
|
||||
*** Баги
|
||||
**** DONE Сломалась компиляция в 2018.3.2f1
|
||||
|
||||