Upload project files

This commit is contained in:
Misaki
2024-09-16 00:08:10 +09:00
commit 0a4745662a
218 changed files with 13387 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6d7642bfb9840d94181b9826c4f61ba4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: a36d0148cfebe8c428c95a88eae0819a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 08654cfbeb927194e962e78c4aa830c8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 937646d041ffb2c4c8b4139900477869
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: c87abe98330a0ef46b5bbf5b784e8bc3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: bc1c9a2da21fe83448b139a8a35aa32e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: a61bfbad022af42448490799093b2d97
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 1517c386de843a742afb10e4d9f20241
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 89f753d5e2b91c842a8de6447e3fe8b3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c822feadf9228f342af3c4ad28582b64
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
namespace Misaki.ArtToolEditor
{
public enum AlignmentType
{
Surface,
Stroke,
Object
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f772b54ba4b26684783b464429761c76

View File

@@ -0,0 +1,15 @@
namespace Misaki.ArtToolEditor
{
public class BrustSetting
{
public float BrushSize = 1.0f;
public float SplatSpacing = 0.0f;
public float Density = 1.0f;
//public AnimationCurve DensityFalloff = new() { keys = new Keyframe[2] { new(0, 1, 0, 0f, 0.33f, 0.33f), new(1, 0, -2.71698f, -2.71698f, 0.04166669f, 0.3333333f) } };
public bool GpuInstancing;
public bool Gravity;
public int PaintLayer = 1;
public bool AvoidOverlap = true;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 86238205cd9e2fa46b2d968712f138a8

View File

@@ -0,0 +1,9 @@
namespace Misaki.ArtToolEditor
{
public enum PaintType
{
Disable,
Paint,
Erase
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 62169afb2f6013f459419503b0ff9d54

View File

@@ -0,0 +1,9 @@
namespace Misaki.ArtToolEditor
{
public enum ParentType
{
None,
Target,
Custom
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d1b4396dd01848242910a05acbd0b1f2

View File

@@ -0,0 +1,13 @@
using System;
namespace Misaki.ArtToolEditor
{
[Flags]
public enum RandomnessType
{
None = 0,
Position = 1 << 0,
Rotation = 1 << 1,
Scale = 1 << 2
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 13f48dca3ecc2a048897b24de62a947f

View File

@@ -0,0 +1,8 @@
namespace Misaki.ArtToolEditor
{
public enum ReferencePointType
{
Axis,
BoundingBox
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 828353399e10eb847aa0dc512523b9b1

View File

@@ -0,0 +1,27 @@
using UnityEngine;
namespace Misaki.ArtToolEditor
{
public class SourcePrefab
{
public bool Enabled = true;
public Texture2D Icon;
public GameObject Prefab;
public float Frequency = 1.0f;
public AlignmentType Alignment;
public ParentType Parent;
public GameObject ParentObject;
public float ObjectSpacing = 1.0f;
public ReferencePointType ReferencePoint;
public float SlopeFilter = 45;
public RandomnessType Randomness;
public Vector3 PositionMin;
public Vector3 PositionMax;
public Vector3 RotationMin;
public Vector3 RotationMax;
public Vector3 ScaleMin = Vector3.one;
public Vector3 ScaleMax = Vector3.one;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e7f6438ee4d032d469a646aa2f17c1d9

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 983178edcf0295a4f82dd5b00863b302
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,88 @@
using UnityEngine;
namespace Misaki.ArtToolEditor
{
internal class BoundUtilities
{
internal struct SphereBounds
{
internal Vector3 position;
internal float radius;
/// <summary>
/// Create a sphere bound based on a position and a radius.
/// </summary>
/// <param name="p">Position</param>
/// <param name="r">Radius</param>
internal SphereBounds(Vector3 p, float r)
{
position = p;
radius = r;
}
/// <summary>
/// Return true if the other sphere is in the radius of this sphere bound.
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
internal bool Intersects(SphereBounds other)
{
return Vector3.Distance(position, other.position) < (radius + other.radius);
}
}
/// <summary>
/// Create a spherical bounds inside of a Renderer bounds.
/// It'll take every meshes found in the hierarchy into account.
/// </summary>
/// <param name="go">GameObject having Renderer component(s).</param>
/// <param name="bounds">Sphere bounds instance in which sphere information will be store.</param>
/// <returns>True if bounds data has been set.</returns>
internal static bool GetSphereBounds(GameObject go, out SphereBounds bounds)
{
var entireObjectBounds = GetHierarchyBounds(go);
bounds = default(SphereBounds);
if (entireObjectBounds.size == Vector3.zero)
return false;
bounds.position = entireObjectBounds.center;
bounds.radius = Mathf.Max(entireObjectBounds.extents.x, entireObjectBounds.extents.z);
return true;
}
/// <summary>
/// Create bounds based on meshes found in the given GameObject hierarchy.
/// </summary>
/// <param name="parent">Root object.</param>
/// <returns>New bounds around the given GameObject.
/// If GameObject has no Renderer, bounds will have a size of zero.</returns>
internal static Bounds GetHierarchyBounds(GameObject parent)
{
var renderers = parent.GetComponentsInChildren<Renderer>();
var bounds = default(Bounds);
if (renderers.Length == 0)
return bounds;
for (var i = 0; i < renderers.Length; ++i)
{
var it = renderers[i].bounds;
if (i == 0)
{
// World position
bounds.center = it.center;
}
bounds.Encapsulate(it.max);
bounds.Encapsulate(it.min);
}
return bounds;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8b26f9e24f955774aa8129e3cf5e6b4f

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 17aeae943c40d294b834f6b3916ba7d8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
<engine:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:engine="UnityEngine.UIElements" xmlns:editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
<engine:VisualElement name="Root" data-source-type="Misaki.ArtToolEditor.SourcePrefab, Misaki.ArtTool.Editor" style="flex-grow: 1; flex-direction: row; height: 50px;">
<engine:Toggle style="margin-right: 8px; margin-top: 3px;">
<Bindings>
<engine:DataBinding property="value" data-source-path="Enabled" binding-mode="TwoWay" />
</Bindings>
</engine:Toggle>
<engine:VisualElement name="Icon" style="width: 50px;">
<Bindings>
<engine:DataBinding property="style.backgroundImage" data-source-path="Icon" binding-mode="TwoWay" />
</Bindings>
</engine:VisualElement>
<engine:VisualElement style="flex-grow: 1; margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 8px; justify-content: center;">
<editor:ObjectField type="UnityEngine.GameObject, UnityEngine.CoreModule">
<Bindings>
<engine:DataBinding property="value" data-source-path="Prefab" binding-mode="TwoWay" />
</Bindings>
</editor:ObjectField>
<engine:Slider value="0.5" high-value="1" show-input-field="true">
<Bindings>
<engine:DataBinding property="value" data-source-path="Frequency" binding-mode="TwoWay" />
</Bindings>
</engine:Slider>
</engine:VisualElement>
</engine:VisualElement>
</engine:UXML>

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 05d16995f16706d48957fd51a6f23988
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View File

@@ -0,0 +1,166 @@
using Misaki.ArtToolEditor;
using System.Linq;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;
public class PrefabPainterWindow : EditorWindow
{
public PrefabPainterWindow()
{
ViewModel = PrefabPainterViewModel.Instance;
}
public PrefabPainterViewModel ViewModel;
[SerializeField]
private VisualTreeAsset visualTreeAsset = default;
[SerializeField]
private VisualTreeAsset listViewItemTemplate = default;
[MenuItem("Tools/Prefab Painter")]
public static void ShowExample()
{
var wnd = GetWindow<PrefabPainterWindow>();
var icon = EditorGUIUtility.IconContent("Prefab Icon");
wnd.titleContent = new GUIContent("Prefab Painter", icon.image);
}
public void CreateGUI()
{
var root = rootVisualElement;
VisualElement visualAsset = visualTreeAsset.Instantiate();
var visualAssetRoot = visualAsset.Q<VisualElement>("Root");
visualAssetRoot.dataSource = this;
SetupModeButton(visualAsset);
SetupListView(visualAsset);
root.Add(visualAsset);
}
private void OnEnable()
{
SceneView.duringSceneGui += OnSceneGUI;
ViewModel.OnNavigatedTo();
}
private void OnDisable()
{
SceneView.duringSceneGui -= OnSceneGUI;
}
private void OnSceneGUI(SceneView sceneView)
{
ViewModel.DrawBrush();
}
private void SetupModeButton(VisualElement visualAsset)
{
var disableModeButton = visualAsset.Q<Button>("Disable-Mode-Button");
var paintModeButton = visualAsset.Q<Button>("Paint-Mode-Button");
var eraseModeButton = visualAsset.Q<Button>("Erase-Mode-Button");
disableModeButton.clicked += () =>
{
disableModeButton.AddToClassList("Selected");
paintModeButton.RemoveFromClassList("Selected");
eraseModeButton.RemoveFromClassList("Selected");
ViewModel.CurrentPaintType = PaintType.Disable;
};
paintModeButton.clicked += () =>
{
paintModeButton.AddToClassList("Selected");
disableModeButton.RemoveFromClassList("Selected");
eraseModeButton.RemoveFromClassList("Selected");
ViewModel.CurrentPaintType = PaintType.Paint;
};
eraseModeButton.clicked += () =>
{
eraseModeButton.AddToClassList("Selected");
disableModeButton.RemoveFromClassList("Selected");
paintModeButton.RemoveFromClassList("Selected");
ViewModel.CurrentPaintType = PaintType.Erase;
};
}
private void SetupListView(VisualElement visualAsset)
{
var listView = visualAsset.Q<ListView>("SourcePrefabs-ListView");
var PrefabSettingSection = visualAsset.Q<VisualElement>("Prefab-Setting");
PrefabSettingSection.style.display = DisplayStyle.None;
listView.makeItem = () => listViewItemTemplate.CloneTree();
listView.selectionChanged += objects =>
{
if (objects.Count() <= 0)
{
return;
}
if (objects.First() is not SourcePrefab sourcePrefab)
{
return;
}
ViewModel.CurrentSelection = sourcePrefab;
PrefabSettingSection.style.display = DisplayStyle.Flex;
};
listView.bindItem = (element, i) =>
{
var objectField = element.Q<ObjectField>();
objectField.RegisterValueChangedCallback((evt) =>
{
if (evt.newValue == null)
{
return;
}
var icon = AssetPreview.GetAssetPreview(evt.newValue);
while (icon == null)
{
icon = AssetPreview.GetAssetPreview(evt.newValue);
}
ViewModel.SourcePrefabs[i].Icon = icon;
});
};
listView.itemsAdded += (items) =>
{
for (var i = 0; i < items.Count(); i++)
{
var index = listView.itemsSource.Count - i - 1;
ViewModel.SourcePrefabs[index] = new SourcePrefab();
}
listView.Rebuild();
};
listView.itemsRemoved += (items) =>
{
if (ViewModel.SourcePrefabs.Count - items.Count() <= 0)
{
PrefabSettingSection.style.display = DisplayStyle.None;
return;
}
listView.Rebuild();
};
listView.itemIndexChanged += (from, to) =>
{
listView.Rebuild();
};
}
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 09eefec055820c24785d451ce8c3c2eb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- m_ViewDataDictionary: {instanceID: 0}
- visualTreeAsset: {fileID: 9197481963319205126, guid: a4196f221910b5442bc80d8305ee937e,
type: 3}
- listViewItemTemplate: {fileID: 9197481963319205126, guid: 05d16995f16706d48957fd51a6f23988,
type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,45 @@
.Header {
-unity-font-style: bold;
margin-top: 16px;
margin-bottom: 12px;
font-size: 14px;
}
.SubHeader {
margin-bottom: 6px;
-unity-font-style: bold;
font-size: 12px;
margin-top: 8px;
}
.SmallHeader {
margin-top: 6px;
margin-bottom: 4px;
}
.PropertyContainer {
flex-grow: 1;
margin-left: 8px;
}
#Root > .unity-tab-view > #unity-tab-view__header-container {
align-self: center;
}
#unity-tab__content-container {
padding-top: 16px;
padding-right: 5px;
padding-bottom: 5px;
padding-left: 5px;
}
.Selected {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-left-color: rgb(186, 186, 186);
border-right-color: rgb(186, 186, 186);
border-top-color: rgb(186, 186, 186);
border-bottom-color: rgb(186, 186, 186);
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1d93d96e22cd7f1429707b56e9402af2
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0

View File

@@ -0,0 +1,181 @@
<engine:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:engine="UnityEngine.UIElements" xmlns:editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
<Style src="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/View/PrefabPainterWindow.uss?fileID=7433441132597879392&amp;guid=1d93d96e22cd7f1429707b56e9402af2&amp;type=3#PrefabPainterWindow" />
<engine:VisualElement name="Root" data-source-type="PrefabPainterWindow, Misaki.ArtTool.Editor" style="flex-grow: 1; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px;">
<engine:VisualElement name="Title" style="flex-grow: 0;">
<engine:Label text="Prefab Painter" style="align-self: center; font-size: 28px; margin-top: 32px; margin-bottom: 24px;" />
</engine:VisualElement>
<engine:VisualElement name="Toolbar" style="flex-grow: 0; flex-direction: row; justify-content: center; margin-bottom: 16px;">
<engine:Button icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/unavailable.png?fileID=2800000&amp;guid=89f753d5e2b91c842a8de6447e3fe8b3&amp;type=3#unavailable" name="Disable-Mode-Button" tooltip="Paint" class="Selected" style="width: 30px; height: 30px;" />
<engine:Button icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/Paint.png?fileID=2800000&amp;guid=a36d0148cfebe8c428c95a88eae0819a&amp;type=3#Paint" name="Paint-Mode-Button" tooltip="Paint" style="width: 30px; height: 30px;" />
<engine:Button icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/erase.png?fileID=2800000&amp;guid=937646d041ffb2c4c8b4139900477869&amp;type=3#erase" name="Erase-Mode-Button" tooltip="Erase" style="width: 30px; height: 30px;" />
</engine:VisualElement>
<engine:TabView style="flex-grow: 1;">
<engine:Tab label="Prefab" name="Prefab-Tab" icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/object.png?fileID=2800000&amp;guid=a61bfbad022af42448490799093b2d97&amp;type=3#object" style="flex-grow: 1;">
<engine:VisualElement name="Prefab-List" style="padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 0;">
<editor:Toolbar style="margin-top: 0; margin-right: 0; margin-bottom: 8px; margin-left: 0;">
<editor:ToolbarButton icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/import.png?fileID=2800000&amp;guid=bc1c9a2da21fe83448b139a8a35aa32e&amp;type=3#import" tooltip="Import prefab list" style="width: 30px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px;" />
<editor:ToolbarButton icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/export.png?fileID=2800000&amp;guid=c87abe98330a0ef46b5bbf5b784e8bc3&amp;type=3#export" tooltip="Export prefab list" style="padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; width: 30px;" />
<editor:ToolbarSpacer style="flex-grow: 1;" />
<editor:ToolbarSearchField style="width: 50%;" />
</editor:Toolbar>
<engine:ListView reorderable="true" reorder-mode="Animated" show-border="true" fixed-item-height="50" item-template="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/View/PrefabListItemTemplate.uxml?fileID=9197481963319205126&amp;guid=05d16995f16706d48957fd51a6f23988&amp;type=3#PrefabListItemTemplate" name="SourcePrefabs-ListView" data-source-path="ViewModel" show-add-remove-footer="true" binding-source-selection-mode="AutoAssign" virtualization-method="DynamicHeight" style="max-height: 1000px;">
<Bindings>
<engine:DataBinding property="itemsSource" data-source-path="SourcePrefabs" binding-mode="TwoWay" />
</Bindings>
</engine:ListView>
<engine:VisualElement name="List-Setting" class="SettingContainer PropertyContainer">
<engine:Label text="List setting" name="List-Setting-Header" class="SubHeader" />
<engine:VisualElement name="Scatter-Properties" class="PropertyContainer" style="flex-grow: 1;">
<engine:DropdownField label="Random Order" choices="Disable,Enable" index="1" data-source-path="ViewModel">
<Bindings>
<engine:DataBinding property="index" data-source-path="RandomOrder" binding-mode="TwoWay" />
</Bindings>
</engine:DropdownField>
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="Prefab-Setting" data-source-path="ViewModel" style="flex-grow: 1;">
<engine:Label text="Prefab setting" class="Header" />
<engine:VisualElement class="PropertyContainer">
<engine:VisualElement name="Scatter-Setting" class="SettingContainer">
<engine:Label text="Scatter setting" name="Scatter-Header" class="SubHeader" />
<engine:VisualElement name="Scatter-Properties" class="PropertyContainer" style="flex-grow: 1;">
<engine:EnumField label="Align To" type="Misaki.ArtToolEditor.AlignmentType, Misaki.ArtTool.Editor" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="Alignment" binding-mode="TwoWay" />
</Bindings>
</engine:EnumField>
<engine:EnumField label="Set Parent To" value="Center" type="Misaki.ArtToolEditor.ParentType, Misaki.ArtTool.Editor" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="Parent" binding-mode="TwoWay" />
</Bindings>
</engine:EnumField>
<editor:ObjectField label="Parent Object" type="UnityEngine.GameObject, UnityEngine.CoreModule" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="ParentObject" binding-mode="TwoWay" />
</Bindings>
</editor:ObjectField>
<engine:Slider label="Object Spacing" value="1" high-value="100" show-input-field="true" data-source-path="CurrentSelection" low-value="0.01">
<Bindings>
<engine:DataBinding property="value" data-source-path="ObjectSpacing" binding-mode="TwoWay" />
</Bindings>
</engine:Slider>
<engine:EnumField label="Reference Point" type="Misaki.ArtToolEditor.ReferencePointType, Misaki.ArtTool.Editor" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="ReferencePoint" binding-mode="TwoWay" />
</Bindings>
</engine:EnumField>
<engine:Slider label="Slop Filter" value="45" high-value="90" show-input-field="true" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="SlopeFilter" binding-mode="TwoWay" />
</Bindings>
</engine:Slider>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="Randomness-Setting" class="SettingContainer">
<engine:Label text="Randomness" name="Randomness-Header" class="SubHeader" />
<engine:VisualElement name="Randomness-Properties" class="PropertyContainer" style="flex-grow: 1;">
<editor:EnumFlagsField label="Enable" value="None" type="Misaki.ArtToolEditor.RandomnessType, Misaki.ArtTool.Editor" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="Randomness" binding-mode="TwoWay" />
</Bindings>
</editor:EnumFlagsField>
<engine:Label text="Position" class="SmallHeader" />
<engine:VisualElement class="PropertyContainer" style="flex-grow: 1;">
<engine:Vector3Field label="Min" value="0,0,0" name="Randomness-Position-Min" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="PositionMin" binding-mode="TwoWay" />
</Bindings>
</engine:Vector3Field>
<engine:Vector3Field label="Max" value="0,0,0" name="Randomness-Position-Min" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="PositionMax" binding-mode="TwoWay" />
</Bindings>
</engine:Vector3Field>
</engine:VisualElement>
<engine:Label text="Rotation" class="SmallHeader" />
<engine:VisualElement class="PropertyContainer" style="flex-grow: 1;">
<engine:Vector3Field label="Min" value="0,0,0" name="Randomness-Rotation-Min" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="RotationMin" binding-mode="TwoWay" />
</Bindings>
</engine:Vector3Field>
<engine:Vector3Field label="Max" value="0,0,0" name="Randomness-Rotation-Min" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="RotationMax" binding-mode="TwoWay" />
</Bindings>
</engine:Vector3Field>
</engine:VisualElement>
<engine:Label text="Scale" class="SmallHeader" />
<engine:VisualElement class="PropertyContainer" style="flex-grow: 1;">
<engine:Vector3Field label="Min" value="1,1,1" name="Randomness-Scale-Min" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="ScaleMin" binding-mode="TwoWay" />
</Bindings>
</engine:Vector3Field>
<engine:Vector3Field label="Max" value="1,1,1" name="Randomness-Scale-Max" data-source-path="CurrentSelection">
<Bindings>
<engine:DataBinding property="value" data-source-path="ScaleMax" binding-mode="TwoWay" />
</Bindings>
</engine:Vector3Field>
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
</engine:Tab>
<engine:Tab label="Brush" name="Brush-Tab" icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/brush.png?fileID=2800000&amp;guid=08654cfbeb927194e962e78c4aa830c8&amp;type=3#brush" data-source-path="ViewModel.CurrentBrushSetting">
<engine:VisualElement name="Brush-Shape" style="flex-grow: 1;">
<engine:Label text="Brush Shape" class="SubHeader" />
<engine:VisualElement class="PropertyContainer" style="flex-grow: 1;">
<engine:DropdownField label="Shape" choices="Circle,Grid,Spline" index="0" />
<engine:Slider label="Size" value="1" high-value="10" show-input-field="true">
<Bindings>
<engine:DataBinding property="value" data-source-path="BrushSize" binding-mode="TwoWay" />
</Bindings>
</engine:Slider>
<engine:FloatField label="Splat Spacing" value="0">
<Bindings>
<engine:DataBinding property="value" data-source-path="SplatSpacing" binding-mode="TwoWay" />
</Bindings>
</engine:FloatField>
<engine:Slider label="Density" value="0.5" high-value="1" show-input-field="true">
<Bindings>
<engine:DataBinding property="value" data-source-path="Density" binding-mode="TwoWay" />
</Bindings>
</engine:Slider>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="Brush-Feature" style="flex-grow: 1;">
<engine:Label text="Brush Feature" class="SubHeader" />
<engine:VisualElement class="PropertyContainer" style="flex-grow: 1;">
<engine:HelpBox message-type="Warning" text="You need to set a GPU instancing drawer to let GPU instancing work properly" />
<engine:DropdownField label="Use GPU Instancing" choices="Disable,Enable" index="0">
<Bindings>
<engine:DataBinding property="index" data-source-path="GpuInstancing" binding-mode="TwoWay" />
</Bindings>
</engine:DropdownField>
<engine:DropdownField label="Use Gravity" choices="Disable,Enable" index="0">
<Bindings>
<engine:DataBinding property="index" data-source-path="Gravity" binding-mode="TwoWay" />
</Bindings>
</engine:DropdownField>
<editor:LayerMaskField label="Paint Layer" value="1">
<Bindings>
<engine:DataBinding property="value" data-source-path="PaintLayer" binding-mode="TwoWay" />
</Bindings>
</editor:LayerMaskField>
<engine:DropdownField label="Avoid Overlap" choices="Disable,Enable" index="1">
<Bindings>
<engine:DataBinding property="index" data-source-path="AvoidOverlap" binding-mode="TwoWay" />
</Bindings>
</engine:DropdownField>
</engine:VisualElement>
</engine:VisualElement>
</engine:Tab>
<engine:Tab label="Setting" name="Setting-Tab" icon-image="project://database/Packages/com.misaki.art-tools/Editor/PrefabPainter/Icon/setting.png?fileID=2800000&amp;guid=1517c386de843a742afb10e4d9f20241&amp;type=3#setting">
<editor:ObjectField label="Instance Drawer" type="Misaki.ArtTool.InstanceDrawer, Misaki.ArtTool" />
</engine:Tab>
</engine:TabView>
</engine:VisualElement>
</engine:UXML>

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a4196f221910b5442bc80d8305ee937e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb4e69531da1a7a458134f4817b84290
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,344 @@
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace Misaki.ArtToolEditor
{
public class PrefabPainterViewModel
{
private static PrefabPainterViewModel _instance;
public static PrefabPainterViewModel Instance
{
get
{
_instance ??= new PrefabPainterViewModel();
return _instance;
}
}
private const string NamePrefix = "_(PainterInstance)";
public PaintType CurrentPaintType = PaintType.Disable;
public List<SourcePrefab> SourcePrefabs = new();
public bool RandomOrder = true;
public SourcePrefab CurrentSelection = new();
public BrustSetting CurrentBrushSetting = new();
private List<GameObject> paintedObjects;
// Use a grid to store painted objects for faster overlap checking
private const int GridSize = 5;
private Dictionary<Vector3, List<GameObject>> _grid = new Dictionary<Vector3, List<GameObject>>();
private Vector3 _lastBrushPosition = Vector3.zero;
private double _lastBrushApplication = 0;
private int _paintIndex;
public void OnNavigatedTo()
{
paintedObjects = new List<GameObject>();
var count = UnityEngine.SceneManagement.SceneManager.sceneCount;
for (var i = 0; i < count; i++)
{
var scene = UnityEngine.SceneManagement.SceneManager.GetSceneAt(i);
foreach (var rootGameObject in scene.GetRootGameObjects())
{
paintedObjects.AddRange(Object.FindObjectsByType<GameObject>(FindObjectsSortMode.None).Where(go => go.name.Contains(NamePrefix)));
}
}
// Add to grid
foreach (var go in paintedObjects)
{
var gridPosition = new Vector3(
Mathf.Floor(go.transform.position.x / GridSize) * GridSize,
Mathf.Floor(go.transform.position.y / GridSize) * GridSize,
Mathf.Floor(go.transform.position.z / GridSize) * GridSize
);
if (!_grid.ContainsKey(gridPosition))
{
_grid[gridPosition] = new List<GameObject>();
}
_grid[gridPosition].Add(go);
}
}
public void DrawBrush()
{
if (CurrentPaintType == PaintType.Disable)
{
return;
}
var ray = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition);
if (Physics.Raycast(ray, out var hit, Mathf.Infinity, CurrentBrushSetting.PaintLayer))
{
Handles.color = Color.blue;
Handles.DrawWireDisc(hit.point, hit.normal, CurrentBrushSetting.BrushSize);
if ((Event.current.type == EventType.MouseDown || Event.current.type == EventType.MouseDrag) && Event.current.button == 0 && !Event.current.alt)
{
HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive));
switch (CurrentPaintType)
{
case PaintType.Paint:
PaintPrefabs(hit.point, hit.normal);
break;
case PaintType.Erase:
ErasePrefabs(hit.point);
break;
default:
break;
}
Event.current.Use();
}
}
}
private void PaintPrefabs(Vector3 position, Vector3 normal)
{
if (CurrentBrushSetting.Density <= 0 || Vector3.Distance(position, _lastBrushPosition) < CurrentBrushSetting.SplatSpacing)
{
return;
}
var activePrefabs = SourcePrefabs.FindAll(prefab => prefab.Enabled);
if (!activePrefabs.Any())
{
return;
}
// Prevent painting too frequently
if ((EditorApplication.timeSinceStartup - _lastBrushApplication) < Mathf.Max(0.016f, (1f - CurrentBrushSetting.Density)))
{
return;
}
_lastBrushApplication = EditorApplication.timeSinceStartup;
var useableArea = CurrentBrushSetting.BrushSize * CurrentBrushSetting.BrushSize * Mathf.PI * CurrentBrushSetting.Density;
if (CurrentBrushSetting.AvoidOverlap)
{
var gridPos = new Vector3(
Mathf.Floor(position.x / GridSize) * GridSize,
Mathf.Floor(position.y / GridSize) * GridSize,
Mathf.Floor(position.z / GridSize) * GridSize
);
if (_grid.TryGetValue(gridPos, out var objectList))
{
var count = objectList.Count;
for (var i = 0; i < count; i++)
{
var go = objectList[i];
if (go == null)
{
objectList.RemoveAt(i);
continue;
}
if (Vector3.Distance(go.transform.position, position) < CurrentBrushSetting.BrushSize)
{
if (BoundUtilities.GetSphereBounds(go, out var spBound))
{
useableArea -= spBound.radius * spBound.radius * Mathf.PI;
}
}
}
}
}
while (useableArea > 0)
{
// Select a prefab
var totalFrequency = activePrefabs.Sum(prefab => prefab.Frequency);
var index = 0;
if (RandomOrder)
{
var randomValue = Random.Range(0, totalFrequency);
var cumulativeFrequency = 0.0f;
for (var i = 0; i < activePrefabs.Count; i++)
{
cumulativeFrequency += activePrefabs[i].Frequency;
if (randomValue < cumulativeFrequency)
{
index = i;
break;
}
}
}
else
{
_paintIndex = (_paintIndex + 1) % activePrefabs.Count;
index = _paintIndex;
}
var selectedPrefab = activePrefabs[index];
// Filter by slope
if (Vector3.Angle(normal, Vector3.up) > selectedPrefab.SlopeFilter)
{
return;
}
// Randomize position, rotation, and scale
var randomOffset2D = Random.insideUnitSphere * CurrentBrushSetting.BrushSize;
var randomOffset = new Vector3(randomOffset2D.x, 0, randomOffset2D.y);
randomOffset = Vector3.ProjectOnPlane(randomOffset, normal);
Vector3 right, forward;
if (Vector3.Dot(normal, Vector3.up) > 0.999f)
{
right = Vector3.Cross(Vector3.forward, normal);
forward = Vector3.Cross(normal, right);
}
else
{
right = Vector3.Cross(Vector3.up, normal);
forward = Vector3.Cross(normal, right);
}
var rotation = Quaternion.LookRotation(forward, normal);
var scale = Vector3.one;
if ((selectedPrefab.Randomness & RandomnessType.Position) != 0)
{
randomOffset += new Vector3(
Random.Range(selectedPrefab.PositionMin.x, selectedPrefab.PositionMax.x),
Random.Range(selectedPrefab.PositionMin.y, selectedPrefab.PositionMax.y),
Random.Range(selectedPrefab.PositionMin.z, selectedPrefab.PositionMax.z)
);
}
if ((selectedPrefab.Randomness & RandomnessType.Rotation) != 0)
{
rotation *= Quaternion.Euler(
Random.Range(selectedPrefab.RotationMin.x, selectedPrefab.RotationMax.x),
Random.Range(selectedPrefab.RotationMin.y, selectedPrefab.RotationMax.y),
Random.Range(selectedPrefab.RotationMin.z, selectedPrefab.RotationMax.z)
);
}
if ((selectedPrefab.Randomness & RandomnessType.Scale) != 0)
{
scale = new Vector3(
Random.Range(selectedPrefab.ScaleMin.x, selectedPrefab.ScaleMax.x),
Random.Range(selectedPrefab.ScaleMin.y, selectedPrefab.ScaleMax.y),
Random.Range(selectedPrefab.ScaleMin.z, selectedPrefab.ScaleMax.z)
);
}
var finalPosition = position + randomOffset;
var gridPosition = new Vector3(
Mathf.Floor(finalPosition.x / GridSize) * GridSize,
Mathf.Floor(finalPosition.y / GridSize) * GridSize,
Mathf.Floor(finalPosition.z / GridSize) * GridSize
);
// Avoid overlap
if (CurrentBrushSetting.AvoidOverlap)
{
var shouldSkip = false;
if (_grid.TryGetValue(gridPosition, out var objectList))
{
var count = objectList.Count;
for (var i = 0; i < count; i++)
{
var go = objectList[i];
if (go == null)
{
paintedObjects.RemoveAt(i);
continue;
}
if (Vector3.Distance(go.transform.position, finalPosition) < selectedPrefab.ObjectSpacing * 2)
{
shouldSkip = true;
break;
}
}
}
if (shouldSkip)
{
return;
}
}
if (!_grid.ContainsKey(gridPosition))
{
_grid[gridPosition] = new List<GameObject>();
}
// Instantiate and place the prefab
var gameObject = (GameObject)PrefabUtility.InstantiatePrefab(selectedPrefab.Prefab);
gameObject.name = selectedPrefab.Prefab.name + NamePrefix;
gameObject.transform.position = finalPosition;
gameObject.transform.rotation = rotation;
gameObject.transform.localScale = scale;
paintedObjects.Add(gameObject);
_grid[gridPosition].Add(gameObject);
useableArea -= selectedPrefab.ObjectSpacing * selectedPrefab.ObjectSpacing * Mathf.PI;
_lastBrushPosition = position;
}
}
private void ErasePrefabs(Vector3 position)
{
var count = paintedObjects.Count;
for (var i = count - 1; i >= 0; i--)
{
var go = paintedObjects[i];
if (go == null)
{
paintedObjects.RemoveAt(i);
continue;
}
if (Vector3.Distance(go.transform.position, position) < CurrentBrushSetting.BrushSize)
{
paintedObjects.RemoveAt(i);
var gridPosition = new Vector3(
Mathf.Floor(go.transform.position.x / GridSize) * GridSize,
Mathf.Floor(go.transform.position.y / GridSize) * GridSize,
Mathf.Floor(go.transform.position.z / GridSize) * GridSize
);
if (_grid.TryGetValue(gridPosition, out var objectList))
{
objectList.Remove(go);
}
Object.DestroyImmediate(go);
}
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0887c48f8156f2f4588f11d76f49df4f