Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
696ef848e0 | |||
521cb34541 | |||
d8c59e86ca | |||
e894fcf797 | |||
0dfa466d78 | |||
78f3daa145 | |||
406720d718 | |||
947eb6f18e | |||
279edb1e0e | |||
e7ce849108 | |||
13de8b8e2a | |||
a728366035 |
58
.gitignore
vendored
@ -1,13 +1,33 @@
|
||||
[Ll]ibrary/
|
||||
[Tt]emp/
|
||||
[Oo]bj/
|
||||
[Bb]uild/
|
||||
[Bb]uilds/
|
||||
Assets/AssetStoreTools*
|
||||
# ignore p4
|
||||
.p4ignore
|
||||
|
||||
# This .gitignore file should be placed at the root of your Unity project directory
|
||||
#
|
||||
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
|
||||
#
|
||||
/[Ll]ibrary/
|
||||
/[Tt]emp/
|
||||
/[Oo]bj/
|
||||
/[Bb]uild/
|
||||
/[Bb]uilds/
|
||||
/[Ll]ogs/
|
||||
/[Mm]emoryCaptures/
|
||||
|
||||
# Never ignore Asset meta data
|
||||
!/[Aa]ssets/**/*.meta
|
||||
|
||||
# Uncomment this line if you wish to ignore the asset store tools plugin
|
||||
/[Aa]ssets/AssetStoreTools*
|
||||
|
||||
# Autogenerated Jetbrains Rider plugin
|
||||
[Aa]ssets/Plugins/Editor/JetBrains*
|
||||
|
||||
# Visual Studio cache directory
|
||||
.vs/
|
||||
|
||||
# Gradle cache directory
|
||||
.gradle/
|
||||
|
||||
# Autogenerated VS/MD/Consulo solution and project files
|
||||
ExportedObj/
|
||||
.consulo/
|
||||
@ -22,22 +42,34 @@ ExportedObj/
|
||||
*.booproj
|
||||
*.svd
|
||||
*.pdb
|
||||
*.mdb
|
||||
*.opendb
|
||||
*.VC.db
|
||||
|
||||
# Unity3D generated meta files
|
||||
*.pidb.meta
|
||||
*.pdb.meta
|
||||
*.mdb.meta
|
||||
|
||||
# Unity3D meta files (not needed for the git)
|
||||
*.meta
|
||||
|
||||
# Unity3D Generated File On Crash Reports
|
||||
# Unity3D generated file on crash reports
|
||||
sysinfo.txt
|
||||
|
||||
# Builds
|
||||
*.apk
|
||||
*.unitypackage
|
||||
|
||||
# WorkFiles
|
||||
*.psd
|
||||
*.fbx
|
||||
# Crashlytics generated file
|
||||
crashlytics-build.properties
|
||||
|
||||
# workfiles
|
||||
MA_ToolBox/MA_TextureAtlasserPro/Atlasses/*
|
||||
!Atlasses.txt
|
||||
MA_ToolBox/MA_TextureAtlasserPro/Exports/*
|
||||
!Exports.txt
|
||||
MA_ToolBox/MA_TextureAtlasserPro/Settings/*
|
||||
!Settings.txt
|
||||
!MA_TextureAtlasserProSettings.asset
|
||||
MA_ToolBox/MA_TextureAtlasserPro/Settings/ExportSettings/*
|
||||
!ExportSettings.txt
|
||||
!MA_DefaultExportSettings.asset
|
||||
!MA_DefaultSpriteExportSettings.asset
|
8
Assets/MA_ToolBox.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b328187c4d5fec24c8a228ada84605a6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_TextureAtlasserPro.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f40356e4c9590fc46a493c26a5fbf937
|
||||
folderAsset: yes
|
||||
timeCreated: 1519389465
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_TextureAtlasserPro/Icons.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c7a2224cc47fce489a08fb2b34f797c
|
||||
folderAsset: yes
|
||||
timeCreated: 1519492248
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60e555e14fc6a6345a5ee996a49886cb
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 278 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08efa850d9174c947b67855c7813bc63
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27381d6123e7e5b4eb9d79829b15c2ef
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7a93919b4509be4aa9f6bd0bb61c1e7
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 301 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05827eed0f3107e4c840c206ceccd7ee
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25f247791349617498d1ab94bc82ed23
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 878 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f3720ab6077d734780437442e00cd64
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4c871fedd726904ca8aee58ef52f7a3
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 846 B After Width: | Height: | Size: 846 B |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 750fec6ea06f5504ba56751ecdf9de11
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ed3341c780c2894488f04a7203770b9
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 32
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
21
Assets/MA_ToolBox/MA_TextureAtlasserPro/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Max Kruf
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
7
Assets/MA_ToolBox/MA_TextureAtlasserPro/LICENSE.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daea7b193e8882449a5b12b2b7ac1e2a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1
Assets/MA_ToolBox/MA_TextureAtlasserPro/README.md
Normal file
@ -0,0 +1 @@
|
||||
README: https://github.com/maxartz15/MA_TextureAtlasser/blob/master/README.md
|
7
Assets/MA_ToolBox/MA_TextureAtlasserPro/README.md.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b27eb5167882915458c9b7ce07b6e712
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_TextureAtlasserPro/Scripts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92654d379bc273e4a96514e5306df9e8
|
||||
folderAsset: yes
|
||||
timeCreated: 1519389476
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e50a55aa9cc7b30439e7923a3078b9f7
|
||||
folderAsset: yes
|
||||
timeCreated: 1519391732
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -16,7 +16,7 @@ namespace MA_TextureAtlasserPro
|
||||
public MA_TextureAtlasserProQuad selectedTextureQuad;
|
||||
private Rect editorWorkRect;
|
||||
public bool showTextures = false;
|
||||
|
||||
public MA_TextureAtlasserProExportSettings exportSettings;
|
||||
|
||||
//Data
|
||||
public Vector2 textureAtlasSize;
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 892d1a7aeb4cc284dbf62e69e125db52
|
||||
timeCreated: 1519392859
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,71 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using MA_Texture;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MA_TextureAtlasserPro
|
||||
{
|
||||
[System.Serializable]
|
||||
public class MA_TextureAtlasserProExportSettings : ScriptableObject
|
||||
{
|
||||
[HideInInspector]
|
||||
public bool canModify = true;
|
||||
|
||||
public bool exportModels = true;
|
||||
public ModelExportSettings modelExportSettings = new ModelExportSettings();
|
||||
public bool exportTextures = true;
|
||||
public TextureExportSettings textureExportSettings = new TextureExportSettings();
|
||||
public bool exportMaterials = true;
|
||||
public MaterialExportSettings materialExportSettings = new MaterialExportSettings();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class ModelExportSettings
|
||||
{
|
||||
[Header("Model settings:")]
|
||||
public ModelFormat modelFormat = ModelFormat.UnityMeshPrefab;
|
||||
public bool uvFlipY = true;
|
||||
public int uvChannel = 0;
|
||||
public bool uvWrap = true;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class TextureExportSettings
|
||||
{
|
||||
[Header("Texture settings:")]
|
||||
public TextureFormat textureFormat = TextureFormat.Png;
|
||||
public TextureType textureType = TextureType.Default;
|
||||
public MA_TextureUtils.TextureScaleMode textureScaleMode = MA_TextureUtils.TextureScaleMode.Bilinear;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class MaterialExportSettings
|
||||
{
|
||||
[Header("Material settings:")]
|
||||
public Shader shader = null;
|
||||
public List<string> shaderPropertyNames = new List<string>() { "_MainTex", "_MetallicGlossMap", "_BumpMap" };
|
||||
}
|
||||
|
||||
public enum ModelFormat
|
||||
{
|
||||
None,
|
||||
UnityMeshPrefab,
|
||||
ReplaceMesh,
|
||||
Obj
|
||||
}
|
||||
|
||||
public enum TextureFormat
|
||||
{
|
||||
None,
|
||||
Png
|
||||
}
|
||||
|
||||
public enum TextureType
|
||||
{
|
||||
Default,
|
||||
Sprite,
|
||||
SpriteSliced
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8eb652100ecb804dae35d0cca727164
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16ad07a78750c7644b710e19e1a23d4a
|
||||
timeCreated: 1519392859
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73f5e66553c13034e9b894ef2cc31b66
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad995f47c542a7f4d9148cd7d5c9cfda
|
||||
timeCreated: 1520097393
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a34d83791d6c9241a9051b316c58169
|
||||
folderAsset: yes
|
||||
timeCreated: 1519389484
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4dc196a605811ff4593b2c3d6eab83df
|
||||
folderAsset: yes
|
||||
timeCreated: 1519393169
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64b4bb2ec0d18b142b6a5aa0c8dfb5c1
|
||||
timeCreated: 1521838249
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,702 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using MA_Mesh;
|
||||
using MA_Texture;
|
||||
|
||||
namespace MA_TextureAtlasserPro
|
||||
{
|
||||
public static class MA_TextureAtlasserProUtils
|
||||
{
|
||||
public const string TEXTURE_ATLASSER_PATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/";
|
||||
public const string SETTINGS_ASSET_PATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Settings/";
|
||||
public const string SAVE_ASSET_PATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Atlasses/";
|
||||
public const string LOAD_ASSET_PATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Atlasses/";
|
||||
public const string EXPORT_ASSET_PATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Exports/";
|
||||
public const string TEMP_ASSET_PATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Temp/";
|
||||
|
||||
public const string DEFAULT_TEXTURE_GROUP_NAME = "Albedo";
|
||||
public const float VIEW_OFFSET = 20;
|
||||
|
||||
public static MA_TextureAtlasserProSettings CreateSettings()
|
||||
{
|
||||
MA_TextureAtlasserProSettings _settings = ScriptableObject.CreateInstance<MA_TextureAtlasserProSettings>();
|
||||
|
||||
if (_settings != null)
|
||||
{
|
||||
CreateFolder(SETTINGS_ASSET_PATH);
|
||||
AssetDatabase.CreateAsset(_settings, SETTINGS_ASSET_PATH + "MA_TextureAtlasserProSettings.asset");
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return _settings;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProSettings LoadSettings()
|
||||
{
|
||||
MA_TextureAtlasserProSettings _settings = AssetDatabase.LoadAssetAtPath(SETTINGS_ASSET_PATH + "MA_TextureAtlasserProSettings.asset", typeof(MA_TextureAtlasserProSettings)) as MA_TextureAtlasserProSettings;
|
||||
|
||||
if (_settings == null)
|
||||
{
|
||||
_settings = CreateSettings();
|
||||
}
|
||||
|
||||
return _settings;
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProExportSettings CreateExportSettings(string name, bool canModify = true)
|
||||
{
|
||||
MA_TextureAtlasserProExportSettings _settings = ScriptableObject.CreateInstance<MA_TextureAtlasserProExportSettings>();
|
||||
_settings.canModify = canModify;
|
||||
|
||||
if (_settings != null)
|
||||
{
|
||||
_settings.materialExportSettings.shader = Shader.Find("Standard");
|
||||
|
||||
CreateFolder(EXPORT_ASSET_PATH);
|
||||
AssetDatabase.CreateAsset(_settings, SETTINGS_ASSET_PATH + name + ".asset");
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return _settings;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProExportSettings LoadExportSettings()
|
||||
{
|
||||
string name = "MA_DefaultExportSettings";
|
||||
MA_TextureAtlasserProExportSettings _settings = AssetDatabase.LoadAssetAtPath(SETTINGS_ASSET_PATH + name + ".asset", typeof(MA_TextureAtlasserProExportSettings)) as MA_TextureAtlasserProExportSettings;
|
||||
|
||||
if (_settings == null)
|
||||
{
|
||||
_settings = CreateExportSettings(name, false);
|
||||
}
|
||||
|
||||
return _settings;
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProAtlas CreateTextureAtlas(string name, Vector2 size)
|
||||
{
|
||||
MA_TextureAtlasserProAtlas _atlas = ScriptableObject.CreateInstance<MA_TextureAtlasserProAtlas>();
|
||||
|
||||
if (_atlas != null)
|
||||
{
|
||||
_atlas.CreateAtlas(name, size);
|
||||
MA_CheckTextureAtlas(_atlas);
|
||||
|
||||
CreateFolder(SAVE_ASSET_PATH);
|
||||
AssetDatabase.CreateAsset(_atlas, SAVE_ASSET_PATH + name + ".asset");
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return _atlas;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProAtlas LoadTextureAtlas()
|
||||
{
|
||||
MA_TextureAtlasserProAtlas _atlas = null;
|
||||
string absPath = EditorUtility.OpenFilePanel("Select Texture Atlas", LOAD_ASSET_PATH, "");
|
||||
|
||||
if (absPath.StartsWith(Application.dataPath))
|
||||
{
|
||||
string relPath = absPath.Substring(Application.dataPath.Length - "Assets".Length);
|
||||
_atlas = AssetDatabase.LoadAssetAtPath(relPath, typeof(MA_TextureAtlasserProAtlas)) as MA_TextureAtlasserProAtlas;
|
||||
|
||||
MA_CheckTextureAtlas(_atlas);
|
||||
|
||||
if (_atlas)
|
||||
{
|
||||
EditorPrefs.SetString("AtlasPath", null);
|
||||
}
|
||||
}
|
||||
|
||||
if (_atlas != null)
|
||||
{
|
||||
if (_atlas.selectedTextureQuad != null)
|
||||
{
|
||||
_atlas.selectedTextureQuad.isSelected = false;
|
||||
}
|
||||
_atlas.selectedTextureQuad = null;
|
||||
}
|
||||
|
||||
return _atlas;
|
||||
}
|
||||
|
||||
public static void MA_CheckTextureAtlas(MA_TextureAtlasserProAtlas atlas)
|
||||
{
|
||||
if (atlas.textureGroupRegistration == null)
|
||||
{
|
||||
atlas.textureGroupRegistration = new List<MA_TextureGroupRegistration>();
|
||||
|
||||
MA_TextureGroupRegistration groupRegistration = new MA_TextureGroupRegistration
|
||||
{
|
||||
name = DEFAULT_TEXTURE_GROUP_NAME
|
||||
};
|
||||
|
||||
atlas.textureGroupRegistration.Add(groupRegistration);
|
||||
}
|
||||
|
||||
if (atlas.textureQuads == null)
|
||||
{
|
||||
atlas.textureQuads = new List<MA_TextureAtlasserProQuad>();
|
||||
}
|
||||
else
|
||||
{
|
||||
bool _sameCount = true;
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
if (q.textureGroups.Count != atlas.textureGroupRegistration.Count)
|
||||
{
|
||||
_sameCount = false;
|
||||
Debug.LogWarning("TextureAtlasser: " + q.name + " doesn't have the right amount of texture groups!");
|
||||
}
|
||||
}
|
||||
|
||||
if (_sameCount)
|
||||
{
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
for (int i = 0; i < atlas.textureQuads.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < atlas.textureGroupRegistration.Count; j++)
|
||||
{
|
||||
if (atlas.textureQuads[i].textureGroups[j].name != atlas.textureGroupRegistration[j].name)
|
||||
{
|
||||
Debug.LogWarning("TextureAtlasser: " + q.name + " doesn't have the right texture group name!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (atlas.exportSettings == null)
|
||||
{
|
||||
atlas.exportSettings = LoadExportSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProQuad CreateTextureQuad(MA_TextureAtlasserProAtlas atlas, string name, Rect rect, bool focus = true)
|
||||
{
|
||||
if (atlas != null)
|
||||
{
|
||||
//Create new list if we haven't one already
|
||||
if (atlas.textureQuads == null)
|
||||
{
|
||||
atlas.textureQuads = new List<MA_TextureAtlasserProQuad>();
|
||||
}
|
||||
|
||||
//Create new quad
|
||||
MA_TextureAtlasserProQuad _quad = ScriptableObject.CreateInstance<MA_TextureAtlasserProQuad>();
|
||||
|
||||
//Add quad to asset
|
||||
if (_quad != null)
|
||||
{
|
||||
//Set quad settings
|
||||
_quad.name = name;
|
||||
_quad.rect = rect;
|
||||
|
||||
SetTextureGroups(atlas, _quad);
|
||||
|
||||
atlas.textureQuads.Add(_quad);
|
||||
|
||||
AssetDatabase.AddObjectToAsset(_quad, atlas);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
if (focus)
|
||||
{
|
||||
atlas.selectedTextureQuad = atlas.textureQuads[atlas.textureQuads.Count - 1];
|
||||
}
|
||||
|
||||
return _quad;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("CreateTextureQuad Failed: _TextureQuad");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("CreateTextureQuad Failed: textureAtlas");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void RemoveTextureQuad(MA_TextureAtlasserProAtlas atlas, bool focus = true)
|
||||
{
|
||||
if (atlas != null && atlas.selectedTextureQuad != null)
|
||||
{
|
||||
int _index = atlas.textureQuads.IndexOf(atlas.selectedTextureQuad);
|
||||
|
||||
atlas.textureQuads.RemoveAt(_index);
|
||||
Object.DestroyImmediate(atlas.selectedTextureQuad, true);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
if (focus && atlas.textureQuads.Count > 0)
|
||||
{
|
||||
_index = Mathf.Clamp(_index, 0, atlas.textureQuads.Count - 1);
|
||||
atlas.selectedTextureQuad = atlas.textureQuads[_index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DuplicateTextureQuad(MA_TextureAtlasserProAtlas atlas, bool focus = true, bool copyData = false, string namePrefix = "new ")
|
||||
{
|
||||
if (atlas != null && atlas.selectedTextureQuad != null)
|
||||
{
|
||||
MA_TextureAtlasserProQuad q = CreateTextureQuad(atlas, namePrefix + atlas.selectedTextureQuad.name, atlas.selectedTextureQuad.rect, false);
|
||||
|
||||
if (copyData)
|
||||
{
|
||||
q.meshes = new List<Mesh>();
|
||||
for (int i = 0; i < atlas.selectedTextureQuad.meshes.Count; i++)
|
||||
{
|
||||
q.meshes.Add(atlas.selectedTextureQuad.meshes[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < atlas.selectedTextureQuad.textureGroups.Count; i++)
|
||||
{
|
||||
q.textureGroups[i].texture = atlas.selectedTextureQuad.textureGroups[i].texture;
|
||||
}
|
||||
}
|
||||
|
||||
if (focus)
|
||||
{
|
||||
atlas.selectedTextureQuad = q;
|
||||
}
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetTextureGroups(MA_TextureAtlasserProAtlas atlas, MA_TextureAtlasserProQuad quad)
|
||||
{
|
||||
if (quad.textureGroups == null)
|
||||
{
|
||||
quad.textureGroups = new List<MA_TextureGroup>();
|
||||
}
|
||||
|
||||
//Add texture groups
|
||||
foreach (MA_TextureGroupRegistration tgr in atlas.textureGroupRegistration)
|
||||
{
|
||||
MA_TextureGroup textureGroup = new MA_TextureGroup
|
||||
{
|
||||
name = tgr.name
|
||||
};
|
||||
quad.textureGroups.Add(textureGroup);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreateTextureGroup(MA_TextureAtlasserProAtlas atlas, string name)
|
||||
{
|
||||
MA_TextureGroupRegistration _textureGroupRegistration = new MA_TextureGroupRegistration
|
||||
{
|
||||
name = name
|
||||
};
|
||||
atlas.textureGroupRegistration.Add(_textureGroupRegistration);
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
MA_TextureGroup _textureGroup = new MA_TextureGroup
|
||||
{
|
||||
name = name
|
||||
};
|
||||
q.textureGroups.Add(_textureGroup);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveTextureGroup(MA_TextureAtlasserProAtlas atlas, int index)
|
||||
{
|
||||
atlas.textureGroupRegistration.RemoveAt(index);
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
q.textureGroups.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CloseWindow(MA_TextureAtlasserProWindow curWindow)
|
||||
{
|
||||
if (curWindow == null)
|
||||
{
|
||||
Debug.LogError("Closing window Failed: curWindow == null");
|
||||
}
|
||||
curWindow.Close();
|
||||
}
|
||||
|
||||
public static bool IsPowerOfTwo(int value)
|
||||
{
|
||||
//While x is even and > 1
|
||||
while (((value % 2) == 0) && value > 1)
|
||||
{
|
||||
value /= 2;
|
||||
}
|
||||
|
||||
return (value == 1);
|
||||
}
|
||||
|
||||
public static void CreateFolder(string folderPath)
|
||||
{
|
||||
if (folderPath.LastIndexOf('/') == folderPath.Length - 1)
|
||||
{
|
||||
folderPath = folderPath.Remove(folderPath.LastIndexOf('/'));
|
||||
}
|
||||
|
||||
if (!AssetDatabase.IsValidFolder(folderPath))
|
||||
{
|
||||
string parentPath = folderPath.Substring(0, folderPath.LastIndexOf('/'));
|
||||
string folderName = folderPath.Substring(folderPath.LastIndexOf('/') + 1);
|
||||
|
||||
AssetDatabase.CreateFolder(parentPath, folderName);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteFolder(string folderPath)
|
||||
{
|
||||
if (folderPath.LastIndexOf('/') == folderPath.Length - 1)
|
||||
{
|
||||
folderPath = folderPath.Remove(folderPath.LastIndexOf('/'));
|
||||
}
|
||||
|
||||
if (AssetDatabase.IsValidFolder(folderPath))
|
||||
{
|
||||
AssetDatabase.DeleteAsset(folderPath);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
#region Export
|
||||
public static string[] ExportAtlasModels(MA_TextureAtlasserProAtlas atlas, ModelExportSettings modelExportSettings, string material = null, string savePath = EXPORT_ASSET_PATH)
|
||||
{
|
||||
switch (modelExportSettings.modelFormat)
|
||||
{
|
||||
case ModelFormat.None:
|
||||
break;
|
||||
case ModelFormat.ReplaceMesh:
|
||||
ReplaceAtlasMesh(atlas, modelExportSettings, savePath: savePath);
|
||||
break;
|
||||
case ModelFormat.UnityMeshPrefab:
|
||||
return ExportAtlasUnityMeshPrefab(atlas, modelExportSettings, material: material, savePath: savePath);
|
||||
case ModelFormat.Obj:
|
||||
return ExportAtlasObj(atlas, modelExportSettings, savePath: savePath);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void ReplaceAtlasMesh(MA_TextureAtlasserProAtlas atlas, ModelExportSettings modelExportSettings, string savePath = EXPORT_ASSET_PATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null)
|
||||
return;
|
||||
|
||||
var quads = atlas.textureQuads;
|
||||
for (var index = 0; index < quads.Count; index++)
|
||||
{
|
||||
var quad = quads[index];
|
||||
if (quad.meshes == null)
|
||||
continue;
|
||||
|
||||
var meshes = quad.meshes;
|
||||
for (var meshIndex = 0; meshIndex < quad.meshes.Count; meshIndex++)
|
||||
{
|
||||
if (meshes[meshIndex] == null)
|
||||
continue;
|
||||
|
||||
MA_MeshUtils.MA_UVReMap(meshes[meshIndex], atlas.textureAtlasSize, quad.guiRect, modelExportSettings.uvChannel, modelExportSettings.uvFlipY, modelExportSettings.uvWrap);
|
||||
EditorUtility.SetDirty(meshes[meshIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
private static string[] ExportAtlasUnityMeshPrefab(MA_TextureAtlasserProAtlas atlas, ModelExportSettings modelExportSettings, string material = null, string savePath = EXPORT_ASSET_PATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null)
|
||||
return null;
|
||||
|
||||
List<string> assetPaths = new List<string>();
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad quad in atlas.textureQuads)
|
||||
{
|
||||
//Export Mesh
|
||||
if (quad.meshes != null)
|
||||
{
|
||||
for (int m = 0; m < quad.meshes.Count; m++)
|
||||
{
|
||||
if (quad.meshes[m] != null)
|
||||
{
|
||||
//Create new mesh
|
||||
Mesh newMesh = new Mesh();
|
||||
//Duplicate it from the current one
|
||||
newMesh = MA_MeshUtils.MA_DuplicateMesh(quad.meshes[m]);
|
||||
//Remap UV's
|
||||
newMesh = MA_MeshUtils.MA_UVReMap(newMesh, atlas.textureAtlasSize, quad.guiRect, modelExportSettings.uvChannel, modelExportSettings.uvFlipY, modelExportSettings.uvWrap);
|
||||
//Set name
|
||||
string meshName = string.IsNullOrEmpty(quad.name) ? "" : quad.name + "-";
|
||||
meshName += quad.meshes[m].name;
|
||||
int n = m + 1;
|
||||
meshName += "_" + n.ToString("#000");
|
||||
newMesh.name = meshName;
|
||||
//Save it
|
||||
string asset = MA_MeshUtils.MA_SaveMeshPrefab(newMesh, meshName, savePath, materialPath: material);
|
||||
assetPaths.Add(asset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return assetPaths.ToArray();
|
||||
}
|
||||
|
||||
private static string[] ExportAtlasObj(MA_TextureAtlasserProAtlas atlas, ModelExportSettings modelExportSettings, string savePath = EXPORT_ASSET_PATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null)
|
||||
return null;
|
||||
|
||||
List<string> assetPaths = new List<string>();
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad quad in atlas.textureQuads)
|
||||
{
|
||||
//Export Mesh
|
||||
if (quad.meshes != null)
|
||||
{
|
||||
for (int m = 0; m < quad.meshes.Count; m++)
|
||||
{
|
||||
if (quad.meshes[m] != null)
|
||||
{
|
||||
//Create new mesh
|
||||
Mesh newMesh = new Mesh();
|
||||
//Duplicate it from the current one
|
||||
newMesh = MA_MeshUtils.MA_DuplicateMesh(quad.meshes[m]);
|
||||
//Remap UV's
|
||||
newMesh = MA_MeshUtils.MA_UVReMap(newMesh, atlas.textureAtlasSize, quad.guiRect, modelExportSettings.uvChannel, modelExportSettings.uvFlipY, modelExportSettings.uvWrap);
|
||||
//Save it
|
||||
string meshName = string.IsNullOrEmpty(quad.name) ? "" : quad.name + "-";
|
||||
meshName += quad.meshes[m].name;
|
||||
int n = m + 1;
|
||||
meshName += "_" + n.ToString("#000");
|
||||
|
||||
string asset = MA_MeshUtils.MeshToFile(newMesh, meshName, savePath);
|
||||
assetPaths.Add(asset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return assetPaths.ToArray();
|
||||
}
|
||||
|
||||
public static string[] ExportAtlasTextures(MA_TextureAtlasserProAtlas atlas, TextureExportSettings textureExportSettings, string savePath = EXPORT_ASSET_PATH, string tempPath = TEXTURE_ATLASSER_PATH)
|
||||
{
|
||||
switch (textureExportSettings.textureFormat)
|
||||
{
|
||||
case TextureFormat.None:
|
||||
break;
|
||||
case TextureFormat.Png:
|
||||
return ExportAtlasPNG(atlas, textureExportSettings, savePath);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string[] ExportAtlasPNG(MA_TextureAtlasserProAtlas atlas, TextureExportSettings textureExportSettings, string savePath = EXPORT_ASSET_PATH, string tempPath = TEMP_ASSET_PATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null || atlas.textureGroupRegistration == null)
|
||||
return null;
|
||||
|
||||
string[] assetPaths = new string[atlas.textureGroupRegistration.Count];
|
||||
|
||||
//Create temp folder
|
||||
CreateFolder(tempPath);
|
||||
|
||||
//Foreach texture group
|
||||
for (int i = 0; i < atlas.textureGroupRegistration.Count; i++)
|
||||
{
|
||||
//Create new Texture Atlas
|
||||
Texture2D newTexture = new Texture2D((int)atlas.textureAtlasSize.x, (int)atlas.textureAtlasSize.y)
|
||||
{
|
||||
name = atlas.name + "_" + atlas.textureGroupRegistration[i].name
|
||||
};
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
if (q.textureGroups != null && q.textureGroups[i].texture != null)
|
||||
{
|
||||
//Make temp copy
|
||||
string orginalTexturePath = AssetDatabase.GetAssetPath(q.textureGroups[i].texture);
|
||||
string orginalTextureExtension = System.IO.Path.GetExtension(orginalTexturePath);
|
||||
|
||||
string tempTexturePath = tempPath + q.textureGroups[i].texture.name + orginalTextureExtension;
|
||||
AssetDatabase.CopyAsset(orginalTexturePath, tempTexturePath);
|
||||
|
||||
//Set temp copy to default settings
|
||||
TextureImporter tempTextureImporter = (TextureImporter)AssetImporter.GetAtPath(tempTexturePath);
|
||||
tempTextureImporter.textureType = TextureImporterType.Default;
|
||||
tempTextureImporter.sRGBTexture = false;
|
||||
tempTextureImporter.alphaIsTransparency = false;
|
||||
tempTextureImporter.maxTextureSize = (int)Mathf.Max(atlas.textureAtlasSize.x, atlas.textureAtlasSize.y);
|
||||
tempTextureImporter.textureCompression = TextureImporterCompression.Uncompressed;
|
||||
tempTextureImporter.SaveAndReimport();
|
||||
|
||||
//Load temp copy
|
||||
Texture tempCopy = AssetDatabase.LoadAssetAtPath<Texture>(tempTextureImporter.assetPath);
|
||||
|
||||
//Create new texture part
|
||||
Texture2D newTexturePart = (Texture2D)MA_TextureUtils.ConvertToReadableTexture(tempCopy);
|
||||
|
||||
//Scale it
|
||||
newTexturePart = newTexturePart.MA_Scale2D((int)q.guiRect.width, (int)q.guiRect.height, textureExportSettings.textureScaleMode);
|
||||
|
||||
//Add it
|
||||
newTexture = newTexture.MA_Combine2D(newTexturePart, (int)q.guiRect.x, (int)q.guiRect.y);
|
||||
|
||||
//Delete temp copy
|
||||
AssetDatabase.DeleteAsset(tempTextureImporter.assetPath);
|
||||
}
|
||||
}
|
||||
|
||||
//Save it
|
||||
newTexture.MA_Save2D(newTexture.name, savePath);
|
||||
|
||||
assetPaths[i] = (savePath + newTexture.name + '.' + textureExportSettings.textureFormat.ToString());
|
||||
|
||||
//Set settings.
|
||||
switch (textureExportSettings.textureType)
|
||||
{
|
||||
case TextureType.Default:
|
||||
{
|
||||
TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(savePath + newTexture.name + '.' + textureExportSettings.textureFormat.ToString());
|
||||
textureImporter.textureType = TextureImporterType.Default;
|
||||
textureImporter.SaveAndReimport();
|
||||
}
|
||||
break;
|
||||
case TextureType.Sprite:
|
||||
SetAtlasSpriteSettings(atlas, textureExportSettings, savePath);
|
||||
break;
|
||||
case TextureType.SpriteSliced:
|
||||
SetAtlasSpriteSettings(atlas, textureExportSettings, savePath);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Delete temp folder
|
||||
DeleteFolder(tempPath);
|
||||
|
||||
//Refresh
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return assetPaths;
|
||||
}
|
||||
|
||||
private static void SetAtlasSpriteSettings(MA_TextureAtlasserProAtlas atlas, TextureExportSettings textureExportSettings, string savePath = EXPORT_ASSET_PATH)
|
||||
{
|
||||
//Foreach texture group
|
||||
for (int i = 0; i < atlas.textureGroupRegistration.Count; i++)
|
||||
{
|
||||
//Convert
|
||||
string textureName = atlas.name + "_" + atlas.textureGroupRegistration[i].name + '.' + textureExportSettings.textureFormat.ToString();
|
||||
TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(savePath + textureName);
|
||||
textureImporter.textureType = TextureImporterType.Sprite;
|
||||
textureImporter.alphaIsTransparency = true;
|
||||
|
||||
//Slice sprites.
|
||||
if (textureExportSettings.textureType == TextureType.SpriteSliced)
|
||||
{
|
||||
textureImporter.spriteImportMode = SpriteImportMode.None; //Reset it to update?
|
||||
textureImporter.spriteImportMode = SpriteImportMode.Multiple;
|
||||
List<SpriteMetaData> spriteMetaData = new List<SpriteMetaData>();
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
if (q.textureGroups != null && q.textureGroups[i].texture != null)
|
||||
{
|
||||
//Create new SpriteMetaData.
|
||||
SpriteMetaData smd = new SpriteMetaData
|
||||
{
|
||||
name = q.name,
|
||||
rect = new Rect(q.guiRect.x, atlas.textureAtlasSize.y - q.guiRect.y - q.guiRect.height, q.guiRect.width, q.guiRect.height)
|
||||
};
|
||||
|
||||
spriteMetaData.Add(smd);
|
||||
}
|
||||
}
|
||||
|
||||
textureImporter.spritesheet = spriteMetaData.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
textureImporter.spriteImportMode = SpriteImportMode.Single;
|
||||
}
|
||||
|
||||
textureImporter.SaveAndReimport();
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExportAtlasMaterial(MA_TextureAtlasserProAtlas atlas, MaterialExportSettings materialExportSettings, string[] textures = null, string savePath = EXPORT_ASSET_PATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null || atlas.textureGroupRegistration == null)
|
||||
return null;
|
||||
|
||||
string assetPath = "";
|
||||
|
||||
Shader shader = materialExportSettings.shader;
|
||||
if (shader)
|
||||
{
|
||||
Material material = new Material(shader)
|
||||
{
|
||||
name = atlas.name
|
||||
};
|
||||
|
||||
if (textures != null)
|
||||
{
|
||||
for (int i = 0; i < (int)Mathf.Min(materialExportSettings.shaderPropertyNames.Count, textures.Length); i++)
|
||||
{
|
||||
Texture t = AssetDatabase.LoadAssetAtPath<Texture>(textures[i]);
|
||||
if (t != null)
|
||||
{
|
||||
material.SetTexture(materialExportSettings.shaderPropertyNames[i], t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assetPath = savePath + material.name + ".mat";
|
||||
|
||||
//Save material
|
||||
AssetDatabase.CreateAsset(material, assetPath);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
return assetPath;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69c76c8a2967c4745a76f5bf5b494f7a
|
||||
timeCreated: 1519393169
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39bd4da4fed5aaf41858e1e23240cfca
|
||||
folderAsset: yes
|
||||
timeCreated: 1519389501
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b40a2786b518d6e41bfca3c464c9630e
|
||||
timeCreated: 1519763882
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -11,11 +11,13 @@ namespace MA_TextureAtlasserPro
|
||||
{
|
||||
private MA_TextureAtlasserProQuad lastSelectedQuad;
|
||||
|
||||
private bool isEditing = false;
|
||||
private bool isEditing = false;
|
||||
|
||||
private GUIStyle labelStyle = new GUIStyle(GUI.skin.label);
|
||||
|
||||
public MA_TextureAtlasserProInspectorView(MA_TextureAtlasserProWindow currentEditorWindow, string title) : base(currentEditorWindow, title)
|
||||
bool useAddMeshButton = false;
|
||||
|
||||
public MA_TextureAtlasserProInspectorView(MA_TextureAtlasserProWindow currentEditorWindow, string title) : base(currentEditorWindow, title)
|
||||
{
|
||||
|
||||
}
|
||||
@ -30,8 +32,21 @@ namespace MA_TextureAtlasserPro
|
||||
//Draw inspector
|
||||
if(curWindow.textureAtlas != null && curWindow.textureAtlas.selectedTextureQuad != null)
|
||||
{
|
||||
//Deselect GUI elements when we are focusing on a new quad
|
||||
if(lastSelectedQuad != curWindow.textureAtlas.selectedTextureQuad)
|
||||
//Change layout during layout event to prevent gui errors
|
||||
if (e.type == EventType.Layout)
|
||||
{
|
||||
if (curWindow.textureAtlas.selectedTextureQuad.meshes != null && curWindow.textureAtlas.selectedTextureQuad.meshes.Count == 0)
|
||||
{
|
||||
useAddMeshButton = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
useAddMeshButton = false;
|
||||
}
|
||||
}
|
||||
|
||||
//Deselect GUI elements when we are focusing on a new quad
|
||||
if (lastSelectedQuad != curWindow.textureAtlas.selectedTextureQuad)
|
||||
{
|
||||
lastSelectedQuad = curWindow.textureAtlas.selectedTextureQuad;
|
||||
GUI.FocusControl(null);
|
||||
@ -43,7 +58,7 @@ namespace MA_TextureAtlasserPro
|
||||
GUILayout.Label("Quad Name");
|
||||
curWindow.textureAtlas.selectedTextureQuad.name = EditorGUILayout.TextField(curWindow.textureAtlas.selectedTextureQuad.name);
|
||||
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEWOFFSET / 2);
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEW_OFFSET / 2);
|
||||
|
||||
//Textures
|
||||
GUILayout.BeginHorizontal();
|
||||
@ -83,19 +98,20 @@ namespace MA_TextureAtlasserPro
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEWOFFSET / 2);
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEW_OFFSET / 2);
|
||||
|
||||
//Meshes
|
||||
GUILayout.Label("Meshes");
|
||||
if(curWindow.textureAtlas.selectedTextureQuad.meshes != null)
|
||||
if (useAddMeshButton)
|
||||
{
|
||||
if (GUILayout.Button("+", EditorStyles.miniButton, GUILayout.ExpandWidth(true)))
|
||||
{
|
||||
curWindow.textureAtlas.selectedTextureQuad.meshes.Add(null);
|
||||
}
|
||||
}
|
||||
|
||||
if (curWindow.textureAtlas.selectedTextureQuad.meshes != null)
|
||||
{
|
||||
if(curWindow.textureAtlas.selectedTextureQuad.meshes.Count == 0)
|
||||
{
|
||||
if(GUILayout.Button("+", EditorStyles.miniButton, GUILayout.ExpandWidth(true)))
|
||||
{
|
||||
curWindow.textureAtlas.selectedTextureQuad.meshes.Add(null);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < curWindow.textureAtlas.selectedTextureQuad.meshes.Count; i++)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
@ -106,7 +122,7 @@ namespace MA_TextureAtlasserPro
|
||||
}
|
||||
if(GUILayout.Button("+", EditorStyles.miniButtonRight, GUILayout.ExpandWidth(false)))
|
||||
{
|
||||
curWindow.textureAtlas.selectedTextureQuad.meshes.Insert(i, null);
|
||||
curWindow.textureAtlas.selectedTextureQuad.meshes.Insert(i + 1, null);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
@ -116,20 +132,21 @@ namespace MA_TextureAtlasserPro
|
||||
curWindow.textureAtlas.selectedTextureQuad.meshes = new List<Mesh>();
|
||||
}
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
if(!MA_TextureAtlasserProUtils.IsPowerOfTwo((int)curWindow.textureAtlas.selectedTextureQuad.guiRect.width) || !MA_TextureAtlasserProUtils.IsPowerOfTwo((int)curWindow.textureAtlas.selectedTextureQuad.guiRect.height))
|
||||
{
|
||||
labelStyle.normal.textColor = Color.red;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelStyle.normal.textColor = Color.black;
|
||||
}
|
||||
|
||||
GUILayout.Label("x " + curWindow.textureAtlas.selectedTextureQuad.guiRect.x.ToString() + ", y " + curWindow.textureAtlas.selectedTextureQuad.guiRect.y.ToString());
|
||||
GUILayout.Label("w " + curWindow.textureAtlas.selectedTextureQuad.guiRect.width.ToString() + ", h " + curWindow.textureAtlas.selectedTextureQuad.guiRect.height.ToString(), labelStyle);
|
||||
GUILayout.FlexibleSpace();
|
||||
if (!MA_TextureAtlasserProUtils.IsPowerOfTwo((int)curWindow.textureAtlas.selectedTextureQuad.guiRect.width) || !MA_TextureAtlasserProUtils.IsPowerOfTwo((int)curWindow.textureAtlas.selectedTextureQuad.guiRect.height))
|
||||
{
|
||||
labelStyle.normal.textColor = Color.red;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelStyle.normal.textColor = Color.black;
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.Label("x " + curWindow.textureAtlas.selectedTextureQuad.guiRect.x.ToString() + ", y " + curWindow.textureAtlas.selectedTextureQuad.guiRect.y.ToString());
|
||||
GUILayout.Label("w " + curWindow.textureAtlas.selectedTextureQuad.guiRect.width.ToString() + ", h " + curWindow.textureAtlas.selectedTextureQuad.guiRect.height.ToString(), labelStyle);
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f17051e9a63503f4da7866616d67a6a2
|
||||
timeCreated: 1519505909
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -41,7 +41,7 @@ namespace MA_TextureAtlasserPro
|
||||
MA_TextureAtlasserProExportWindow.InitEditorWindow(curWindow);
|
||||
//MA_TextureAtlasserProUtils.ExportAtlas(curWindow.textureAtlas);
|
||||
}
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEWOFFSET);
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEW_OFFSET);
|
||||
if(curWindow.textureAtlas.showTextures && GUILayout.Button(MA_TextureAtlasserProIcons.showTexturesOnIcon, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
||||
{
|
||||
curWindow.textureAtlas.showTextures = false;
|
||||
@ -50,7 +50,7 @@ namespace MA_TextureAtlasserPro
|
||||
{
|
||||
curWindow.textureAtlas.showTextures = true;
|
||||
}
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEWOFFSET);
|
||||
GUILayout.Space(MA_TextureAtlasserProUtils.VIEW_OFFSET);
|
||||
if(GUILayout.Button(MA_TextureAtlasserProIcons.createQuadIcon, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
||||
{
|
||||
MA_TextureAtlasserProUtils.CreateTextureQuad(curWindow.textureAtlas, "new Quad", new Rect(0, 0, 128, 128), curWindow.settings.autoFocus);
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bed32b77d058ea141ac98ceac0159297
|
||||
timeCreated: 1519392331
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ad6305c01639b64f8defe0ce7d26067
|
||||
timeCreated: 1518210556
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6385799201fcbf246a8076f7fb2f4664
|
||||
timeCreated: 1519389695
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0bf15f61e8c967348960f91d78ef05ac
|
||||
folderAsset: yes
|
||||
timeCreated: 1519389493
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,88 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using MA_Editor;
|
||||
using MA_Texture;
|
||||
|
||||
namespace MA_TextureAtlasserPro
|
||||
{
|
||||
public class MA_TextureAtlasserProCreateExportWindow : EditorWindow
|
||||
{
|
||||
private const int windowHeight = 97;
|
||||
private const int windowWidth = 320;
|
||||
|
||||
//Editor
|
||||
private static MA_TextureAtlasserProCreateExportWindow thisWindow;
|
||||
public static MA_TextureAtlasserProWindow curWindow;
|
||||
|
||||
//Data
|
||||
string settingsName = "Settings name";
|
||||
bool nameError = true;
|
||||
|
||||
[MenuItem("MA_ToolKit/MA_TextureAtlasserPro/New Export Settings")]
|
||||
public static void Init()
|
||||
{
|
||||
InitWindow(null);
|
||||
}
|
||||
|
||||
public static void InitWindow(MA_TextureAtlasserProWindow currentEditorWindow)
|
||||
{
|
||||
curWindow = currentEditorWindow;
|
||||
|
||||
GetCurrentWindow();
|
||||
|
||||
thisWindow.minSize = new Vector2(windowWidth, windowHeight);
|
||||
thisWindow.maxSize = new Vector2(windowWidth, windowHeight);
|
||||
thisWindow.titleContent.text = "MA_CreateExportSettings";
|
||||
|
||||
thisWindow.Show();
|
||||
}
|
||||
|
||||
private static void GetCurrentWindow()
|
||||
{
|
||||
thisWindow = (MA_TextureAtlasserProCreateExportWindow)EditorWindow.GetWindow<MA_TextureAtlasserProCreateExportWindow>();
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(MA_TextureAtlasserProUtils.VIEW_OFFSET, MA_TextureAtlasserProUtils.VIEW_OFFSET, position.width - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2), position.height - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2)));
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
//Input options
|
||||
settingsName = EditorGUILayout.TextField("Settings name", settingsName, GUILayout.ExpandWidth(true));
|
||||
if (settingsName == "Settings name" || string.IsNullOrEmpty(settingsName))
|
||||
{
|
||||
nameError = true;
|
||||
GUI.backgroundColor = Color.red;
|
||||
GUILayout.Box("Error: Enter a valid settings name!", EditorStyles.helpBox);
|
||||
GUI.backgroundColor = Color.white;
|
||||
}
|
||||
else
|
||||
{
|
||||
nameError = false;
|
||||
}
|
||||
|
||||
//Create
|
||||
if (!nameError)
|
||||
{
|
||||
if (GUILayout.Button("Create!", GUILayout.ExpandWidth(true), GUILayout.Height(37)))
|
||||
{
|
||||
MA_TextureAtlasserProExportSettings exportSettings = MA_TextureAtlasserProUtils.CreateExportSettings(settingsName, true);
|
||||
|
||||
if (curWindow != null && curWindow.textureAtlas != null)
|
||||
{
|
||||
curWindow.textureAtlas.exportSettings = exportSettings;
|
||||
}
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00058117c24864541a3f85fc4f18f89e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -95,7 +95,7 @@ namespace MA_TextureAtlasserPro
|
||||
|
||||
if(isLoaded)
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(MA_TextureAtlasserProUtils.VIEWOFFSET, MA_TextureAtlasserProUtils.VIEWOFFSET, position.width - (MA_TextureAtlasserProUtils.VIEWOFFSET * 2), position.height - (MA_TextureAtlasserProUtils.VIEWOFFSET * 2)));
|
||||
GUILayout.BeginArea(new Rect(MA_TextureAtlasserProUtils.VIEW_OFFSET, MA_TextureAtlasserProUtils.VIEW_OFFSET, position.width - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2), position.height - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2)));
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
//Input options
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fadd3a216ba8658458040ed46c0d032e
|
||||
timeCreated: 1519504375
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,251 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using MA_Editor;
|
||||
using MA_Texture;
|
||||
|
||||
namespace MA_TextureAtlasserPro
|
||||
{
|
||||
public class MA_TextureAtlasserProExportWindow : EditorWindow
|
||||
{
|
||||
private const int windowHeight = 385;
|
||||
private const int windowWidth = 320;
|
||||
|
||||
//Editor
|
||||
private static MA_TextureAtlasserProExportWindow thisWindow;
|
||||
public static MA_TextureAtlasserProWindow curWindow;
|
||||
|
||||
//Data
|
||||
private static bool isLoaded = false; //Make sure we wait a frame at the start to setup and don't draw.
|
||||
private Vector2 scrollPos;
|
||||
|
||||
[MenuItem("MA_ToolKit/MA_TextureAtlasserPro/Export Atlas")]
|
||||
private static void Init()
|
||||
{
|
||||
GetCurrentWindow();
|
||||
|
||||
thisWindow.minSize = new Vector2(windowWidth, windowHeight);
|
||||
thisWindow.titleContent.text = "MA_ExportTextureAtlas";
|
||||
|
||||
thisWindow.Show();
|
||||
}
|
||||
|
||||
public static void InitEditorWindow(MA_TextureAtlasserProWindow currentEditorWindow)
|
||||
{
|
||||
curWindow = currentEditorWindow;
|
||||
|
||||
GetCurrentWindow();
|
||||
|
||||
thisWindow.minSize = new Vector2(windowWidth, windowHeight);
|
||||
thisWindow.titleContent.text = "MA_ExportTextureAtlas";
|
||||
|
||||
thisWindow.Show();
|
||||
}
|
||||
|
||||
private static void GetCurrentWindow()
|
||||
{
|
||||
thisWindow = (MA_TextureAtlasserProExportWindow)EditorWindow.GetWindow<MA_TextureAtlasserProExportWindow>();
|
||||
}
|
||||
|
||||
private void CloseWindow()
|
||||
{
|
||||
if(thisWindow == null)
|
||||
{
|
||||
GetCurrentWindow();
|
||||
thisWindow.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
thisWindow.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private Event ProcessEvents()
|
||||
{
|
||||
Event e = Event.current;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
[UnityEditor.Callbacks.DidReloadScripts]
|
||||
private static void OnReload()
|
||||
{
|
||||
//Make sure that when the compiler is finished and reloads the scripts, we are waiting for the next Event.
|
||||
isLoaded = false;
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if(thisWindow == null)
|
||||
{
|
||||
GetCurrentWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
//Get current event
|
||||
Event e = ProcessEvents();
|
||||
|
||||
if(isLoaded)
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(MA_TextureAtlasserProUtils.VIEW_OFFSET, MA_TextureAtlasserProUtils.VIEW_OFFSET, position.width - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2), position.height - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2)));
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
if (curWindow != null && curWindow.textureAtlas != null)
|
||||
{
|
||||
//Export
|
||||
GUILayout.BeginVertical();
|
||||
DrawExportMenu();
|
||||
|
||||
curWindow.textureAtlas.exportSettings = (MA_TextureAtlasserProExportSettings)EditorGUILayout.ObjectField(curWindow.textureAtlas.exportSettings, typeof(MA_TextureAtlasserProExportSettings), false);
|
||||
|
||||
if(curWindow.textureAtlas.exportSettings != null)
|
||||
{
|
||||
DrawExportOptions();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
else if(curWindow == null)
|
||||
{
|
||||
GUI.backgroundColor = Color.red;
|
||||
GUILayout.Box("Error: Link with the Texture Atlas Editor lost!", EditorStyles.helpBox);
|
||||
if(GUILayout.Button("Link Atlas Editor", GUILayout.ExpandWidth(true), GUILayout.Height(37)))
|
||||
{
|
||||
curWindow = (MA_TextureAtlasserProWindow)EditorWindow.GetWindow<MA_TextureAtlasserProWindow>();
|
||||
}
|
||||
GUI.backgroundColor = Color.white;
|
||||
}
|
||||
else if(curWindow.textureAtlas == null)
|
||||
{
|
||||
GUI.backgroundColor = Color.red;
|
||||
GUILayout.Box("Error: No Texture Atlas found make sure to open one!", EditorStyles.helpBox);
|
||||
GUI.backgroundColor = Color.white;
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
if(e.type == EventType.Repaint)
|
||||
isLoaded = true;
|
||||
}
|
||||
|
||||
private void DrawExportMenu()
|
||||
{
|
||||
GUILayout.BeginHorizontal(EditorStyles.helpBox, GUILayout.Height(44));
|
||||
|
||||
if (GUILayout.Button(MA_TextureAtlasserProIcons.createAtlasIcon, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
||||
{
|
||||
MA_TextureAtlasserProCreateExportWindow.InitWindow(curWindow);
|
||||
}
|
||||
|
||||
bool wasEnabled = GUI.enabled;
|
||||
|
||||
if (curWindow.textureAtlas.exportSettings != null)
|
||||
{
|
||||
GUI.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.enabled = false;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Export", GUILayout.ExpandWidth(true), GUILayout.Height(37)))
|
||||
{
|
||||
bool export = false;
|
||||
|
||||
if(curWindow.textureAtlas.exportSettings.modelExportSettings.modelFormat == ModelFormat.ReplaceMesh)
|
||||
{
|
||||
if(EditorUtility.DisplayDialog("Replace original models?", "Are you sure you want to replace the original models, this can't be undone!", "Replace", "Cancel"))
|
||||
{
|
||||
export = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
export = true;
|
||||
}
|
||||
|
||||
if(export)
|
||||
{
|
||||
string[] textures = null;
|
||||
string material = null;
|
||||
string[] models = null;
|
||||
|
||||
if (curWindow.textureAtlas.exportSettings.exportTextures)
|
||||
{
|
||||
textures = MA_TextureAtlasserProUtils.ExportAtlasTextures(curWindow.textureAtlas, curWindow.textureAtlas.exportSettings.textureExportSettings);
|
||||
}
|
||||
|
||||
if(curWindow.textureAtlas.exportSettings.exportMaterials)
|
||||
{
|
||||
material = MA_TextureAtlasserProUtils.ExportAtlasMaterial(curWindow.textureAtlas, curWindow.textureAtlas.exportSettings.materialExportSettings, textures: textures);
|
||||
}
|
||||
|
||||
if(curWindow.textureAtlas.exportSettings.exportModels)
|
||||
{
|
||||
models = MA_TextureAtlasserProUtils.ExportAtlasModels(curWindow.textureAtlas, curWindow.textureAtlas.exportSettings.modelExportSettings, material: material);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GUI.enabled = wasEnabled;
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void DrawExportOptions()
|
||||
{
|
||||
bool wasEnabled = GUI.enabled;
|
||||
|
||||
if (curWindow.textureAtlas.exportSettings.canModify)
|
||||
{
|
||||
GUI.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.enabled = false;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
curWindow.textureAtlas.exportSettings.exportModels = GUILayout.Toggle(curWindow.textureAtlas.exportSettings.exportModels, "Models:", EditorStyles.toggle);
|
||||
curWindow.textureAtlas.exportSettings.modelExportSettings.modelFormat = (ModelFormat)EditorGUILayout.EnumPopup("ModelFormat:", curWindow.textureAtlas.exportSettings.modelExportSettings.modelFormat);
|
||||
curWindow.textureAtlas.exportSettings.modelExportSettings.uvFlipY = EditorGUILayout.Toggle("UV FlipY:", curWindow.textureAtlas.exportSettings.modelExportSettings.uvFlipY);
|
||||
curWindow.textureAtlas.exportSettings.modelExportSettings.uvChannel = EditorGUILayout.IntField("UV Channel:", curWindow.textureAtlas.exportSettings.modelExportSettings.uvChannel);
|
||||
curWindow.textureAtlas.exportSettings.modelExportSettings.uvWrap = EditorGUILayout.Toggle("UV Wrap:", curWindow.textureAtlas.exportSettings.modelExportSettings.uvWrap);
|
||||
|
||||
curWindow.textureAtlas.exportSettings.exportTextures = GUILayout.Toggle(curWindow.textureAtlas.exportSettings.exportTextures, "Textures:", EditorStyles.toggle);
|
||||
curWindow.textureAtlas.exportSettings.textureExportSettings.textureFormat = (TextureFormat)EditorGUILayout.EnumPopup("TextureFormat:", curWindow.textureAtlas.exportSettings.textureExportSettings.textureFormat);
|
||||
curWindow.textureAtlas.exportSettings.textureExportSettings.textureType = (TextureType)EditorGUILayout.EnumPopup("TextureType:", curWindow.textureAtlas.exportSettings.textureExportSettings.textureType);
|
||||
curWindow.textureAtlas.exportSettings.textureExportSettings.textureScaleMode = (MA_TextureUtils.TextureScaleMode)EditorGUILayout.EnumPopup("TextureScaleMode:", curWindow.textureAtlas.exportSettings.textureExportSettings.textureScaleMode);
|
||||
|
||||
curWindow.textureAtlas.exportSettings.exportMaterials = GUILayout.Toggle(curWindow.textureAtlas.exportSettings.exportMaterials, "Materials:", EditorStyles.toggle);
|
||||
curWindow.textureAtlas.exportSettings.materialExportSettings.shader = (Shader)EditorGUILayout.ObjectField("Shader:", curWindow.textureAtlas.exportSettings.materialExportSettings.shader, typeof(UnityEngine.Shader), false);
|
||||
|
||||
scrollPos = EditorGUILayout.BeginScrollView(scrollPos, false, false, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
|
||||
for (int i = 0; i < curWindow.textureAtlas.exportSettings.materialExportSettings.shaderPropertyNames.Count; i++)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
curWindow.textureAtlas.exportSettings.materialExportSettings.shaderPropertyNames[i] = EditorGUILayout.TextField("", curWindow.textureAtlas.exportSettings.materialExportSettings.shaderPropertyNames[i]);
|
||||
if (GUILayout.Button("-", EditorStyles.miniButtonLeft, GUILayout.ExpandWidth(false)))
|
||||
{
|
||||
curWindow.textureAtlas.exportSettings.materialExportSettings.shaderPropertyNames.RemoveAt(i);
|
||||
}
|
||||
if (GUILayout.Button("+", EditorStyles.miniButtonRight, GUILayout.ExpandWidth(false)))
|
||||
{
|
||||
curWindow.textureAtlas.exportSettings.materialExportSettings.shaderPropertyNames.Insert(i + 1, "");
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
GUI.enabled = wasEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 142cd2d260a4ef948a2f16b16cd9e00e
|
||||
timeCreated: 1521826727
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -100,9 +100,9 @@ namespace MA_TextureAtlasserPro
|
||||
|
||||
//Calculate view rects
|
||||
Rect workViewRect = new Rect(position.width - position.width, position.height - position.height, position.width, position.height);
|
||||
Rect debugViewRect = new Rect(position.width - MA_TextureAtlasserProUtils.VIEWOFFSET - 164, position.height - MA_TextureAtlasserProUtils.VIEWOFFSET - 22, 164, 22);
|
||||
Rect menuViewRect = new Rect(MA_TextureAtlasserProUtils.VIEWOFFSET, MA_TextureAtlasserProUtils.VIEWOFFSET, position.width - (MA_TextureAtlasserProUtils.VIEWOFFSET * 2), 44);
|
||||
Rect inspectorViewRect = new Rect(MA_TextureAtlasserProUtils.VIEWOFFSET, menuViewRect.y + menuViewRect.height + MA_TextureAtlasserProUtils.VIEWOFFSET, 164, position.height - menuViewRect.height - (MA_TextureAtlasserProUtils.VIEWOFFSET * 3));
|
||||
Rect debugViewRect = new Rect(position.width - MA_TextureAtlasserProUtils.VIEW_OFFSET - 164, position.height - MA_TextureAtlasserProUtils.VIEW_OFFSET - 22, 164, 22);
|
||||
Rect menuViewRect = new Rect(MA_TextureAtlasserProUtils.VIEW_OFFSET, MA_TextureAtlasserProUtils.VIEW_OFFSET, position.width - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 2), 44);
|
||||
Rect inspectorViewRect = new Rect(MA_TextureAtlasserProUtils.VIEW_OFFSET, menuViewRect.y + menuViewRect.height + MA_TextureAtlasserProUtils.VIEW_OFFSET, 164, position.height - menuViewRect.height - (MA_TextureAtlasserProUtils.VIEW_OFFSET * 3));
|
||||
|
||||
//Draw views and windows in the right oder from back to front
|
||||
if(isLoaded)
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21fee5883ec8a9c4c911f3c40ab47ecf
|
||||
timeCreated: 1519392331
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_Utilities.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b68846f992a7304189ffd3ff39072ff
|
||||
folderAsset: yes
|
||||
timeCreated: 1518369341
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_Utilities/EditorUtils.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6aa9d38bd8e54d0448095604d7d62fd1
|
||||
folderAsset: yes
|
||||
timeCreated: 1522672244
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64df885d83caddf48acfa78533a3e76f
|
||||
timeCreated: 1522672827
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ec1c2403bd92a84798e0ad68ebf4bad
|
||||
timeCreated: 1522671138
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea365137c05cbd64489983567390af51
|
||||
timeCreated: 1522669939
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_Utilities/MeshUtils.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac03fa4896f5ed74c80155bbbfccd958
|
||||
folderAsset: yes
|
||||
timeCreated: 1522672266
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
273
Assets/MA_ToolBox/MA_Utilities/MeshUtils/MA_MeshUtils.cs
Normal file
@ -0,0 +1,273 @@
|
||||
//https://github.com/maxartz15/MA_MeshUtils
|
||||
|
||||
//References:
|
||||
//http://wiki.unity3d.com/index.php?title=ObjExporter
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace MA_Mesh
|
||||
{
|
||||
public static class MA_MeshUtils
|
||||
{
|
||||
public static string MA_SaveMeshAsset(Mesh mesh, string savePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(mesh.name))
|
||||
{
|
||||
mesh.name = UnityEngine.Random.Range(11111, 99999).ToString();
|
||||
}
|
||||
|
||||
string assetPath = savePath + mesh.name + ".asset";
|
||||
|
||||
AssetDatabase.CreateAsset(mesh, assetPath);
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
return assetPath;
|
||||
}
|
||||
|
||||
public static string MA_SaveMeshPrefab(Mesh mesh, string prefabName, string savePath, string materialPath)
|
||||
{
|
||||
string assetPath = null;
|
||||
|
||||
string meshAssetPath = MA_SaveMeshAsset(mesh, savePath);
|
||||
Mesh meshAsset = AssetDatabase.LoadAssetAtPath<Mesh>(meshAssetPath);
|
||||
|
||||
if (meshAsset != null)
|
||||
{
|
||||
GameObject gameObject = new GameObject
|
||||
{
|
||||
name = prefabName
|
||||
};
|
||||
|
||||
gameObject.AddComponent<MeshFilter>().mesh = meshAsset;
|
||||
gameObject.AddComponent<MeshRenderer>();
|
||||
|
||||
Material curMaterial = AssetDatabase.LoadAssetAtPath<Material>(materialPath);
|
||||
if (curMaterial != null)
|
||||
{
|
||||
gameObject.GetComponent<MeshRenderer>().material = curMaterial;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(prefabName))
|
||||
{
|
||||
prefabName = UnityEngine.Random.Range(11111, 99999).ToString();
|
||||
}
|
||||
|
||||
assetPath = savePath + prefabName + ".prefab";
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
|
||||
PrefabUtility.SaveAsPrefabAsset(gameObject, assetPath);
|
||||
|
||||
#else
|
||||
|
||||
GameObject go = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
|
||||
if (go != null)
|
||||
{
|
||||
PrefabUtility.ReplacePrefab(gameObject, go, ReplacePrefabOptions.ReplaceNameBased);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrefabUtility.CreatePrefab(assetPath, gameObject, ReplacePrefabOptions.ReplaceNameBased);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
UnityEngine.GameObject.DestroyImmediate(gameObject);
|
||||
}
|
||||
|
||||
return assetPath;
|
||||
}
|
||||
|
||||
public static Mesh MA_DuplicateMesh(Mesh mesh)
|
||||
{
|
||||
Mesh newMesh = new Mesh
|
||||
{
|
||||
name = mesh.name,
|
||||
bounds = mesh.bounds,
|
||||
subMeshCount = mesh.subMeshCount
|
||||
};
|
||||
|
||||
newMesh.SetVertices(new List<Vector3>(mesh.vertices));
|
||||
for (int i = 0; i < mesh.subMeshCount; i++)
|
||||
{
|
||||
newMesh.SetTriangles(mesh.GetTriangles(i), i);
|
||||
}
|
||||
newMesh.SetNormals(new List<Vector3>(mesh.normals));
|
||||
newMesh.SetUVs(0, new List<Vector2>(mesh.uv));
|
||||
newMesh.SetTangents(new List<Vector4>(mesh.tangents));
|
||||
newMesh.SetColors(new List<Color>(mesh.colors));
|
||||
|
||||
return newMesh;
|
||||
}
|
||||
|
||||
public static Mesh MA_ReMapUV(this Mesh mesh, Vector2 atlasSize, Vector2 textureSize, Vector2 texturePosition, int uvChannel = 0)
|
||||
{
|
||||
/*
|
||||
0 1
|
||||
512 x 512
|
||||
|
||||
0 .5 = 1 / 512 * 256
|
||||
256 x 256
|
||||
|
||||
+ pos
|
||||
*/
|
||||
|
||||
List<Vector2> uvs = new List<Vector2>();
|
||||
|
||||
//Get UV's
|
||||
mesh.GetUVs(uvChannel, uvs);
|
||||
|
||||
foreach (Vector2 uvCordinate in uvs)
|
||||
{
|
||||
float x = (uvCordinate.x / atlasSize.x * textureSize.x) + texturePosition.x;
|
||||
float y = (uvCordinate.y / atlasSize.y * textureSize.y) + texturePosition.y;
|
||||
uvCordinate.Set(x, y);
|
||||
}
|
||||
|
||||
mesh.SetUVs(uvChannel, uvs);
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
public static Mesh MA_UVReMap(this Mesh mesh, Vector2 atlasSize, Rect textureRect, int uvChannel = 0, bool flipY = true, bool wrap = true)
|
||||
{
|
||||
//Get UV's
|
||||
List<Vector2> uvs = new List<Vector2>();
|
||||
mesh.GetUVs(uvChannel, uvs);
|
||||
|
||||
//Min and max bounds in 0-1 space.
|
||||
float xMin, xMax, yMin, yMax;
|
||||
xMin = (1f / atlasSize.x * textureRect.width);
|
||||
xMax = (1f / atlasSize.x * textureRect.x);
|
||||
yMin = (1f / atlasSize.y * textureRect.height);
|
||||
|
||||
//Flip uv's if needed.
|
||||
if (flipY)
|
||||
{
|
||||
yMax = (1f / atlasSize.y * (atlasSize.y - textureRect.height - textureRect.y));
|
||||
}
|
||||
else
|
||||
{
|
||||
yMax = (1f / atlasSize.y * textureRect.y);
|
||||
}
|
||||
|
||||
for (int i = 0; i < uvs.Count; i++)
|
||||
{
|
||||
float newX = uvs[i].x * xMin + xMax;
|
||||
float newY = uvs[i].y * yMin + yMax;
|
||||
|
||||
//Wrap the verts outside of the uv space around back into the uv space.
|
||||
if (wrap)
|
||||
{
|
||||
newX = Wrap(newX, xMax, xMin + xMax);
|
||||
newY = Wrap(newY, yMax, yMin + yMax);
|
||||
}
|
||||
|
||||
uvs[i] = new Vector2(newX, newY);
|
||||
}
|
||||
|
||||
mesh.SetUVs(uvChannel, uvs);
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
public static float Wrap(float val, float min, float max)
|
||||
{
|
||||
val -= (float)Math.Round((val - min) / (max - min)) * (max - min);
|
||||
if (val < min)
|
||||
val = val + max - min;
|
||||
return val;
|
||||
}
|
||||
|
||||
//Start http://wiki.unity3d.com/index.php?title=ObjExporter
|
||||
public static string MeshToString(Mesh mesh)
|
||||
{
|
||||
int vertexOffset = 0;
|
||||
int normalOffset = 0;
|
||||
int uvOffset = 0;
|
||||
|
||||
Material material = new Material(Shader.Find("Standard"));
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("g ").Append(mesh.name).Append("\n");
|
||||
|
||||
foreach (Vector3 v in mesh.vertices)
|
||||
{
|
||||
//This is sort of ugly - inverting x-component since we're in
|
||||
//a different coordinate system than "everyone" is "used to".
|
||||
sb.Append(string.Format("v {0} {1} {2}\n", -v.x, v.y, v.z));
|
||||
}
|
||||
|
||||
sb.Append("\n");
|
||||
|
||||
foreach (Vector3 v in mesh.normals)
|
||||
{
|
||||
sb.Append(string.Format("vn {0} {1} {2}\n", -v.x, v.y, v.z));
|
||||
}
|
||||
|
||||
sb.Append("\n");
|
||||
|
||||
foreach (Vector3 v in mesh.uv)
|
||||
{
|
||||
sb.Append(string.Format("vt {0} {1}\n", v.x, v.y));
|
||||
}
|
||||
|
||||
for (int m = 0; m < mesh.subMeshCount; m++)
|
||||
{
|
||||
sb.Append("\n");
|
||||
sb.Append("usemtl ").Append(material.name + m).Append("\n");
|
||||
sb.Append("usemap ").Append(material.name + m).Append("\n");
|
||||
|
||||
// int[] triangles = mesh.GetTriangles(m);
|
||||
// for (int i = 0; i < triangles.Length; i += 3)
|
||||
// {
|
||||
// sb.Append(string.Format("f {0}/{0}/{0} {1}/{1}/{1} {2}/{2}/{2}\n", triangles[i]+1, triangles[i+1]+1, triangles[i+2]+1));
|
||||
// }
|
||||
|
||||
int[] triangles = mesh.GetTriangles(m);
|
||||
for (int i = 0; i < triangles.Length; i += 3)
|
||||
{
|
||||
//Because we inverted the x-component, we also needed to alter the triangle winding.
|
||||
sb.Append(string.Format("f {1}/{1}/{1} {0}/{0}/{0} {2}/{2}/{2}\n", triangles[i] + 1 + vertexOffset, triangles[i + 1] + 1 + normalOffset, triangles[i + 2] + 1 + uvOffset));
|
||||
}
|
||||
}
|
||||
|
||||
//vertexOffset += mesh.vertices.Length;
|
||||
//normalOffset += mesh.normals.Length;
|
||||
//uvOffset += mesh.uv.Length;
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string MeshToFile(Mesh mesh, string filename, string savePath)
|
||||
{
|
||||
string assetPath = savePath + filename + ".obj";
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(assetPath))
|
||||
{
|
||||
sw.Write(MeshToString(mesh));
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return assetPath;
|
||||
}
|
||||
//End
|
||||
}
|
||||
|
||||
//struct ObjMaterial
|
||||
//{
|
||||
// public string name;
|
||||
// public string textureName;
|
||||
//}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8292e68eba0ff5488f218a303e60a5b
|
||||
timeCreated: 1518370877
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/MA_ToolBox/MA_Utilities/TextureUtils.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9727f759199d13e4e814f5fb3b8a41de
|
||||
folderAsset: yes
|
||||
timeCreated: 1522672279
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -41,7 +41,7 @@ namespace MA_Texture
|
||||
RenderTexture.active = tmp;
|
||||
|
||||
// Create a new readable Texture2D to copy the pixels to it
|
||||
Texture2D myTexture2D = new Texture2D(texture.width, texture.width);
|
||||
Texture2D myTexture2D = new Texture2D(texture.width, texture.height);
|
||||
|
||||
// Copy the pixels from the RenderTexture to the new Texture
|
||||
myTexture2D.ReadPixels(new Rect(0, 0, tmp.width, tmp.height), 0, 0);
|
||||
@ -161,17 +161,20 @@ namespace MA_Texture
|
||||
{
|
||||
Color[] newColors = new Color[newWidth * newHeight];
|
||||
|
||||
float ratioX = ((float)curWidth) / newWidth;
|
||||
float ratioY = ((float)curHeight) / newHeight;
|
||||
float ratioX = 1.0f / ((float)newWidth / (curWidth - 1));
|
||||
float ratioY = 1.0f / ((float)newHeight / (curHeight - 1));
|
||||
|
||||
for (int y = 0; y < newHeight; y++)
|
||||
for (int y = 0; y < newHeight; y++)
|
||||
{
|
||||
var thisY = Mathf.RoundToInt((ratioY * y) * curWidth);
|
||||
var yw = y * newWidth;
|
||||
int yFloor = Mathf.FloorToInt(y * ratioY);
|
||||
var y1 = (yFloor + 1) * curWidth;
|
||||
var yw = y * newWidth;
|
||||
|
||||
for (int x = 0; x < newWidth; x++)
|
||||
for (int x = 0; x < newWidth; x++)
|
||||
{
|
||||
newColors[yw + x] = curColors[Mathf.RoundToInt(thisY + ratioX * x)];
|
||||
int xFloor = Mathf.FloorToInt(x * ratioX);
|
||||
|
||||
newColors[yw + x] = curColors[Mathf.RoundToInt(y1 + xFloor)];
|
||||
}
|
||||
}
|
||||
|
||||
@ -218,7 +221,7 @@ namespace MA_Texture
|
||||
public static Texture MA_Combine(this Texture texture, Texture combineTexture, int offsetX, int offsetY)
|
||||
{
|
||||
Texture2D texture2D = (Texture2D)MA_TextureUtils.ConvertToReadableTexture(texture);
|
||||
Texture2D combineTexture2D = (Texture2D)MA_TextureUtils.ConvertToReadableTexture(texture);
|
||||
Texture2D combineTexture2D = (Texture2D)MA_TextureUtils.ConvertToReadableTexture(combineTexture);
|
||||
|
||||
texture = texture2D.MA_Combine2D(combineTexture2D, offsetX, offsetY);
|
||||
|
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a156d40c509995b4bbc8c259cdac9519
|
||||
timeCreated: 1518369341
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Max Kruf
|
||||
Copyright (c) 2019 Max Kruf
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1 +0,0 @@
|
||||
The created atlasses wil go here.
|
@ -1 +0,0 @@
|
||||
The exported assets will be saved in this folder.
|
@ -1,517 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using MA_Mesh;
|
||||
using MA_Texture;
|
||||
|
||||
namespace MA_TextureAtlasserPro
|
||||
{
|
||||
public enum ExportPreset
|
||||
{
|
||||
Custom,
|
||||
Default,
|
||||
Sprites,
|
||||
ReplaceObjMeshes
|
||||
}
|
||||
|
||||
public enum ModelFormat
|
||||
{
|
||||
None,
|
||||
Obj,
|
||||
ReplaceObj
|
||||
}
|
||||
|
||||
public enum TextureFormat
|
||||
{
|
||||
None,
|
||||
Png
|
||||
}
|
||||
|
||||
public enum TextureType
|
||||
{
|
||||
Default,
|
||||
Sprite,
|
||||
SpriteSliced
|
||||
}
|
||||
|
||||
public static class MA_TextureAtlasserProUtils
|
||||
{
|
||||
public const string SETTINGSASSETPATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Settings/";
|
||||
public const string SAVEASSETPATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Atlasses/";
|
||||
public const string LOADASSETPATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Atlasses/";
|
||||
public const string EXPORTASSETPATH = "Assets/MA_ToolBox/MA_TextureAtlasserPro/Exports/";
|
||||
public const float VIEWOFFSET = 20;
|
||||
public const string DEFAULTTEXTUREGROUPNAME = "Albedo";
|
||||
|
||||
public static MA_TextureAtlasserProSettings CreateSettings()
|
||||
{
|
||||
MA_TextureAtlasserProSettings _settings = ScriptableObject.CreateInstance<MA_TextureAtlasserProSettings>();
|
||||
|
||||
if(_settings != null)
|
||||
{
|
||||
AssetDatabase.CreateAsset(_settings, SETTINGSASSETPATH + "MA_TextureAtlasserProSettings.asset");
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return _settings;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProSettings LoadSettings()
|
||||
{
|
||||
MA_TextureAtlasserProSettings _settings = AssetDatabase.LoadAssetAtPath(SETTINGSASSETPATH + "MA_TextureAtlasserProSettings.asset", typeof(MA_TextureAtlasserProSettings)) as MA_TextureAtlasserProSettings;
|
||||
|
||||
if (_settings == null)
|
||||
{
|
||||
_settings = CreateSettings();
|
||||
}
|
||||
|
||||
return _settings;
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProAtlas CreateTextureAtlas(string name, Vector2 size)
|
||||
{
|
||||
MA_TextureAtlasserProAtlas _atlas = ScriptableObject.CreateInstance<MA_TextureAtlasserProAtlas>();
|
||||
|
||||
if(_atlas != null)
|
||||
{
|
||||
_atlas.CreateAtlas(name, size);
|
||||
MA_CheckTextureAtlas(_atlas);
|
||||
|
||||
AssetDatabase.CreateAsset(_atlas, SAVEASSETPATH + name + ".asset");
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
return _atlas;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProAtlas LoadTextureAtlas()
|
||||
{
|
||||
MA_TextureAtlasserProAtlas _atlas = null;
|
||||
string absPath = EditorUtility.OpenFilePanel("Select Texture Atlas", LOADASSETPATH, "");
|
||||
|
||||
if(absPath.StartsWith(Application.dataPath))
|
||||
{
|
||||
string relPath = absPath.Substring(Application.dataPath.Length - "Assets".Length);
|
||||
_atlas = AssetDatabase.LoadAssetAtPath(relPath, typeof(MA_TextureAtlasserProAtlas)) as MA_TextureAtlasserProAtlas;
|
||||
|
||||
MA_CheckTextureAtlas(_atlas);
|
||||
|
||||
if(_atlas)
|
||||
{
|
||||
EditorPrefs.SetString("AtlasPath", null);
|
||||
}
|
||||
}
|
||||
|
||||
if(_atlas != null)
|
||||
{
|
||||
if(_atlas.selectedTextureQuad != null)
|
||||
{
|
||||
_atlas.selectedTextureQuad.isSelected = false;
|
||||
}
|
||||
_atlas.selectedTextureQuad = null;
|
||||
}
|
||||
|
||||
return _atlas;
|
||||
}
|
||||
|
||||
public static void MA_CheckTextureAtlas(MA_TextureAtlasserProAtlas atlas)
|
||||
{
|
||||
if(atlas.textureGroupRegistration == null)
|
||||
{
|
||||
atlas.textureGroupRegistration = new List<MA_TextureGroupRegistration>();
|
||||
|
||||
MA_TextureGroupRegistration groupRegistration = new MA_TextureGroupRegistration();
|
||||
groupRegistration.name = DEFAULTTEXTUREGROUPNAME;
|
||||
|
||||
atlas.textureGroupRegistration.Add(groupRegistration);
|
||||
}
|
||||
|
||||
if(atlas.textureQuads == null)
|
||||
{
|
||||
atlas.textureQuads = new List<MA_TextureAtlasserProQuad>();
|
||||
}
|
||||
else
|
||||
{
|
||||
bool _sameCount = true;
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
if(q.textureGroups.Count != atlas.textureGroupRegistration.Count)
|
||||
{
|
||||
_sameCount = false;
|
||||
Debug.LogWarning("TextureAtlasser: " + q.name + " doesn't have the right amount of texture groups!");
|
||||
}
|
||||
}
|
||||
|
||||
if(_sameCount)
|
||||
{
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
for (int i = 0; i < atlas.textureQuads.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < atlas.textureGroupRegistration.Count; j++)
|
||||
{
|
||||
if(atlas.textureQuads[i].textureGroups[j].name != atlas.textureGroupRegistration[j].name)
|
||||
{
|
||||
Debug.LogWarning("TextureAtlasser: " + q.name + " doesn't have the right texture group name!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static MA_TextureAtlasserProQuad CreateTextureQuad(MA_TextureAtlasserProAtlas atlas, string name, Rect rect, bool focus = true)
|
||||
{
|
||||
if(atlas != null)
|
||||
{
|
||||
//Create new list if we haven't one already
|
||||
if(atlas.textureQuads == null)
|
||||
{
|
||||
atlas.textureQuads = new List<MA_TextureAtlasserProQuad>();
|
||||
}
|
||||
|
||||
//Create new quad
|
||||
MA_TextureAtlasserProQuad _quad = ScriptableObject.CreateInstance<MA_TextureAtlasserProQuad>();
|
||||
|
||||
//Add quad to asset
|
||||
if(_quad != null)
|
||||
{
|
||||
//Set quad settings
|
||||
_quad.name = name;
|
||||
_quad.rect = rect;
|
||||
|
||||
SetTextureGroups(atlas, _quad);
|
||||
|
||||
atlas.textureQuads.Add(_quad);
|
||||
|
||||
AssetDatabase.AddObjectToAsset(_quad, atlas);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
if(focus)
|
||||
{
|
||||
atlas.selectedTextureQuad = atlas.textureQuads[atlas.textureQuads.Count - 1];
|
||||
}
|
||||
|
||||
return _quad;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("CreateTextureQuad Failed: _TextureQuad");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("CreateTextureQuad Failed: textureAtlas");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void RemoveTextureQuad(MA_TextureAtlasserProAtlas atlas, bool focus = true)
|
||||
{
|
||||
if(atlas != null && atlas.selectedTextureQuad != null)
|
||||
{
|
||||
int _index = atlas.textureQuads.IndexOf(atlas.selectedTextureQuad);
|
||||
|
||||
atlas.textureQuads.RemoveAt(_index);
|
||||
Object.DestroyImmediate(atlas.selectedTextureQuad, true);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
if (focus && atlas.textureQuads.Count > 0)
|
||||
{
|
||||
_index = Mathf.Clamp(_index, 0, atlas.textureQuads.Count - 1);
|
||||
atlas.selectedTextureQuad = atlas.textureQuads[_index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DuplicateTextureQuad(MA_TextureAtlasserProAtlas atlas, bool focus = true, bool copyData = false, string namePrefix = "new ")
|
||||
{
|
||||
if(atlas != null && atlas.selectedTextureQuad != null)
|
||||
{
|
||||
MA_TextureAtlasserProQuad q = CreateTextureQuad(atlas, namePrefix + atlas.selectedTextureQuad.name, atlas.selectedTextureQuad.rect, false);
|
||||
|
||||
if (copyData)
|
||||
{
|
||||
q.meshes = atlas.selectedTextureQuad.meshes;
|
||||
|
||||
for (int i = 0; i < atlas.selectedTextureQuad.textureGroups.Count; i++)
|
||||
{
|
||||
q.textureGroups[i].texture = atlas.selectedTextureQuad.textureGroups[i].texture;
|
||||
}
|
||||
}
|
||||
|
||||
if(focus)
|
||||
{
|
||||
atlas.selectedTextureQuad = q;
|
||||
}
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetTextureGroups(MA_TextureAtlasserProAtlas atlas, MA_TextureAtlasserProQuad quad)
|
||||
{
|
||||
if(quad.textureGroups == null)
|
||||
{
|
||||
quad.textureGroups = new List<MA_TextureGroup>();
|
||||
}
|
||||
|
||||
//Add texture groups
|
||||
foreach (MA_TextureGroupRegistration tgr in atlas.textureGroupRegistration)
|
||||
{
|
||||
MA_TextureGroup textureGroup = new MA_TextureGroup();
|
||||
textureGroup.name = tgr.name;
|
||||
quad.textureGroups.Add(textureGroup);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreateTextureGroup(MA_TextureAtlasserProAtlas atlas, string name)
|
||||
{
|
||||
MA_TextureGroupRegistration _textureGroupRegistration = new MA_TextureGroupRegistration();
|
||||
_textureGroupRegistration.name = name;
|
||||
atlas.textureGroupRegistration.Add(_textureGroupRegistration);
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
MA_TextureGroup _textureGroup = new MA_TextureGroup();
|
||||
_textureGroup.name = name;
|
||||
q.textureGroups.Add(_textureGroup);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveTextureGroup(MA_TextureAtlasserProAtlas atlas, int index)
|
||||
{
|
||||
atlas.textureGroupRegistration.RemoveAt(index);
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
q.textureGroups.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CloseWindow(MA_TextureAtlasserProWindow curWindow)
|
||||
{
|
||||
if(curWindow == null)
|
||||
{
|
||||
Debug.LogError("Closing window Failed: curWindow == null");
|
||||
}
|
||||
curWindow.Close();
|
||||
}
|
||||
|
||||
public static bool IsPowerOfTwo(int value)
|
||||
{
|
||||
//While x is even and > 1
|
||||
while (((value % 2) == 0) && value > 1)
|
||||
{
|
||||
value /= 2;
|
||||
}
|
||||
|
||||
return (value == 1);
|
||||
}
|
||||
|
||||
#region Export
|
||||
public static void ExportAtlasModels(MA_TextureAtlasserProAtlas atlas, ModelFormat modelFormat, string savePath = EXPORTASSETPATH)
|
||||
{
|
||||
switch (modelFormat)
|
||||
{
|
||||
case ModelFormat.None:
|
||||
break;
|
||||
case ModelFormat.Obj:
|
||||
ExportAtlasObj(atlas, savePath);
|
||||
break;
|
||||
case ModelFormat.ReplaceObj:
|
||||
ModifyAtlasObj(atlas);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ExportAtlasObj(MA_TextureAtlasserProAtlas atlas, string savePath = EXPORTASSETPATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null)
|
||||
return;
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad ta in atlas.textureQuads)
|
||||
{
|
||||
//Export Mesh
|
||||
if(ta.meshes != null)
|
||||
{
|
||||
for (int m = 0; m < ta.meshes.Count; m++)
|
||||
{
|
||||
if(ta.meshes[m] != null)
|
||||
{
|
||||
//Create new mesh
|
||||
Mesh newMesh = new Mesh();
|
||||
//Duplicate it from the current one
|
||||
newMesh = MA_MeshUtils.MA_DuplicateMesh(ta.meshes[m]);
|
||||
//Remap UV's
|
||||
newMesh = MA_MeshUtils.MA_UVReMap(newMesh, atlas.textureAtlasSize, ta.guiRect);
|
||||
//Save it
|
||||
string modelName = string.IsNullOrEmpty(ta.name) ? "": ta.name + "-";
|
||||
modelName += ta.meshes[m].name;
|
||||
int n = m + 1;
|
||||
modelName += "_" + n.ToString("#000");
|
||||
|
||||
MA_MeshUtils.MeshToFile(newMesh, modelName, savePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ModifyAtlasObj(MA_TextureAtlasserProAtlas atlas)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null)
|
||||
return;
|
||||
|
||||
var quads = atlas.textureQuads;
|
||||
|
||||
for (var index = 0; index < quads.Count; index++)
|
||||
{
|
||||
var quad = quads[index];
|
||||
if (quad.meshes == null)
|
||||
continue;
|
||||
|
||||
var meshes = quad.meshes;
|
||||
for (var meshIndex = 0; meshIndex < quad.meshes.Count; meshIndex++)
|
||||
{
|
||||
if (meshes[meshIndex] == null)
|
||||
continue;
|
||||
|
||||
MA_MeshUtils.MA_UVReMap(meshes[meshIndex], atlas.textureAtlasSize, quad.guiRect);
|
||||
EditorUtility.SetDirty(meshes[meshIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
public static void ExportAtlasTextures(MA_TextureAtlasserProAtlas atlas, TextureFormat textureFormat, TextureType textureType, MA_TextureUtils.TextureScaleMode scaleMode, string savePath = EXPORTASSETPATH)
|
||||
{
|
||||
switch (textureFormat)
|
||||
{
|
||||
case TextureFormat.None:
|
||||
break;
|
||||
case TextureFormat.Png:
|
||||
ExportAtlasPNG(atlas, textureType, scaleMode, savePath);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void ExportAtlasPNG(MA_TextureAtlasserProAtlas atlas, TextureType textureType, MA_TextureUtils.TextureScaleMode scaleMode, string savePath = EXPORTASSETPATH)
|
||||
{
|
||||
if (atlas == null || atlas.textureQuads == null || atlas.textureGroupRegistration == null)
|
||||
return;
|
||||
|
||||
//Foreach texture group
|
||||
for (int i = 0; i < atlas.textureGroupRegistration.Count; i++)
|
||||
{
|
||||
//Create new Texture Atlas
|
||||
Texture2D newTexture = new Texture2D((int)atlas.textureAtlasSize.x, (int)atlas.textureAtlasSize.y);
|
||||
newTexture.name = atlas.name + "_" + atlas.textureGroupRegistration[i].name;
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
if (q.textureGroups != null && q.textureGroups[i].texture != null)
|
||||
{
|
||||
//Create new texture part
|
||||
Texture2D newTexturePart = (Texture2D)MA_Texture.MA_TextureUtils.ConvertToReadableTexture(q.textureGroups[i].texture);
|
||||
//Scale it
|
||||
newTexturePart = newTexturePart.MA_Scale2D((int)q.guiRect.width, (int)q.guiRect.height, scaleMode);
|
||||
//Add it
|
||||
newTexture = newTexture.MA_Combine2D(newTexturePart, (int)q.guiRect.x, (int)q.guiRect.y);
|
||||
}
|
||||
}
|
||||
|
||||
//Save it
|
||||
newTexture.MA_Save2D(newTexture.name, savePath);
|
||||
|
||||
TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(savePath + newTexture.name + ".png");
|
||||
textureImporter.textureType = TextureImporterType.Default;
|
||||
textureImporter.SaveAndReimport();
|
||||
}
|
||||
|
||||
switch (textureType)
|
||||
{
|
||||
case TextureType.Default:
|
||||
break;
|
||||
case TextureType.Sprite:
|
||||
SetAtlasPNGSpriteSettings(atlas, textureType, savePath);
|
||||
break;
|
||||
case TextureType.SpriteSliced:
|
||||
SetAtlasPNGSpriteSettings(atlas, textureType, savePath);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//Refresh
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private static void SetAtlasPNGSpriteSettings(MA_TextureAtlasserProAtlas atlas, TextureType textureType, string savePath = EXPORTASSETPATH)
|
||||
{
|
||||
//Foreach texture group
|
||||
for (int i = 0; i < atlas.textureGroupRegistration.Count; i++)
|
||||
{
|
||||
//Convert
|
||||
string textureName = atlas.name + "_" + atlas.textureGroupRegistration[i].name + ".png";
|
||||
TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(savePath + textureName);
|
||||
textureImporter.textureType = TextureImporterType.Sprite;
|
||||
textureImporter.alphaIsTransparency = true;
|
||||
|
||||
//Slice sprites.
|
||||
if (textureType == TextureType.SpriteSliced)
|
||||
{
|
||||
textureImporter.spriteImportMode = SpriteImportMode.None; //Reset it to update?
|
||||
textureImporter.spriteImportMode = SpriteImportMode.Multiple;
|
||||
List<SpriteMetaData> spriteMetaData = new List<SpriteMetaData>();
|
||||
|
||||
foreach (MA_TextureAtlasserProQuad q in atlas.textureQuads)
|
||||
{
|
||||
if (q.textureGroups != null && q.textureGroups[i].texture != null)
|
||||
{
|
||||
//Create new SpriteMetaData.
|
||||
SpriteMetaData smd = new SpriteMetaData();
|
||||
|
||||
smd.name = q.name;
|
||||
smd.rect = new Rect(q.guiRect.x, atlas.textureAtlasSize.y - q.guiRect.y - q.guiRect.height, q.guiRect.width, q.guiRect.height);
|
||||
|
||||
spriteMetaData.Add(smd);
|
||||
}
|
||||
}
|
||||
|
||||
textureImporter.spritesheet = spriteMetaData.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
textureImporter.spriteImportMode = SpriteImportMode.Single;
|
||||
}
|
||||
|
||||
textureImporter.SaveAndReimport();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,213 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using MA_Editor;
|
||||
using MA_Texture;
|
||||
|
||||
namespace MA_TextureAtlasserPro
|
||||
{
|
||||
public class MA_TextureAtlasserProExportWindow : EditorWindow
|
||||
{
|
||||
private const int WindowHeight = 235;
|
||||
|
||||
//Editor
|
||||
private static MA_TextureAtlasserProExportWindow thisWindow;
|
||||
public static MA_TextureAtlasserProWindow curWindow;
|
||||
|
||||
//Data
|
||||
private static bool isLoaded = false; //Make sure we wait a frame at the start to setup and don't draw.
|
||||
|
||||
//Export settings.
|
||||
private ExportPreset exportPreset = ExportPreset.Default;
|
||||
private ModelFormat modelFormat = ModelFormat.Obj;
|
||||
private TextureFormat textureFormat = TextureFormat.Png;
|
||||
private TextureType textureType = TextureType.Default;
|
||||
private MA_TextureUtils.TextureScaleMode textureScaleMode = MA_TextureUtils.TextureScaleMode.Bilinear;
|
||||
|
||||
[MenuItem("MA_ToolKit/MA_TextureAtlasserPro/Export Atlas")]
|
||||
private static void Init()
|
||||
{
|
||||
GetCurrentWindow();
|
||||
|
||||
thisWindow.minSize = new Vector2(420, WindowHeight);
|
||||
thisWindow.maxSize = new Vector2(420, WindowHeight);
|
||||
|
||||
thisWindow.titleContent.text = "MA_ExportTextureAtlas";
|
||||
|
||||
thisWindow.Show();
|
||||
}
|
||||
|
||||
public static void InitEditorWindow(MA_TextureAtlasserProWindow currentEditorWindow)
|
||||
{
|
||||
curWindow = currentEditorWindow;
|
||||
|
||||
GetCurrentWindow();
|
||||
|
||||
thisWindow.minSize = new Vector2(420, WindowHeight);
|
||||
thisWindow.maxSize = new Vector2(420, WindowHeight);
|
||||
|
||||
thisWindow.titleContent.text = "MA_ExportTextureAtlas";
|
||||
|
||||
thisWindow.Show();
|
||||
}
|
||||
|
||||
private static void GetCurrentWindow()
|
||||
{
|
||||
thisWindow = (MA_TextureAtlasserProExportWindow)EditorWindow.GetWindow<MA_TextureAtlasserProExportWindow>();
|
||||
}
|
||||
|
||||
private void CloseWindow()
|
||||
{
|
||||
if(thisWindow == null)
|
||||
{
|
||||
GetCurrentWindow();
|
||||
thisWindow.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
thisWindow.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private Event ProcessEvents()
|
||||
{
|
||||
Event e = Event.current;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
[UnityEditor.Callbacks.DidReloadScripts]
|
||||
private static void OnReload()
|
||||
{
|
||||
//Make sure that when the compiler is finished and reloads the scripts, we are waiting for the next Event.
|
||||
isLoaded = false;
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if(thisWindow == null)
|
||||
{
|
||||
GetCurrentWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
//Get current event
|
||||
Event e = ProcessEvents();
|
||||
|
||||
if(isLoaded)
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(MA_TextureAtlasserProUtils.VIEWOFFSET, MA_TextureAtlasserProUtils.VIEWOFFSET, position.width - (MA_TextureAtlasserProUtils.VIEWOFFSET * 2), position.height - (MA_TextureAtlasserProUtils.VIEWOFFSET * 2)));
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
|
||||
if(curWindow != null && curWindow.textureAtlas != null)
|
||||
{
|
||||
//Export
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
DrawExportPresetMenu();
|
||||
DrawExportAdvancedOptions();
|
||||
|
||||
GUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
|
||||
switch (exportPreset)
|
||||
{
|
||||
case ExportPreset.Custom:
|
||||
break;
|
||||
case ExportPreset.Default:
|
||||
modelFormat = ModelFormat.Obj;
|
||||
textureFormat = TextureFormat.Png;
|
||||
textureType = TextureType.Default;
|
||||
textureScaleMode = MA_TextureUtils.TextureScaleMode.Bilinear;
|
||||
break;
|
||||
case ExportPreset.Sprites:
|
||||
modelFormat = ModelFormat.None;
|
||||
textureFormat = TextureFormat.Png;
|
||||
textureType = TextureType.SpriteSliced;
|
||||
textureScaleMode = MA_TextureUtils.TextureScaleMode.Bilinear;
|
||||
break;
|
||||
case ExportPreset.ReplaceObjMeshes:
|
||||
modelFormat = ModelFormat.ReplaceObj;
|
||||
textureFormat = TextureFormat.Png;
|
||||
textureType = TextureType.Default;
|
||||
textureScaleMode = MA_TextureUtils.TextureScaleMode.Bilinear;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Export", GUILayout.ExpandWidth(true), GUILayout.Height(37)))
|
||||
{
|
||||
MA_TextureAtlasserProUtils.ExportAtlasModels(curWindow.textureAtlas, modelFormat);
|
||||
MA_TextureAtlasserProUtils.ExportAtlasTextures(curWindow.textureAtlas, textureFormat, textureType, textureScaleMode);
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
else if(curWindow == null)
|
||||
{
|
||||
GUI.backgroundColor = Color.red;
|
||||
GUILayout.Box("Error: Link with the Texture Atlas Editor lost!", EditorStyles.helpBox);
|
||||
if(GUILayout.Button("Link Atlas Editor", GUILayout.ExpandWidth(true), GUILayout.Height(37)))
|
||||
{
|
||||
curWindow = (MA_TextureAtlasserProWindow)EditorWindow.GetWindow<MA_TextureAtlasserProWindow>();
|
||||
}
|
||||
GUI.backgroundColor = Color.white;
|
||||
}
|
||||
else if(curWindow.textureAtlas == null)
|
||||
{
|
||||
GUI.backgroundColor = Color.red;
|
||||
GUILayout.Box("Error: No Texture Atlas found make sure to open one!", EditorStyles.helpBox);
|
||||
GUI.backgroundColor = Color.white;
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
if(e.type == EventType.Repaint)
|
||||
isLoaded = true;
|
||||
}
|
||||
|
||||
private void DrawExportPresetMenu()
|
||||
{
|
||||
GUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
|
||||
exportPreset = (ExportPreset)EditorGUILayout.EnumPopup("ExportPreset:", exportPreset, GUILayout.ExpandWidth(true));
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void DrawExportAdvancedOptions()
|
||||
{
|
||||
bool wasEnabled = GUI.enabled;
|
||||
|
||||
if(exportPreset == ExportPreset.Custom)
|
||||
{
|
||||
GUI.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.enabled = false;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
GUILayout.Label("Models:", EditorStyles.miniBoldLabel);
|
||||
modelFormat = (ModelFormat)EditorGUILayout.EnumPopup("ModelFormat:", modelFormat);
|
||||
|
||||
GUILayout.Label("Textures:", EditorStyles.miniBoldLabel);
|
||||
textureFormat = (TextureFormat)EditorGUILayout.EnumPopup("TextureFormat:", textureFormat);
|
||||
textureType = (TextureType)EditorGUILayout.EnumPopup("TextureType:", textureType);
|
||||
textureScaleMode = (MA_TextureUtils.TextureScaleMode)EditorGUILayout.EnumPopup("TextureScaleMode:", textureScaleMode);
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
GUI.enabled = wasEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1 +0,0 @@
|
||||
Settigns are supposed to be here.
|
@ -1,195 +0,0 @@
|
||||
//https://github.com/maxartz15/MA_MeshUtils
|
||||
|
||||
//References:
|
||||
//http://wiki.unity3d.com/index.php?title=ObjExporter
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace MA_Mesh
|
||||
{
|
||||
public static class MA_MeshUtils
|
||||
{
|
||||
public static void MA_SaveMeshAsset(Mesh mesh, string savePath, string meshName = "")
|
||||
{
|
||||
Mesh newMesh = new Mesh();
|
||||
newMesh.SetVertices(new List<Vector3>(mesh.vertices));
|
||||
newMesh.SetTriangles(mesh.triangles, 0);
|
||||
newMesh.SetUVs(0, new List<Vector2>(mesh.uv));
|
||||
|
||||
if(meshName == "")
|
||||
{
|
||||
newMesh.name = mesh.name;
|
||||
}
|
||||
else
|
||||
{
|
||||
newMesh.name = meshName;
|
||||
}
|
||||
|
||||
AssetDatabase.CreateAsset(newMesh, savePath);
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
public static Mesh MA_DuplicateMesh(Mesh mesh)
|
||||
{
|
||||
Mesh newMesh = new Mesh();
|
||||
newMesh.name = mesh.name;
|
||||
newMesh.SetVertices(new List<Vector3>(mesh.vertices));
|
||||
newMesh.bounds = mesh.bounds;
|
||||
newMesh.colors = mesh.colors.ToArray();
|
||||
newMesh.subMeshCount = mesh.subMeshCount;
|
||||
for (int i = 0; i < mesh.subMeshCount; i++)
|
||||
{
|
||||
newMesh.SetTriangles(mesh.GetTriangles(i), i);
|
||||
}
|
||||
newMesh.subMeshCount = mesh.subMeshCount;
|
||||
newMesh.SetNormals(new List<Vector3>(mesh.normals));
|
||||
newMesh.SetUVs(0, new List<Vector2>(mesh.uv));
|
||||
newMesh.SetTangents(new List<Vector4>(mesh.tangents));
|
||||
|
||||
return newMesh;
|
||||
}
|
||||
|
||||
public static Mesh MA_ReMapUV(this Mesh mesh, Vector2 atlasSize, Vector2 textureSize, Vector2 texturePosition, int uvChannel = 0)
|
||||
{
|
||||
/*
|
||||
0 1
|
||||
512 x 512
|
||||
|
||||
0 .5 = 1 / 512 * 256
|
||||
256 x 256
|
||||
|
||||
+ pos
|
||||
*/
|
||||
|
||||
List<Vector2> uvs = new List<Vector2>();
|
||||
|
||||
//Get UV's
|
||||
mesh.GetUVs(uvChannel, uvs);
|
||||
|
||||
foreach (Vector2 uvCordinate in uvs)
|
||||
{
|
||||
float x = (uvCordinate.x / atlasSize.x * textureSize.x) + texturePosition.x;
|
||||
float y = (uvCordinate.y / atlasSize.y * textureSize.y) + texturePosition.y;
|
||||
uvCordinate.Set(x, y);
|
||||
}
|
||||
|
||||
mesh.SetUVs(uvChannel, uvs);
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
public static Mesh MA_UVReMap(this Mesh mesh, Vector2 atlasSize, Rect textureRect, int uvChannel = 0, bool flipY = true)
|
||||
{
|
||||
List<Vector2> uvs = new List<Vector2>();
|
||||
|
||||
//Get UV's
|
||||
mesh.GetUVs(uvChannel, uvs);
|
||||
|
||||
for (int i = 0; i < uvs.Count; i++)
|
||||
{
|
||||
if(flipY)
|
||||
{
|
||||
uvs[i] = new Vector2((uvs[i].x / atlasSize.x * textureRect.width) + (1 / atlasSize.x * textureRect.x),
|
||||
(uvs[i].y / atlasSize.y * textureRect.height) + (1 / atlasSize.y * (atlasSize.y - textureRect.height - textureRect.y)));
|
||||
}
|
||||
else
|
||||
{
|
||||
//Debug.Log("01" + uvs[i].x);
|
||||
uvs[i] = new Vector2((uvs[i].x / atlasSize.x * textureRect.width) + (1 / atlasSize.x * textureRect.x),
|
||||
(uvs[i].y / atlasSize.y * textureRect.height) + (1 / atlasSize.y * textureRect.y));
|
||||
//Debug.Log("02" + uvs[i].x);
|
||||
}
|
||||
}
|
||||
|
||||
mesh.SetUVs(uvChannel, uvs);
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
//Start http://wiki.unity3d.com/index.php?title=ObjExporter
|
||||
public static string MeshToString(Mesh mesh)
|
||||
{
|
||||
int vertexOffset = 0;
|
||||
int normalOffset = 0;
|
||||
int uvOffset = 0;
|
||||
|
||||
|
||||
Material material = new Material(Shader.Find("Standard"));
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("g ").Append(mesh.name).Append("\n");
|
||||
|
||||
foreach(Vector3 v in mesh.vertices)
|
||||
{
|
||||
//This is sort of ugly - inverting x-component since we're in
|
||||
//a different coordinate system than "everyone" is "used to".
|
||||
sb.Append(string.Format("v {0} {1} {2}\n", -v.x, v.y, v.z));
|
||||
}
|
||||
|
||||
sb.Append("\n");
|
||||
|
||||
foreach(Vector3 v in mesh.normals)
|
||||
{
|
||||
sb.Append(string.Format("vn {0} {1} {2}\n", -v.x, v.y, v.z));
|
||||
}
|
||||
|
||||
sb.Append("\n");
|
||||
|
||||
foreach(Vector3 v in mesh.uv)
|
||||
{
|
||||
sb.Append(string.Format("vt {0} {1}\n", v.x, v.y));
|
||||
}
|
||||
|
||||
for (int m = 0 ; m < mesh.subMeshCount; m++)
|
||||
{
|
||||
sb.Append("\n");
|
||||
sb.Append("usemtl ").Append(material.name + m).Append("\n");
|
||||
sb.Append("usemap ").Append(material.name + m).Append("\n");
|
||||
|
||||
// int[] triangles = mesh.GetTriangles(m);
|
||||
// for (int i = 0; i < triangles.Length; i += 3)
|
||||
// {
|
||||
// sb.Append(string.Format("f {0}/{0}/{0} {1}/{1}/{1} {2}/{2}/{2}\n", triangles[i]+1, triangles[i+1]+1, triangles[i+2]+1));
|
||||
// }
|
||||
|
||||
int[] triangles = mesh.GetTriangles(m);
|
||||
for (int i = 0; i < triangles.Length; i += 3)
|
||||
{
|
||||
//Because we inverted the x-component, we also needed to alter the triangle winding.
|
||||
sb.Append(string.Format("f {1}/{1}/{1} {0}/{0}/{0} {2}/{2}/{2}\n", triangles[i]+ 1 + vertexOffset, triangles[i + 1] + 1 + normalOffset, triangles[i +2 ] + 1 + uvOffset));
|
||||
}
|
||||
}
|
||||
|
||||
vertexOffset += mesh.vertices.Length;
|
||||
normalOffset += mesh.normals.Length;
|
||||
uvOffset += mesh.uv.Length;
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static void MeshToFile(Mesh mesh, string filename, string savePath)
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(savePath + filename + ".obj"))
|
||||
{
|
||||
sw.Write(MeshToString(mesh));
|
||||
}
|
||||
}
|
||||
//End
|
||||
}
|
||||
|
||||
struct ObjMaterial
|
||||
{
|
||||
public string name;
|
||||
public string textureName;
|
||||
}
|
||||
}
|
||||
#endif
|
39
Packages/manifest.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.ext.nunit": "1.0.0",
|
||||
"com.unity.test-framework": "1.1.9",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.modules.ai": "1.0.0",
|
||||
"com.unity.modules.androidjni": "1.0.0",
|
||||
"com.unity.modules.animation": "1.0.0",
|
||||
"com.unity.modules.assetbundle": "1.0.0",
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
"com.unity.modules.cloth": "1.0.0",
|
||||
"com.unity.modules.director": "1.0.0",
|
||||
"com.unity.modules.imageconversion": "1.0.0",
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0",
|
||||
"com.unity.modules.particlesystem": "1.0.0",
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.physics2d": "1.0.0",
|
||||
"com.unity.modules.screencapture": "1.0.0",
|
||||
"com.unity.modules.terrain": "1.0.0",
|
||||
"com.unity.modules.terrainphysics": "1.0.0",
|
||||
"com.unity.modules.tilemap": "1.0.0",
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.modules.uielements": "1.0.0",
|
||||
"com.unity.modules.umbra": "1.0.0",
|
||||
"com.unity.modules.unityanalytics": "1.0.0",
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestaudio": "1.0.0",
|
||||
"com.unity.modules.unitywebrequesttexture": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestwww": "1.0.0",
|
||||
"com.unity.modules.vehicles": "1.0.0",
|
||||
"com.unity.modules.video": "1.0.0",
|
||||
"com.unity.modules.vr": "1.0.0",
|
||||
"com.unity.modules.wind": "1.0.0",
|
||||
"com.unity.modules.xr": "1.0.0"
|
||||
}
|
||||
}
|
19
ProjectSettings/AudioManager.asset
Normal file
@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!11 &1
|
||||
AudioManager:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Volume: 1
|
||||
Rolloff Scale: 1
|
||||
Doppler Factor: 1
|
||||
Default Speaker Mode: 2
|
||||
m_SampleRate: 0
|
||||
m_DSPBufferSize: 1024
|
||||
m_VirtualVoiceCount: 512
|
||||
m_RealVoiceCount: 32
|
||||
m_SpatializerPlugin:
|
||||
m_AmbisonicDecoderPlugin:
|
||||
m_DisableAudio: 0
|
||||
m_VirtualizeEffects: 1
|
||||
m_RequestedDSPBufferSize: 0
|
6
ProjectSettings/ClusterInputManager.asset
Normal file
@ -0,0 +1,6 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!236 &1
|
||||
ClusterInputManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Inputs: []
|
35
ProjectSettings/DynamicsManager.asset
Normal file
@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!55 &1
|
||||
PhysicsManager:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_Gravity: {x: 0, y: -9.81, z: 0}
|
||||
m_DefaultMaterial: {fileID: 0}
|
||||
m_BounceThreshold: 2
|
||||
m_SleepThreshold: 0.005
|
||||
m_DefaultContactOffset: 0.01
|
||||
m_DefaultSolverIterations: 6
|
||||
m_DefaultSolverVelocityIterations: 1
|
||||
m_QueriesHitBackfaces: 0
|
||||
m_QueriesHitTriggers: 1
|
||||
m_EnableAdaptiveForce: 0
|
||||
m_ClothInterCollisionDistance: 0
|
||||
m_ClothInterCollisionStiffness: 0
|
||||
m_ContactsGeneration: 1
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_AutoSimulation: 1
|
||||
m_AutoSyncTransforms: 0
|
||||
m_ReuseCollisionCallbacks: 0
|
||||
m_ClothInterCollisionSettingsToggle: 0
|
||||
m_ClothGravity: {x: 0, y: -9.81, z: 0}
|
||||
m_ContactPairsMode: 0
|
||||
m_BroadphaseType: 0
|
||||
m_WorldBounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 250, y: 250, z: 250}
|
||||
m_WorldSubdivisions: 8
|
||||
m_FrictionType: 0
|
||||
m_EnableEnhancedDeterminism: 0
|
||||
m_EnableUnifiedHeightmaps: 1
|
||||
m_DefaultMaxAngularSpeed: 50
|
8
ProjectSettings/EditorBuildSettings.asset
Normal file
@ -0,0 +1,8 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1045 &1
|
||||
EditorBuildSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes: []
|
||||
m_configObjects: {}
|
35
ProjectSettings/EditorSettings.asset
Normal file
@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!159 &1
|
||||
EditorSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_ExternalVersionControlSupport: Hidden Meta Files
|
||||
m_SerializationMode: 2
|
||||
m_LineEndingsForNewScripts: 2
|
||||
m_DefaultBehaviorMode: 0
|
||||
m_PrefabRegularEnvironment: {fileID: 0}
|
||||
m_PrefabUIEnvironment: {fileID: 0}
|
||||
m_SpritePackerMode: 0
|
||||
m_SpritePackerPaddingPower: 1
|
||||
m_EtcTextureCompressorBehavior: 1
|
||||
m_EtcTextureFastCompressor: 1
|
||||
m_EtcTextureNormalCompressor: 2
|
||||
m_EtcTextureBestCompressor: 4
|
||||
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
|
||||
m_ProjectGenerationRootNamespace:
|
||||
m_CollabEditorSettings:
|
||||
inProgressEnabled: 1
|
||||
m_EnableTextureStreamingInEditMode: 1
|
||||
m_EnableTextureStreamingInPlayMode: 1
|
||||
m_AsyncShaderCompilation: 1
|
||||
m_EnterPlayModeOptionsEnabled: 0
|
||||
m_EnterPlayModeOptions: 3
|
||||
m_ShowLightmapResolutionOverlay: 1
|
||||
m_UseLegacyProbeSampleCount: 1
|
||||
m_AssetPipelineMode: 1
|
||||
m_CacheServerMode: 0
|
||||
m_CacheServerEndpoint:
|
||||
m_CacheServerNamespacePrefix: default
|
||||
m_CacheServerEnableDownload: 1
|
||||
m_CacheServerEnableUpload: 1
|
62
ProjectSettings/GraphicsSettings.asset
Normal file
@ -0,0 +1,62 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!30 &1
|
||||
GraphicsSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_Deferred:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_DeferredReflections:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ScreenSpaceShadows:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LegacyDeferred:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_DepthNormals:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_MotionVectors:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightHalo:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LensFlare:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_AlwaysIncludedShaders:
|
||||
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
m_CustomRenderPipeline: {fileID: 0}
|
||||
m_TransparencySortMode: 0
|
||||
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
|
||||
m_DefaultRenderingPath: 1
|
||||
m_DefaultMobileRenderingPath: 1
|
||||
m_TierSettings: []
|
||||
m_LightmapStripping: 0
|
||||
m_FogStripping: 0
|
||||
m_InstancingStripping: 0
|
||||
m_LightmapKeepPlain: 1
|
||||
m_LightmapKeepDirCombined: 1
|
||||
m_LightmapKeepDynamicPlain: 1
|
||||
m_LightmapKeepDynamicDirCombined: 1
|
||||
m_LightmapKeepShadowMask: 1
|
||||
m_LightmapKeepSubtractive: 1
|
||||
m_FogKeepLinear: 1
|
||||
m_FogKeepExp: 1
|
||||
m_FogKeepExp2: 1
|
||||
m_AlbedoSwatchInfos: []
|
||||
m_LightsUseLinearIntensity: 0
|
||||
m_LightsUseColorTemperature: 0
|
295
ProjectSettings/InputManager.asset
Normal file
@ -0,0 +1,295 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!13 &1
|
||||
InputManager:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Axes:
|
||||
- serializedVersion: 3
|
||||
m_Name: Horizontal
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton: left
|
||||
positiveButton: right
|
||||
altNegativeButton: a
|
||||
altPositiveButton: d
|
||||
gravity: 3
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Vertical
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton: down
|
||||
positiveButton: up
|
||||
altNegativeButton: s
|
||||
altPositiveButton: w
|
||||
gravity: 3
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire1
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: left ctrl
|
||||
altNegativeButton:
|
||||
altPositiveButton: mouse 0
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire2
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: left alt
|
||||
altNegativeButton:
|
||||
altPositiveButton: mouse 1
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire3
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: left shift
|
||||
altNegativeButton:
|
||||
altPositiveButton: mouse 2
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Jump
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: space
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Mouse X
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 1
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Mouse Y
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 1
|
||||
axis: 1
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Mouse ScrollWheel
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 1
|
||||
axis: 2
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Horizontal
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0.19
|
||||
sensitivity: 1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 2
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Vertical
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0.19
|
||||
sensitivity: 1
|
||||
snap: 0
|
||||
invert: 1
|
||||
type: 2
|
||||
axis: 1
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire1
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 0
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire2
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 1
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire3
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 2
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Jump
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 3
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Submit
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: return
|
||||
altNegativeButton:
|
||||
altPositiveButton: joystick button 0
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Submit
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: enter
|
||||
altNegativeButton:
|
||||
altPositiveButton: space
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Cancel
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: escape
|
||||
altNegativeButton:
|
||||
altPositiveButton: joystick button 1
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
91
ProjectSettings/NavMeshAreas.asset
Normal file
@ -0,0 +1,91 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!126 &1
|
||||
NavMeshProjectSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
areas:
|
||||
- name: Walkable
|
||||
cost: 1
|
||||
- name: Not Walkable
|
||||
cost: 1
|
||||
- name: Jump
|
||||
cost: 2
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
m_LastAgentTypeID: -887442657
|
||||
m_Settings:
|
||||
- serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.75
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_SettingNames:
|
||||
- Humanoid
|
56
ProjectSettings/Physics2DSettings.asset
Normal file
@ -0,0 +1,56 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!19 &1
|
||||
Physics2DSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 4
|
||||
m_Gravity: {x: 0, y: -9.81}
|
||||
m_DefaultMaterial: {fileID: 0}
|
||||
m_VelocityIterations: 8
|
||||
m_PositionIterations: 3
|
||||
m_VelocityThreshold: 1
|
||||
m_MaxLinearCorrection: 0.2
|
||||
m_MaxAngularCorrection: 8
|
||||
m_MaxTranslationSpeed: 100
|
||||
m_MaxRotationSpeed: 360
|
||||
m_BaumgarteScale: 0.2
|
||||
m_BaumgarteTimeOfImpactScale: 0.75
|
||||
m_TimeToSleep: 0.5
|
||||
m_LinearSleepTolerance: 0.01
|
||||
m_AngularSleepTolerance: 2
|
||||
m_DefaultContactOffset: 0.01
|
||||
m_JobOptions:
|
||||
serializedVersion: 2
|
||||
useMultithreading: 0
|
||||
useConsistencySorting: 0
|
||||
m_InterpolationPosesPerJob: 100
|
||||
m_NewContactsPerJob: 30
|
||||
m_CollideContactsPerJob: 100
|
||||
m_ClearFlagsPerJob: 200
|
||||
m_ClearBodyForcesPerJob: 200
|
||||
m_SyncDiscreteFixturesPerJob: 50
|
||||
m_SyncContinuousFixturesPerJob: 50
|
||||
m_FindNearestContactsPerJob: 100
|
||||
m_UpdateTriggerContactsPerJob: 100
|
||||
m_IslandSolverCostThreshold: 100
|
||||
m_IslandSolverBodyCostScale: 1
|
||||
m_IslandSolverContactCostScale: 10
|
||||
m_IslandSolverJointCostScale: 10
|
||||
m_IslandSolverBodiesPerJob: 50
|
||||
m_IslandSolverContactsPerJob: 50
|
||||
m_AutoSimulation: 1
|
||||
m_QueriesHitTriggers: 1
|
||||
m_QueriesStartInColliders: 1
|
||||
m_CallbacksOnDisable: 1
|
||||
m_ReuseCollisionCallbacks: 0
|
||||
m_AutoSyncTransforms: 0
|
||||
m_AlwaysShowColliders: 0
|
||||
m_ShowColliderSleep: 1
|
||||
m_ShowColliderContacts: 0
|
||||
m_ShowColliderAABB: 0
|
||||
m_ContactArrowScale: 0.2
|
||||
m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
|
||||
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
6
ProjectSettings/PresetManager.asset
Normal file
@ -0,0 +1,6 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1386491679 &1
|
||||
PresetManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_DefaultList: []
|
611
ProjectSettings/ProjectSettings.asset
Normal file
@ -0,0 +1,611 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!129 &1
|
||||
PlayerSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 16
|
||||
productGUID: 8535983343d06ca4899aefe4380bbd49
|
||||
AndroidProfiler: 0
|
||||
AndroidFilterTouchesWhenObscured: 0
|
||||
AndroidEnableSustainedPerformanceMode: 0
|
||||
defaultScreenOrientation: 4
|
||||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: DefaultCompany
|
||||
productName: MA_TextureAtlas
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_SplashScreenOverlayOpacity: 1
|
||||
m_SplashScreenAnimation: 1
|
||||
m_SplashScreenLogoStyle: 1
|
||||
m_SplashScreenDrawMode: 0
|
||||
m_SplashScreenBackgroundAnimationZoom: 1
|
||||
m_SplashScreenLogoAnimationZoom: 1
|
||||
m_SplashScreenBackgroundLandscapeAspect: 1
|
||||
m_SplashScreenBackgroundPortraitAspect: 1
|
||||
m_SplashScreenBackgroundLandscapeUvs:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenBackgroundPortraitUvs:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenLogos: []
|
||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1024
|
||||
defaultScreenHeight: 768
|
||||
defaultScreenWidthWeb: 960
|
||||
defaultScreenHeightWeb: 600
|
||||
m_StereoRenderingPath: 0
|
||||
m_ActiveColorSpace: 0
|
||||
m_MTRendering: 1
|
||||
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
||||
iosShowActivityIndicatorOnLoading: -1
|
||||
androidShowActivityIndicatorOnLoading: -1
|
||||
iosAppInBackgroundBehavior: 0
|
||||
displayResolutionDialog: 0
|
||||
iosAllowHTTPDownload: 1
|
||||
allowedAutorotateToPortrait: 1
|
||||
allowedAutorotateToPortraitUpsideDown: 1
|
||||
allowedAutorotateToLandscapeRight: 1
|
||||
allowedAutorotateToLandscapeLeft: 1
|
||||
useOSAutorotation: 1
|
||||
use32BitDisplayBuffer: 1
|
||||
preserveFramebufferAlpha: 0
|
||||
disableDepthAndStencilBuffers: 0
|
||||
androidStartInFullscreen: 1
|
||||
androidRenderOutsideSafeArea: 1
|
||||
androidBlitType: 0
|
||||
defaultIsNativeResolution: 1
|
||||
macRetinaSupport: 1
|
||||
runInBackground: 0
|
||||
captureSingleScreen: 0
|
||||
muteOtherAudioSources: 0
|
||||
Prepare IOS For Recording: 0
|
||||
Force IOS Speakers When Recording: 0
|
||||
deferSystemGesturesMode: 0
|
||||
hideHomeButton: 0
|
||||
submitAnalytics: 1
|
||||
usePlayerLog: 1
|
||||
bakeCollisionMeshes: 0
|
||||
forceSingleInstance: 0
|
||||
useFlipModelSwapchain: 1
|
||||
resizableWindow: 0
|
||||
useMacAppStoreValidation: 0
|
||||
macAppStoreCategory: public.app-category.games
|
||||
gpuSkinning: 0
|
||||
graphicsJobs: 0
|
||||
xboxPIXTextureCapture: 0
|
||||
xboxEnableAvatar: 0
|
||||
xboxEnableKinect: 0
|
||||
xboxEnableKinectAutoTracking: 0
|
||||
xboxEnableFitness: 0
|
||||
visibleInBackground: 1
|
||||
allowFullscreenSwitch: 1
|
||||
graphicsJobMode: 0
|
||||
fullscreenMode: 1
|
||||
xboxSpeechDB: 0
|
||||
xboxEnableHeadOrientation: 0
|
||||
xboxEnableGuest: 0
|
||||
xboxEnablePIXSampling: 0
|
||||
metalFramebufferOnly: 0
|
||||
xboxOneResolution: 0
|
||||
xboxOneSResolution: 0
|
||||
xboxOneXResolution: 3
|
||||
xboxOneMonoLoggingLevel: 0
|
||||
xboxOneLoggingLevel: 1
|
||||
xboxOneDisableEsram: 0
|
||||
xboxOnePresentImmediateThreshold: 0
|
||||
switchQueueCommandMemory: 1048576
|
||||
switchQueueControlMemory: 16384
|
||||
switchQueueComputeMemory: 262144
|
||||
switchNVNShaderPoolsGranularity: 33554432
|
||||
switchNVNDefaultPoolsGranularity: 16777216
|
||||
switchNVNOtherPoolsGranularity: 16777216
|
||||
vulkanEnableSetSRGBWrite: 0
|
||||
m_SupportedAspectRatios:
|
||||
4:3: 1
|
||||
5:4: 1
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 1.0
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
xboxOneDisableKinectGpuReservation: 1
|
||||
xboxOneEnable7thCore: 1
|
||||
vrSettings:
|
||||
cardboard:
|
||||
depthFormat: 0
|
||||
enableTransitionView: 0
|
||||
daydream:
|
||||
depthFormat: 0
|
||||
useSustainedPerformanceMode: 0
|
||||
enableVideoLayer: 0
|
||||
useProtectedVideoMemory: 0
|
||||
minimumSupportedHeadTracking: 0
|
||||
maximumSupportedHeadTracking: 1
|
||||
hololens:
|
||||
depthFormat: 1
|
||||
depthBufferSharingEnabled: 1
|
||||
lumin:
|
||||
depthFormat: 0
|
||||
frameTiming: 2
|
||||
enableGLCache: 0
|
||||
glCacheMaxBlobSize: 524288
|
||||
glCacheMaxFileSize: 8388608
|
||||
oculus:
|
||||
sharedDepthBuffer: 1
|
||||
dashSupport: 1
|
||||
enable360StereoCapture: 0
|
||||
isWsaHolographicRemotingEnabled: 0
|
||||
protectGraphicsMemory: 0
|
||||
enableFrameTimingStats: 0
|
||||
useHDRDisplay: 0
|
||||
m_ColorGamuts: 00000000
|
||||
targetPixelDensity: 30
|
||||
resolutionScalingMode: 0
|
||||
androidSupportedAspectRatio: 1
|
||||
androidMaxAspectRatio: 2.1
|
||||
applicationIdentifier: {}
|
||||
buildNumber: {}
|
||||
AndroidBundleVersionCode: 1
|
||||
AndroidMinSdkVersion: 16
|
||||
AndroidTargetSdkVersion: 0
|
||||
AndroidPreferredInstallLocation: 1
|
||||
aotOptions:
|
||||
stripEngineCode: 1
|
||||
iPhoneStrippingLevel: 0
|
||||
iPhoneScriptCallOptimization: 0
|
||||
ForceInternetPermission: 0
|
||||
ForceSDCardPermission: 0
|
||||
CreateWallpaper: 0
|
||||
APKExpansionFiles: 0
|
||||
keepLoadedShadersAlive: 0
|
||||
StripUnusedMeshComponents: 0
|
||||
VertexChannelCompressionMask: 4054
|
||||
iPhoneSdkVersion: 988
|
||||
iOSTargetOSVersionString: 9.0
|
||||
tvOSSdkVersion: 0
|
||||
tvOSRequireExtendedGameController: 0
|
||||
tvOSTargetOSVersionString: 9.0
|
||||
uIPrerenderedIcon: 0
|
||||
uIRequiresPersistentWiFi: 0
|
||||
uIRequiresFullScreen: 1
|
||||
uIStatusBarHidden: 1
|
||||
uIExitOnSuspend: 0
|
||||
uIStatusBarStyle: 0
|
||||
iPhoneSplashScreen: {fileID: 0}
|
||||
iPhoneHighResSplashScreen: {fileID: 0}
|
||||
iPhoneTallHighResSplashScreen: {fileID: 0}
|
||||
iPhone47inSplashScreen: {fileID: 0}
|
||||
iPhone55inPortraitSplashScreen: {fileID: 0}
|
||||
iPhone55inLandscapeSplashScreen: {fileID: 0}
|
||||
iPhone58inPortraitSplashScreen: {fileID: 0}
|
||||
iPhone58inLandscapeSplashScreen: {fileID: 0}
|
||||
iPadPortraitSplashScreen: {fileID: 0}
|
||||
iPadHighResPortraitSplashScreen: {fileID: 0}
|
||||
iPadLandscapeSplashScreen: {fileID: 0}
|
||||
iPadHighResLandscapeSplashScreen: {fileID: 0}
|
||||
iPhone65inPortraitSplashScreen: {fileID: 0}
|
||||
iPhone65inLandscapeSplashScreen: {fileID: 0}
|
||||
iPhone61inPortraitSplashScreen: {fileID: 0}
|
||||
iPhone61inLandscapeSplashScreen: {fileID: 0}
|
||||
appleTVSplashScreen: {fileID: 0}
|
||||
appleTVSplashScreen2x: {fileID: 0}
|
||||
tvOSSmallIconLayers: []
|
||||
tvOSSmallIconLayers2x: []
|
||||
tvOSLargeIconLayers: []
|
||||
tvOSLargeIconLayers2x: []
|
||||
tvOSTopShelfImageLayers: []
|
||||
tvOSTopShelfImageLayers2x: []
|
||||
tvOSTopShelfImageWideLayers: []
|
||||
tvOSTopShelfImageWideLayers2x: []
|
||||
iOSLaunchScreenType: 0
|
||||
iOSLaunchScreenPortrait: {fileID: 0}
|
||||
iOSLaunchScreenLandscape: {fileID: 0}
|
||||
iOSLaunchScreenBackgroundColor:
|
||||
serializedVersion: 2
|
||||
rgba: 0
|
||||
iOSLaunchScreenFillPct: 100
|
||||
iOSLaunchScreenSize: 100
|
||||
iOSLaunchScreenCustomXibPath:
|
||||
iOSLaunchScreeniPadType: 0
|
||||
iOSLaunchScreeniPadImage: {fileID: 0}
|
||||
iOSLaunchScreeniPadBackgroundColor:
|
||||
serializedVersion: 2
|
||||
rgba: 0
|
||||
iOSLaunchScreeniPadFillPct: 100
|
||||
iOSLaunchScreeniPadSize: 100
|
||||
iOSLaunchScreeniPadCustomXibPath:
|
||||
iOSUseLaunchScreenStoryboard: 0
|
||||
iOSLaunchScreenCustomStoryboardPath:
|
||||
iOSDeviceRequirements: []
|
||||
iOSURLSchemes: []
|
||||
iOSBackgroundModes: 0
|
||||
iOSMetalForceHardShadows: 0
|
||||
metalEditorSupport: 1
|
||||
metalAPIValidation: 1
|
||||
iOSRenderExtraFrameOnPause: 0
|
||||
appleDeveloperTeamID:
|
||||
iOSManualSigningProvisioningProfileID:
|
||||
tvOSManualSigningProvisioningProfileID:
|
||||
iOSManualSigningProvisioningProfileType: 0
|
||||
tvOSManualSigningProvisioningProfileType: 0
|
||||
appleEnableAutomaticSigning: 0
|
||||
iOSRequireARKit: 0
|
||||
iOSAutomaticallyDetectAndAddCapabilities: 1
|
||||
appleEnableProMotion: 0
|
||||
clonedFromGUID: 00000000000000000000000000000000
|
||||
templatePackageId:
|
||||
templateDefaultScene:
|
||||
AndroidTargetArchitectures: 1
|
||||
AndroidSplashScreenScale: 0
|
||||
androidSplashScreen: {fileID: 0}
|
||||
AndroidKeystoreName:
|
||||
AndroidKeyaliasName:
|
||||
AndroidBuildApkPerCpuArchitecture: 0
|
||||
AndroidTVCompatibility: 0
|
||||
AndroidIsGame: 1
|
||||
AndroidEnableTango: 0
|
||||
androidEnableBanner: 1
|
||||
androidUseLowAccuracyLocation: 0
|
||||
androidUseCustomKeystore: 0
|
||||
m_AndroidBanners:
|
||||
- width: 320
|
||||
height: 180
|
||||
banner: {fileID: 0}
|
||||
androidGamepadSupportLevel: 0
|
||||
resolutionDialogBanner: {fileID: 0}
|
||||
m_BuildTargetIcons: []
|
||||
m_BuildTargetPlatformIcons: []
|
||||
m_BuildTargetBatching: []
|
||||
m_BuildTargetGraphicsAPIs: []
|
||||
m_BuildTargetVRSettings: []
|
||||
m_BuildTargetEnableVuforiaSettings: []
|
||||
openGLRequireES31: 0
|
||||
openGLRequireES31AEP: 0
|
||||
openGLRequireES32: 0
|
||||
m_TemplateCustomTags: {}
|
||||
mobileMTRendering:
|
||||
Android: 1
|
||||
iPhone: 1
|
||||
tvOS: 1
|
||||
m_BuildTargetGroupLightmapEncodingQuality: []
|
||||
m_BuildTargetGroupLightmapSettings: []
|
||||
playModeTestRunnerEnabled: 0
|
||||
runPlayModeTestAsEditModeTest: 0
|
||||
actionOnDotNetUnhandledException: 1
|
||||
enableInternalProfiler: 0
|
||||
logObjCUncaughtExceptions: 1
|
||||
enableCrashReportAPI: 0
|
||||
cameraUsageDescription:
|
||||
locationUsageDescription:
|
||||
microphoneUsageDescription:
|
||||
switchNetLibKey:
|
||||
switchSocketMemoryPoolSize: 6144
|
||||
switchSocketAllocatorPoolSize: 128
|
||||
switchSocketConcurrencyLimit: 14
|
||||
switchScreenResolutionBehavior: 2
|
||||
switchUseCPUProfiler: 0
|
||||
switchApplicationID: 0x01004b9000490000
|
||||
switchNSODependencies:
|
||||
switchTitleNames_0:
|
||||
switchTitleNames_1:
|
||||
switchTitleNames_2:
|
||||
switchTitleNames_3:
|
||||
switchTitleNames_4:
|
||||
switchTitleNames_5:
|
||||
switchTitleNames_6:
|
||||
switchTitleNames_7:
|
||||
switchTitleNames_8:
|
||||
switchTitleNames_9:
|
||||
switchTitleNames_10:
|
||||
switchTitleNames_11:
|
||||
switchTitleNames_12:
|
||||
switchTitleNames_13:
|
||||
switchTitleNames_14:
|
||||
switchPublisherNames_0:
|
||||
switchPublisherNames_1:
|
||||
switchPublisherNames_2:
|
||||
switchPublisherNames_3:
|
||||
switchPublisherNames_4:
|
||||
switchPublisherNames_5:
|
||||
switchPublisherNames_6:
|
||||
switchPublisherNames_7:
|
||||
switchPublisherNames_8:
|
||||
switchPublisherNames_9:
|
||||
switchPublisherNames_10:
|
||||
switchPublisherNames_11:
|
||||
switchPublisherNames_12:
|
||||
switchPublisherNames_13:
|
||||
switchPublisherNames_14:
|
||||
switchIcons_0: {fileID: 0}
|
||||
switchIcons_1: {fileID: 0}
|
||||
switchIcons_2: {fileID: 0}
|
||||
switchIcons_3: {fileID: 0}
|
||||
switchIcons_4: {fileID: 0}
|
||||
switchIcons_5: {fileID: 0}
|
||||
switchIcons_6: {fileID: 0}
|
||||
switchIcons_7: {fileID: 0}
|
||||
switchIcons_8: {fileID: 0}
|
||||
switchIcons_9: {fileID: 0}
|
||||
switchIcons_10: {fileID: 0}
|
||||
switchIcons_11: {fileID: 0}
|
||||
switchIcons_12: {fileID: 0}
|
||||
switchIcons_13: {fileID: 0}
|
||||
switchIcons_14: {fileID: 0}
|
||||
switchSmallIcons_0: {fileID: 0}
|
||||
switchSmallIcons_1: {fileID: 0}
|
||||
switchSmallIcons_2: {fileID: 0}
|
||||
switchSmallIcons_3: {fileID: 0}
|
||||
switchSmallIcons_4: {fileID: 0}
|
||||
switchSmallIcons_5: {fileID: 0}
|
||||
switchSmallIcons_6: {fileID: 0}
|
||||
switchSmallIcons_7: {fileID: 0}
|
||||
switchSmallIcons_8: {fileID: 0}
|
||||
switchSmallIcons_9: {fileID: 0}
|
||||
switchSmallIcons_10: {fileID: 0}
|
||||
switchSmallIcons_11: {fileID: 0}
|
||||
switchSmallIcons_12: {fileID: 0}
|
||||
switchSmallIcons_13: {fileID: 0}
|
||||
switchSmallIcons_14: {fileID: 0}
|
||||
switchManualHTML:
|
||||
switchAccessibleURLs:
|
||||
switchLegalInformation:
|
||||
switchMainThreadStackSize: 1048576
|
||||
switchPresenceGroupId:
|
||||
switchLogoHandling: 0
|
||||
switchReleaseVersion: 0
|
||||
switchDisplayVersion: 1.0.0
|
||||
switchStartupUserAccount: 0
|
||||
switchTouchScreenUsage: 0
|
||||
switchSupportedLanguagesMask: 0
|
||||
switchLogoType: 0
|
||||
switchApplicationErrorCodeCategory:
|
||||
switchUserAccountSaveDataSize: 0
|
||||
switchUserAccountSaveDataJournalSize: 0
|
||||
switchApplicationAttribute: 0
|
||||
switchCardSpecSize: -1
|
||||
switchCardSpecClock: -1
|
||||
switchRatingsMask: 0
|
||||
switchRatingsInt_0: 0
|
||||
switchRatingsInt_1: 0
|
||||
switchRatingsInt_2: 0
|
||||
switchRatingsInt_3: 0
|
||||
switchRatingsInt_4: 0
|
||||
switchRatingsInt_5: 0
|
||||
switchRatingsInt_6: 0
|
||||
switchRatingsInt_7: 0
|
||||
switchRatingsInt_8: 0
|
||||
switchRatingsInt_9: 0
|
||||
switchRatingsInt_10: 0
|
||||
switchRatingsInt_11: 0
|
||||
switchLocalCommunicationIds_0:
|
||||
switchLocalCommunicationIds_1:
|
||||
switchLocalCommunicationIds_2:
|
||||
switchLocalCommunicationIds_3:
|
||||
switchLocalCommunicationIds_4:
|
||||
switchLocalCommunicationIds_5:
|
||||
switchLocalCommunicationIds_6:
|
||||
switchLocalCommunicationIds_7:
|
||||
switchParentalControl: 0
|
||||
switchAllowsScreenshot: 1
|
||||
switchAllowsVideoCapturing: 1
|
||||
switchAllowsRuntimeAddOnContentInstall: 0
|
||||
switchDataLossConfirmation: 0
|
||||
switchUserAccountLockEnabled: 0
|
||||
switchSystemResourceMemory: 16777216
|
||||
switchSupportedNpadStyles: 6
|
||||
switchNativeFsCacheSize: 32
|
||||
switchIsHoldTypeHorizontal: 0
|
||||
switchSupportedNpadCount: 8
|
||||
switchSocketConfigEnabled: 0
|
||||
switchTcpInitialSendBufferSize: 32
|
||||
switchTcpInitialReceiveBufferSize: 64
|
||||
switchTcpAutoSendBufferSizeMax: 256
|
||||
switchTcpAutoReceiveBufferSizeMax: 256
|
||||
switchUdpSendBufferSize: 9
|
||||
switchUdpReceiveBufferSize: 42
|
||||
switchSocketBufferEfficiency: 4
|
||||
switchSocketInitializeEnabled: 1
|
||||
switchNetworkInterfaceManagerInitializeEnabled: 1
|
||||
switchPlayerConnectionEnabled: 1
|
||||
ps4NPAgeRating: 12
|
||||
ps4NPTitleSecret:
|
||||
ps4NPTrophyPackPath:
|
||||
ps4ParentalLevel: 11
|
||||
ps4ContentID: ED1633-NPXX51362_00-0000000000000000
|
||||
ps4Category: 0
|
||||
ps4MasterVersion: 01.00
|
||||
ps4AppVersion: 01.00
|
||||
ps4AppType: 0
|
||||
ps4ParamSfxPath:
|
||||
ps4VideoOutPixelFormat: 0
|
||||
ps4VideoOutInitialWidth: 1920
|
||||
ps4VideoOutBaseModeInitialWidth: 1920
|
||||
ps4VideoOutReprojectionRate: 60
|
||||
ps4PronunciationXMLPath:
|
||||
ps4PronunciationSIGPath:
|
||||
ps4BackgroundImagePath:
|
||||
ps4StartupImagePath:
|
||||
ps4StartupImagesFolder:
|
||||
ps4IconImagesFolder:
|
||||
ps4SaveDataImagePath:
|
||||
ps4SdkOverride:
|
||||
ps4BGMPath:
|
||||
ps4ShareFilePath:
|
||||
ps4ShareOverlayImagePath:
|
||||
ps4PrivacyGuardImagePath:
|
||||
ps4NPtitleDatPath:
|
||||
ps4RemotePlayKeyAssignment: -1
|
||||
ps4RemotePlayKeyMappingDir:
|
||||
ps4PlayTogetherPlayerCount: 0
|
||||
ps4EnterButtonAssignment: 2
|
||||
ps4ApplicationParam1: 0
|
||||
ps4ApplicationParam2: 0
|
||||
ps4ApplicationParam3: 0
|
||||
ps4ApplicationParam4: 0
|
||||
ps4DownloadDataSize: 0
|
||||
ps4GarlicHeapSize: 2048
|
||||
ps4ProGarlicHeapSize: 2560
|
||||
playerPrefsMaxSize: 32768
|
||||
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
|
||||
ps4pnSessions: 1
|
||||
ps4pnPresence: 1
|
||||
ps4pnFriends: 1
|
||||
ps4pnGameCustomData: 1
|
||||
playerPrefsSupport: 0
|
||||
enableApplicationExit: 0
|
||||
resetTempFolder: 1
|
||||
restrictedAudioUsageRights: 0
|
||||
ps4UseResolutionFallback: 0
|
||||
ps4ReprojectionSupport: 0
|
||||
ps4UseAudio3dBackend: 0
|
||||
ps4SocialScreenEnabled: 0
|
||||
ps4ScriptOptimizationLevel: 2
|
||||
ps4Audio3dVirtualSpeakerCount: 14
|
||||
ps4attribCpuUsage: 0
|
||||
ps4PatchPkgPath:
|
||||
ps4PatchLatestPkgPath:
|
||||
ps4PatchChangeinfoPath:
|
||||
ps4PatchDayOne: 0
|
||||
ps4attribUserManagement: 0
|
||||
ps4attribMoveSupport: 0
|
||||
ps4attrib3DSupport: 0
|
||||
ps4attribShareSupport: 0
|
||||
ps4attribExclusiveVR: 0
|
||||
ps4disableAutoHideSplash: 0
|
||||
ps4videoRecordingFeaturesUsed: 0
|
||||
ps4contentSearchFeaturesUsed: 0
|
||||
ps4attribEyeToEyeDistanceSettingVR: 0
|
||||
ps4IncludedModules: []
|
||||
monoEnv:
|
||||
splashScreenBackgroundSourceLandscape: {fileID: 0}
|
||||
splashScreenBackgroundSourcePortrait: {fileID: 0}
|
||||
spritePackerPolicy:
|
||||
webGLMemorySize: 32
|
||||
webGLExceptionSupport: 1
|
||||
webGLNameFilesAsHashes: 0
|
||||
webGLDataCaching: 1
|
||||
webGLDebugSymbols: 0
|
||||
webGLEmscriptenArgs:
|
||||
webGLModulesDirectory:
|
||||
webGLTemplate: APPLICATION:Default
|
||||
webGLAnalyzeBuildSize: 0
|
||||
webGLUseEmbeddedResources: 0
|
||||
webGLCompressionFormat: 0
|
||||
webGLLinkerTarget: 1
|
||||
webGLThreadsSupport: 0
|
||||
webGLWasmStreaming: 0
|
||||
scriptingDefineSymbols: {}
|
||||
platformArchitecture: {}
|
||||
scriptingBackend: {}
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
incrementalIl2cppBuild: {}
|
||||
allowUnsafeCode: 0
|
||||
additionalIl2CppArgs:
|
||||
scriptingRuntimeVersion: 1
|
||||
gcIncremental: 0
|
||||
gcWBarrierValidation: 0
|
||||
apiCompatibilityLevelPerPlatform: {}
|
||||
m_RenderingPath: 1
|
||||
m_MobileRenderingPath: 1
|
||||
metroPackageName: MA_TextureAtlas
|
||||
metroPackageVersion:
|
||||
metroCertificatePath:
|
||||
metroCertificatePassword:
|
||||
metroCertificateSubject:
|
||||
metroCertificateIssuer:
|
||||
metroCertificateNotAfter: 0000000000000000
|
||||
metroApplicationDescription: MA_TextureAtlas
|
||||
wsaImages: {}
|
||||
metroTileShortName:
|
||||
metroTileShowName: 0
|
||||
metroMediumTileShowName: 0
|
||||
metroLargeTileShowName: 0
|
||||
metroWideTileShowName: 0
|
||||
metroSupportStreamingInstall: 0
|
||||
metroLastRequiredScene: 0
|
||||
metroDefaultTileSize: 1
|
||||
metroTileForegroundText: 2
|
||||
metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
|
||||
metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
|
||||
a: 1}
|
||||
metroSplashScreenUseBackgroundColor: 0
|
||||
platformCapabilities: {}
|
||||
metroTargetDeviceFamilies: {}
|
||||
metroFTAName:
|
||||
metroFTAFileTypes: []
|
||||
metroProtocolName:
|
||||
XboxOneProductId:
|
||||
XboxOneUpdateKey:
|
||||
XboxOneSandboxId:
|
||||
XboxOneContentId:
|
||||
XboxOneTitleId:
|
||||
XboxOneSCId:
|
||||
XboxOneGameOsOverridePath:
|
||||
XboxOnePackagingOverridePath:
|
||||
XboxOneAppManifestOverridePath:
|
||||
XboxOneVersion: 1.0.0.0
|
||||
XboxOnePackageEncryption: 0
|
||||
XboxOnePackageUpdateGranularity: 2
|
||||
XboxOneDescription:
|
||||
XboxOneLanguage:
|
||||
- enus
|
||||
XboxOneCapability: []
|
||||
XboxOneGameRating: {}
|
||||
XboxOneIsContentPackage: 0
|
||||
XboxOneEnableGPUVariability: 1
|
||||
XboxOneSockets: {}
|
||||
XboxOneSplashScreen: {fileID: 0}
|
||||
XboxOneAllowedProductIds: []
|
||||
XboxOnePersistentLocalStorageSize: 0
|
||||
XboxOneXTitleMemory: 8
|
||||
xboxOneScriptCompiler: 1
|
||||
XboxOneOverrideIdentityName:
|
||||
vrEditorSettings:
|
||||
daydream:
|
||||
daydreamIconForeground: {fileID: 0}
|
||||
daydreamIconBackground: {fileID: 0}
|
||||
cloudServicesEnabled: {}
|
||||
luminIcon:
|
||||
m_Name:
|
||||
m_ModelFolderPath:
|
||||
m_PortalFolderPath:
|
||||
luminCert:
|
||||
m_CertPath:
|
||||
m_SignPackage: 1
|
||||
luminIsChannelApp: 0
|
||||
luminVersion:
|
||||
m_VersionCode: 1
|
||||
m_VersionName:
|
||||
facebookSdkVersion:
|
||||
facebookAppId:
|
||||
facebookCookies: 1
|
||||
facebookLogging: 1
|
||||
facebookStatus: 1
|
||||
facebookXfbml: 0
|
||||
facebookFrictionlessRequests: 1
|
||||
apiCompatibilityLevel: 6
|
||||
cloudProjectId:
|
||||
framebufferDepthMemorylessMode: 0
|
||||
projectName:
|
||||
organizationId:
|
||||
cloudEnabled: 0
|
||||
enableNativePlatformBackendsForNewInputSystem: 0
|
||||
disableOldInputManagerSupport: 0
|
||||
legacyClampBlendShapeWeights: 0
|
2
ProjectSettings/ProjectVersion.txt
Normal file
@ -0,0 +1,2 @@
|
||||
m_EditorVersion: 2019.3.0f6
|
||||
m_EditorVersionWithRevision: 2019.3.0f6 (27ab2135bccf)
|