refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-30 16:04:04 +08:00
parent 4758b65159
commit 44a72d1a8f
329 changed files with 4201 additions and 100185 deletions

View File

@@ -1,3 +0,0 @@
*** DO NOT REMOVE THIS FILE ***
// This is a special file to control automatic GUID remapping of TMP resources such as <TMP_FontAsset> to the Unity internal <FontAsset> type.

View File

@@ -1,143 +0,0 @@
fileFormatVersion: 2
guid: be1dd4c785e3be14fb0a702bb1fe9772
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 1
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
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -2
maxTextureSize: 128
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 1
mipBias: -100
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
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: 2
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Windows Store Apps
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: WebGL
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 1
pSDShowRemoveMatteOption: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,57 +0,0 @@
fileFormatVersion: 2
guid: 2cd4016ef85831541a03ced49e86db76
timeCreated: 1463559213
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 128
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,57 +0,0 @@
fileFormatVersion: 2
guid: 4a9c98add86d40643accf4d47650ffba
timeCreated: 1457860876
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 128
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,57 +0,0 @@
fileFormatVersion: 2
guid: 262bfc9a44ca0f74f9563a2deea91648
timeCreated: 1463559213
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 128
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 1774381ab87c85f44ad56fcede06515e
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 128
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,75 +0,0 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "Hidden/TMP/Internal/Editor/Distance Field SSD" {
Properties{
_FaceColor("Face Color", Color) = (1,1,1,1)
_FaceDilate("Face Dilate", Range(-1,1)) = 0
_OutlineColor("Outline Color", Color) = (0,0,0,1)
_OutlineWidth("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness("Outline Softness", Range(0,1)) = 0
_UnderlayColor("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness("Border Softness", Range(0,1)) = 0
_WeightNormal("Weight Normal", float) = 0
_WeightBold("Weight Bold", float) = .5
_ShaderFlags("Flags", float) = 0
_ScaleRatioA("Scale RatioA", float) = 1
_ScaleRatioB("Scale RatioB", float) = 1
_ScaleRatioC("Scale RatioC", float) = 1
_MainTex("Font Atlas", 2D) = "white" {}
_TextureWidth("Texture Width", float) = 1024
_TextureHeight("Texture Height", float) = 1024
_GradientScale("Gradient Scale", float) = 1
_ScaleX("Scale X", float) = 1
_ScaleY("Scale Y", float) = 1
_PerspectiveFilter("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness("Sharpness", Range(-1,1)) = 0
_VertexOffsetX("Vertex OffsetX", float) = 0
_VertexOffsetY("Vertex OffsetY", float) = 0
}
SubShader
{
Tags
{
"ForceSupported" = "True"
}
Lighting Off
Blend One OneMinusSrcAlpha
Cull Off
ZWrite Off
ZTest Always
Pass
{
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMP_Properties.cginc"
#include "TMP_SDF_SSD.cginc"
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 41546e97322eff343a6d1244de178a5d
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: bcac79c55067867468844f63cd98df00
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 5a12d249eb330f040954fd6351b13b83
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 8ec46732371553e459edb3ec3969f87a
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 1b8d5ff08a2b895429463074c8073a4d
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: a4fe7cc4ed1bebd4aa92d476f2bb19ad
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,58 +0,0 @@
fileFormatVersion: 2
guid: 536ac717a42c6b041aadc5c80abb8b78
timeCreated: 1467964791
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,58 +0,0 @@
fileFormatVersion: 2
guid: 2b5e911245fed0646b4cbd12da6985f0
timeCreated: 1467964413
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: ed5f7584c3aac3744b110dff90e405d4
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,56 +0,0 @@
fileFormatVersion: 2
guid: 42b7351f75d64f34781c9eabf90c1215
timeCreated: 1484171296
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,56 +0,0 @@
fileFormatVersion: 2
guid: 2f51c7bc5c3fb004698e6d065123b176
timeCreated: 1484171296
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: d8e76cc9d5068834b8bfb6291eff8d4c
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 2597c5156df761e41b7822f01c2b79bf
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 4656f5679b2ff1b4a9824d49afeb9a37
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,59 +0,0 @@
fileFormatVersion: 2
guid: 5cd08cc744a8aeb47bb60edb1ac5a378
timeCreated: 1472535271
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,59 +0,0 @@
fileFormatVersion: 2
guid: cf9a95600ac47c9439a82c4007f53eed
timeCreated: 1472535778
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 72f7126753985494e86936354d4d2122
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 1d8966d1879a0d14ea2e1425a387a1a7
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,58 +0,0 @@
fileFormatVersion: 2
guid: b43415a9d4bfa1e49b7dc578e471e9be
timeCreated: 1426240649
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 62c9af2994d13984db3b0e5b4ea49429
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 0ccb31cd3f7491740b061365dd229ac2
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,58 +0,0 @@
fileFormatVersion: 2
guid: 73c51e53ec5a9f94f90073f2475a4234
timeCreated: 1426240650
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: 933d1b8dcfb561041a0c0e637598aae9
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: e6d0c558c2d48ac49806d793bd96a599
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: e8037b78e0bc86c49b137c1f644fdadc
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
fileFormatVersion: 2
guid: ad3c3aac0abe836409f34bcde02494a6
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 32
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fa01d66f44e9d4a42ae8ca989003a496
guid: 6ab70aee4d56447429c680537fbf93ed
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 35400ee909f32d94f9901006d051135c
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Noto Sans
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,93 @@
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2ade62400bece1a4f9093a91ca22b276
guid: 42632c789aa9b7e47b17c77a4663f14d
TextScriptImporter:
externalObjects: {}
userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8a4406749db485641a802331b0cbfa4e
guid: 243e06394e614e5d99fab26083b707fa
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,8 +1,9 @@
fileFormatVersion: 2
guid: 26b31616c8395e84c8101989aae56ba6
guid: 731f1baa9d144a9897cb1d341c2092b8
folderAsset: yes
timeCreated: 1442040525
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: 7b1bccbdc81aec64ea124b15e02ab12a
folderAsset: yes
DefaultImporter:
guid: 6368f7bc44d26f346a4682281270a0f0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1 @@
)]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fade42e8bc714b018fac513c043d323b
timeCreated: 1425440388
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1 @@
([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\{£¥"々〇$¥₩ #

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d82c1b31c7e74239bff1220585707d2b
timeCreated: 1425440388
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,44 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3}
m_Name: TMP Settings
m_EditorClassIdentifier:
m_enableWordWrapping: 1
m_enableKerning: 1
m_enableExtraPadding: 0
m_enableTintAllSprites: 0
m_enableParseEscapeCharacters: 1
m_EnableRaycastTarget: 1
m_GetFontFeaturesAtRuntime: 1
m_missingGlyphCharacter: 0
m_warningsDisabled: 0
m_defaultFontAsset: {fileID: 11400000, guid: 6368f7bc44d26f346a4682281270a0f0, type: 2}
m_defaultFontAssetPath: Fonts & Materials/
m_defaultFontSize: 36
m_defaultAutoSizeMinRatio: 0.5
m_defaultAutoSizeMaxRatio: 2
m_defaultTextMeshProTextContainerSize: {x: 20, y: 5}
m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50}
m_autoSizeTextContainer: 0
m_IsTextObjectScaleStatic: 0
m_fallbackFontAssets: []
m_matchMaterialPreset: 1
m_defaultSpriteAsset: {fileID: 0}
m_defaultSpriteAssetPath: Sprite Assets/
m_enableEmojiSupport: 1
m_MissingCharacterSpriteUnicode: 0
m_defaultColorGradientPresetsPath: Color Gradient Presets/
m_defaultStyleSheet: {fileID: 0}
m_StyleSheetsResourcePath:
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, type: 3}
m_UseModernHangulLineBreakingRules: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3f5b5dff67a942289a9defa416b206f3
timeCreated: 1436653997
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,30 +0,0 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Performance", "UNT0026")]
[assembly: SuppressMessage("Performance", "UNT0035")]
[assembly: SuppressMessage("Style", "IDE0017")]
[assembly: SuppressMessage("Style", "IDE0018")]
[assembly: SuppressMessage("Style", "IDE0031")]
[assembly: SuppressMessage("Style", "IDE0034")]
[assembly: SuppressMessage("Style", "IDE0044")]
[assembly: SuppressMessage("Style", "IDE0051")]
[assembly: SuppressMessage("Style", "IDE0052")]
[assembly: SuppressMessage("Style", "IDE0054")]
[assembly: SuppressMessage("Style", "IDE0057")]
[assembly: SuppressMessage("Style", "IDE0059")]
[assembly: SuppressMessage("Style", "IDE0060")]
[assembly: SuppressMessage("Style", "IDE0063")]
[assembly: SuppressMessage("Style", "IDE0066")]
[assembly: SuppressMessage("Style", "IDE0074")]
[assembly: SuppressMessage("Style", "IDE0075")]
[assembly: SuppressMessage("Style", "IDE0090")]
[assembly: SuppressMessage("Style", "IDE0180")]
[assembly: SuppressMessage("Style", "IDE0251")]
[assembly: SuppressMessage("Style", "IDE1005")]
[assembly: SuppressMessage("Style", "IDE1006")]
[assembly: SuppressMessage("Correctness", "UNT0008", Scope = "member", Target = "~M:TMPro.EditorUtilities.TMP_EditorPanel.OnEnable")]

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9e8aa96a139a7414cb4d2031a22588db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,677 +0,0 @@
#if HDRP_10_7_OR_NEWER
using UnityEngine;
using UnityEditor;
using UnityEditor.Rendering.HighDefinition;
namespace TMPro.EditorUtilities
{
/// <summary>Base class for TextMesh Pro shader GUIs.</summary>
internal abstract class TMP_BaseHDRPLitShaderGUI : LightingShaderGraphGUI
{
/// <summary>Representation of a #pragma shader_feature.</summary>
/// <description>It is assumed that the first feature option is for no keyword (underscores).</description>
protected class ShaderFeature
{
public string undoLabel;
public GUIContent label;
/// <summary>The keyword labels, for display. Include the no-keyword as the first option.</summary>
public GUIContent[] keywordLabels;
/// <summary>The shader keywords. Exclude the no-keyword option.</summary>
public string[] keywords;
int m_State;
public bool Active
{
get { return m_State >= 0; }
}
public int State
{
get { return m_State; }
}
public void ReadState(Material material)
{
for (int i = 0; i < keywords.Length; i++)
{
if (material.IsKeywordEnabled(keywords[i]))
{
m_State = i;
return;
}
}
m_State = -1;
}
public void SetActive(bool active, Material material)
{
m_State = active ? 0 : -1;
SetStateKeywords(material);
}
public void DoPopup(MaterialEditor editor, Material material)
{
EditorGUI.BeginChangeCheck();
int selection = EditorGUILayout.Popup(label, m_State + 1, keywordLabels);
if (EditorGUI.EndChangeCheck())
{
m_State = selection - 1;
editor.RegisterPropertyChangeUndo(undoLabel);
SetStateKeywords(material);
}
}
void SetStateKeywords(Material material)
{
for (int i = 0; i < keywords.Length; i++)
{
if (i == m_State)
{
material.EnableKeyword(keywords[i]);
}
else
{
material.DisableKeyword(keywords[i]);
}
}
}
}
static GUIContent s_TempLabel = new GUIContent();
protected static bool s_DebugExtended;
static int s_UndoRedoCount, s_LastSeenUndoRedoCount;
static float[][] s_TempFloats =
{
null, new float[1], new float[2], new float[3], new float[4]
};
protected static GUIContent[] s_XywhVectorLabels =
{
new GUIContent("X"),
new GUIContent("Y"),
new GUIContent("W", "Width"),
new GUIContent("H", "Height")
};
protected static GUIContent[] s_LbrtVectorLabels =
{
new GUIContent("L", "Left"),
new GUIContent("B", "Bottom"),
new GUIContent("R", "Right"),
new GUIContent("T", "Top")
};
protected static GUIContent[] s_CullingTypeLabels =
{
new GUIContent("Off"),
new GUIContent("Front"),
new GUIContent("Back")
};
static TMP_BaseHDRPLitShaderGUI()
{
// Keep track of how many undo/redo events happened.
Undo.undoRedoPerformed += () => s_UndoRedoCount += 1;
}
bool m_IsNewGUI = true;
float m_DragAndDropMinY;
protected MaterialEditor m_Editor;
protected Material m_Material;
protected MaterialProperty[] m_Properties;
void PrepareGUI()
{
m_IsNewGUI = false;
ShaderUtilities.GetShaderPropertyIDs();
// New GUI just got constructed. This happens in response to a selection,
// but also after undo/redo events.
if (s_LastSeenUndoRedoCount != s_UndoRedoCount)
{
// There's been at least one undo/redo since the last time this GUI got constructed.
// Maybe the undo/redo was for this material? Assume that is was.
TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material as Material);
}
s_LastSeenUndoRedoCount = s_UndoRedoCount;
}
protected override void OnMaterialGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
m_Editor = materialEditor;
m_Material = materialEditor.target as Material;
this.m_Properties = properties;
if (m_IsNewGUI)
{
PrepareGUI();
}
DoDragAndDropBegin();
EditorGUI.BeginChangeCheck();
DoGUI();
if (EditorGUI.EndChangeCheck())
{
TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material);
}
DoDragAndDropEnd();
}
/// <summary>Override this method to create the specific shader GUI.</summary>
protected abstract void DoGUI();
static string[] s_PanelStateLabel = new string[] { "\t- <i>Click to collapse</i> -", "\t- <i>Click to expand</i> -" };
protected bool BeginPanel(string panel, bool expanded)
{
EditorGUI.indentLevel = 0;
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
r.x += 20;
r.width += 6;
bool enabled = GUI.enabled;
GUI.enabled = true;
expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
r.width -= 30;
EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
GUI.enabled = enabled;
EditorGUI.indentLevel += 1;
EditorGUI.BeginDisabledGroup(false);
return expanded;
}
protected bool BeginPanel(string panel, ShaderFeature feature, bool expanded, bool readState = true)
{
EditorGUI.indentLevel = 0;
if (readState)
{
feature.ReadState(m_Material);
}
EditorGUI.BeginChangeCheck();
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
GUILayout.BeginHorizontal();
Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 20, GUILayout.Width(20f)));
bool active = EditorGUI.Toggle(r, feature.Active);
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo(feature.undoLabel);
feature.SetActive(active, m_Material);
}
r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
r.width += 6;
bool enabled = GUI.enabled;
GUI.enabled = true;
expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
r.width -= 10;
EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
GUI.enabled = enabled;
GUILayout.EndHorizontal();
EditorGUI.indentLevel += 1;
EditorGUI.BeginDisabledGroup(!active);
return expanded;
}
protected void EndPanel()
{
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel -= 1;
EditorGUILayout.EndVertical();
}
MaterialProperty BeginProperty(string name)
{
MaterialProperty property = FindProperty(name, m_Properties);
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = property.hasMixedValue;
m_Editor.BeginAnimatedCheck(Rect.zero, property);
return property;
}
bool EndProperty()
{
m_Editor.EndAnimatedCheck();
EditorGUI.showMixedValue = false;
return EditorGUI.EndChangeCheck();
}
protected void DoPopup(string name, string label, GUIContent[] options)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
int index = EditorGUILayout.Popup(s_TempLabel, (int)property.floatValue, options);
if (EndProperty())
{
property.floatValue = index;
}
}
protected void DoCubeMap(string name, string label)
{
DoTexture(name, label, typeof(Cubemap));
}
protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null)
{
DoTexture(name, label, typeof(Texture2D), withTilingOffset, speedNames);
}
void DoTexture(string name, string label, System.Type type, bool withTilingOffset = false, string[] speedNames = null)
{
float objFieldSize = 60f;
bool smallLayout = EditorGUIUtility.currentViewWidth <= 440f && (withTilingOffset || speedNames != null);
float controlHeight = smallLayout ? objFieldSize * 2 : objFieldSize;
MaterialProperty property = FindProperty(name, m_Properties);
m_Editor.BeginAnimatedCheck(Rect.zero, property);
Rect rect = EditorGUILayout.GetControlRect(true, controlHeight);
float totalWidth = rect.width;
rect.width = EditorGUIUtility.labelWidth + objFieldSize;
rect.height = objFieldSize;
s_TempLabel.text = label;
EditorGUI.BeginChangeCheck();
Object tex = EditorGUI.ObjectField(rect, s_TempLabel, property.textureValue, type, false);
if (EditorGUI.EndChangeCheck())
{
property.textureValue = tex as Texture;
}
float additionalHeight = controlHeight - objFieldSize;
float xOffset = smallLayout ? rect.width - objFieldSize : rect.width;
rect.y += additionalHeight;
rect.x += xOffset;
rect.width = totalWidth - xOffset;
rect.height = EditorGUIUtility.singleLineHeight;
if (withTilingOffset)
{
DoTilingOffset(rect, property);
rect.y += (rect.height + 2f) * 2f;
}
m_Editor.EndAnimatedCheck();
if (speedNames != null)
{
DoUVSpeed(rect, speedNames);
}
}
void DoTilingOffset(Rect rect, MaterialProperty property)
{
float labelWidth = EditorGUIUtility.labelWidth;
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.40f);
Vector4 vector = property.textureScaleAndOffset;
bool changed = false;
float[] values = s_TempFloats[2];
s_TempLabel.text = "Tiling";
Rect vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
values[0] = vector.x;
values[1] = vector.y;
EditorGUI.BeginChangeCheck();
EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
if (EditorGUI.EndChangeCheck())
{
vector.x = values[0];
vector.y = values[1];
changed = true;
}
rect.y += rect.height + 2f;
s_TempLabel.text = "Offset";
vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
values[0] = vector.z;
values[1] = vector.w;
EditorGUI.BeginChangeCheck();
EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
if (EditorGUI.EndChangeCheck())
{
vector.z = values[0];
vector.w = values[1];
changed = true;
}
if (changed)
{
property.textureScaleAndOffset = vector;
}
EditorGUIUtility.labelWidth = labelWidth;
EditorGUI.indentLevel = indentLevel;
}
void DoUVSpeed(Rect rect, string[] names)
{
float labelWidth = EditorGUIUtility.labelWidth;
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.40f);
s_TempLabel.text = "Speed";
rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
EditorGUIUtility.labelWidth = 10f;
rect.width = rect.width * 0.5f - 2f;
if (names.Length == 1)
{
DoFloat2(rect, names[0]);
}
else
{
DoFloat(rect, names[0], "X");
rect.x += rect.width + 4f;
DoFloat(rect, names[1], "Y");
}
EditorGUIUtility.labelWidth = labelWidth;
EditorGUI.indentLevel = indentLevel;
}
protected void DoToggle(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
bool value = EditorGUILayout.Toggle(s_TempLabel, property.floatValue == 1f);
if (EndProperty())
{
property.floatValue = value ? 1f : 0f;
}
}
protected void DoFloat(string name, string label)
{
MaterialProperty property = BeginProperty(name);
Rect rect = EditorGUILayout.GetControlRect();
rect.width = EditorGUIUtility.labelWidth + 55f;
s_TempLabel.text = label;
float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoColor(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, false, true, true);
if (EndProperty())
{
property.colorValue = value;
}
}
void DoFloat(Rect rect, string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
if (EndProperty())
{
property.floatValue = value;
}
}
void DoFloat2(Rect rect, string name)
{
MaterialProperty property = BeginProperty(name);
float x = EditorGUI.FloatField(rect, "X", property.vectorValue.x);
rect.x += rect.width + 4f;
float y = EditorGUI.FloatField(rect, "Y", property.vectorValue.y);
if (EndProperty())
{
property.vectorValue = new Vector2(x, y);
}
}
protected void DoOffset(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector2 value = EditorGUI.Vector2Field(EditorGUILayout.GetControlRect(), s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoSlider(string name, string label)
{
MaterialProperty property = BeginProperty(name);
Vector2 range = property.rangeLimits;
s_TempLabel.text = label;
float value = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoSlider(string name, Vector2 range, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
float value = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoSlider(string propertyName, string propertyField, string label)
{
MaterialProperty property = BeginProperty(propertyName);
Vector2 range = property.rangeLimits;
s_TempLabel.text = label;
Vector4 value = property.vectorValue;
switch (propertyField)
{
case "X":
value.x = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.x, range.x, range.y);
break;
case "Y":
value.y = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.y, range.x, range.y);
break;
case "Z":
value.z = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.z, range.x, range.y);
break;
case "W":
value.w = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.w, range.x, range.y);
break;
}
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoSlider(string propertyName, string propertyField, Vector2 range, string label)
{
MaterialProperty property = BeginProperty(propertyName);
s_TempLabel.text = label;
Vector4 value = property.vectorValue;
switch (propertyField)
{
case "X":
value.x = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.x, range.x, range.y);
break;
case "Y":
value.y = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.y, range.x, range.y);
break;
case "Z":
value.z = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.z, range.x, range.y);
break;
case "W":
value.w = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.w, range.x, range.y);
break;
}
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector2(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector3(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector(string name, string label, GUIContent[] subLabels)
{
MaterialProperty property = BeginProperty(name);
Rect rect = EditorGUILayout.GetControlRect();
s_TempLabel.text = label;
rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
Vector4 vector = property.vectorValue;
float[] values = s_TempFloats[subLabels.Length];
for (int i = 0; i < subLabels.Length; i++)
{
values[i] = vector[i];
}
EditorGUI.MultiFloatField(rect, subLabels, values);
if (EndProperty())
{
for (int i = 0; i < subLabels.Length; i++)
{
vector[i] = values[i];
}
property.vectorValue = vector;
}
}
void DoDragAndDropBegin()
{
m_DragAndDropMinY = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)).y;
}
void DoDragAndDropEnd()
{
Rect rect = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true));
Event evt = Event.current;
if (evt.type == EventType.DragUpdated)
{
DragAndDrop.visualMode = DragAndDropVisualMode.Generic;
evt.Use();
}
else if (
evt.type == EventType.DragPerform &&
Rect.MinMaxRect(rect.xMin, m_DragAndDropMinY, rect.xMax, rect.yMax).Contains(evt.mousePosition)
)
{
DragAndDrop.AcceptDrag();
evt.Use();
Material droppedMaterial = DragAndDrop.objectReferences[0] as Material;
if (droppedMaterial && droppedMaterial != m_Material)
{
PerformDrop(droppedMaterial);
}
}
}
void PerformDrop(Material droppedMaterial)
{
Texture droppedTex = droppedMaterial.GetTexture(ShaderUtilities.ID_MainTex);
if (!droppedTex)
{
return;
}
Texture currentTex = m_Material.GetTexture(ShaderUtilities.ID_MainTex);
TMP_FontAsset requiredFontAsset = null;
if (droppedTex != currentTex)
{
requiredFontAsset = TMP_EditorUtility.FindMatchingFontAsset(droppedMaterial);
if (!requiredFontAsset)
{
return;
}
}
foreach (GameObject o in Selection.gameObjects)
{
if (requiredFontAsset)
{
TMP_Text textComponent = o.GetComponent<TMP_Text>();
if (textComponent)
{
Undo.RecordObject(textComponent, "Font Asset Change");
textComponent.font = requiredFontAsset;
}
}
TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(o, m_Material, droppedMaterial);
EditorUtility.SetDirty(o);
}
}
}
}
#endif

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: e3795795b029fde4395e6953ce72b5a6
timeCreated: 1469844810
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,681 +0,0 @@
#if HDRP_10_7_OR_NEWER
using UnityEngine;
using UnityEditor;
using UnityEditor.Rendering.HighDefinition;
namespace TMPro.EditorUtilities
{
/// <summary>Base class for TextMesh Pro shader GUIs.</summary>
#if HDRP_11_OR_NEWER
internal abstract class TMP_BaseHDRPUnlitShaderGUI : UnlitShaderGraphGUI
#else
internal abstract class TMP_BaseHDRPUnlitShaderGUI : HDUnlitGUI
#endif
{
/// <summary>Representation of a #pragma shader_feature.</summary>
/// <description>It is assumed that the first feature option is for no keyword (underscores).</description>
protected class ShaderFeature
{
public string undoLabel;
public GUIContent label;
/// <summary>The keyword labels, for display. Include the no-keyword as the first option.</summary>
public GUIContent[] keywordLabels;
/// <summary>The shader keywords. Exclude the no-keyword option.</summary>
public string[] keywords;
int m_State;
public bool Active
{
get { return m_State >= 0; }
}
public int State
{
get { return m_State; }
}
public void ReadState(Material material)
{
for (int i = 0; i < keywords.Length; i++)
{
if (material.IsKeywordEnabled(keywords[i]))
{
m_State = i;
return;
}
}
m_State = -1;
}
public void SetActive(bool active, Material material)
{
m_State = active ? 0 : -1;
SetStateKeywords(material);
}
public void DoPopup(MaterialEditor editor, Material material)
{
EditorGUI.BeginChangeCheck();
int selection = EditorGUILayout.Popup(label, m_State + 1, keywordLabels);
if (EditorGUI.EndChangeCheck())
{
m_State = selection - 1;
editor.RegisterPropertyChangeUndo(undoLabel);
SetStateKeywords(material);
}
}
void SetStateKeywords(Material material)
{
for (int i = 0; i < keywords.Length; i++)
{
if (i == m_State)
{
material.EnableKeyword(keywords[i]);
}
else
{
material.DisableKeyword(keywords[i]);
}
}
}
}
static GUIContent s_TempLabel = new GUIContent();
protected static bool s_DebugExtended;
static int s_UndoRedoCount, s_LastSeenUndoRedoCount;
static float[][] s_TempFloats =
{
null, new float[1], new float[2], new float[3], new float[4]
};
protected static GUIContent[] s_XywhVectorLabels =
{
new GUIContent("X"),
new GUIContent("Y"),
new GUIContent("W", "Width"),
new GUIContent("H", "Height")
};
protected static GUIContent[] s_LbrtVectorLabels =
{
new GUIContent("L", "Left"),
new GUIContent("B", "Bottom"),
new GUIContent("R", "Right"),
new GUIContent("T", "Top")
};
protected static GUIContent[] s_CullingTypeLabels =
{
new GUIContent("Off"),
new GUIContent("Front"),
new GUIContent("Back")
};
static TMP_BaseHDRPUnlitShaderGUI()
{
// Keep track of how many undo/redo events happened.
Undo.undoRedoPerformed += () => s_UndoRedoCount += 1;
}
bool m_IsNewGUI = true;
float m_DragAndDropMinY;
protected MaterialEditor m_Editor;
protected Material m_Material;
protected MaterialProperty[] m_Properties;
void PrepareGUI()
{
m_IsNewGUI = false;
ShaderUtilities.GetShaderPropertyIDs();
// New GUI just got constructed. This happens in response to a selection,
// but also after undo/redo events.
if (s_LastSeenUndoRedoCount != s_UndoRedoCount)
{
// There's been at least one undo/redo since the last time this GUI got constructed.
// Maybe the undo/redo was for this material? Assume that is was.
TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material as Material);
}
s_LastSeenUndoRedoCount = s_UndoRedoCount;
}
protected override void OnMaterialGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
m_Editor = materialEditor;
m_Material = materialEditor.target as Material;
this.m_Properties = properties;
if (m_IsNewGUI)
{
PrepareGUI();
}
DoDragAndDropBegin();
EditorGUI.BeginChangeCheck();
DoGUI();
if (EditorGUI.EndChangeCheck())
{
TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material);
}
DoDragAndDropEnd();
}
/// <summary>Override this method to create the specific shader GUI.</summary>
protected abstract void DoGUI();
static string[] s_PanelStateLabel = new string[] { "\t- <i>Click to collapse</i> -", "\t- <i>Click to expand</i> -" };
protected bool BeginPanel(string panel, bool expanded)
{
EditorGUI.indentLevel = 0;
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
r.x += 20;
r.width += 6;
bool enabled = GUI.enabled;
GUI.enabled = true;
expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
r.width -= 30;
EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
GUI.enabled = enabled;
EditorGUI.indentLevel += 1;
EditorGUI.BeginDisabledGroup(false);
return expanded;
}
protected bool BeginPanel(string panel, ShaderFeature feature, bool expanded, bool readState = true)
{
EditorGUI.indentLevel = 0;
if (readState)
{
feature.ReadState(m_Material);
}
EditorGUI.BeginChangeCheck();
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
GUILayout.BeginHorizontal();
Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 20, GUILayout.Width(20f)));
bool active = EditorGUI.Toggle(r, feature.Active);
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo(feature.undoLabel);
feature.SetActive(active, m_Material);
}
r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
r.width += 6;
bool enabled = GUI.enabled;
GUI.enabled = true;
expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
r.width -= 10;
EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
GUI.enabled = enabled;
GUILayout.EndHorizontal();
EditorGUI.indentLevel += 1;
EditorGUI.BeginDisabledGroup(!active);
return expanded;
}
protected void EndPanel()
{
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel -= 1;
EditorGUILayout.EndVertical();
}
MaterialProperty BeginProperty(string name)
{
MaterialProperty property = FindProperty(name, m_Properties);
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = property.hasMixedValue;
m_Editor.BeginAnimatedCheck(Rect.zero, property);
return property;
}
bool EndProperty()
{
m_Editor.EndAnimatedCheck();
EditorGUI.showMixedValue = false;
return EditorGUI.EndChangeCheck();
}
protected void DoPopup(string name, string label, GUIContent[] options)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
int index = EditorGUILayout.Popup(s_TempLabel, (int)property.floatValue, options);
if (EndProperty())
{
property.floatValue = index;
}
}
protected void DoCubeMap(string name, string label)
{
DoTexture(name, label, typeof(Cubemap));
}
protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null)
{
DoTexture(name, label, typeof(Texture2D), withTilingOffset, speedNames);
}
void DoTexture(string name, string label, System.Type type, bool withTilingOffset = false, string[] speedNames = null)
{
float objFieldSize = 60f;
bool smallLayout = EditorGUIUtility.currentViewWidth <= 440f && (withTilingOffset || speedNames != null);
float controlHeight = smallLayout ? objFieldSize * 2 : objFieldSize;
MaterialProperty property = FindProperty(name, m_Properties);
m_Editor.BeginAnimatedCheck(Rect.zero, property);
Rect rect = EditorGUILayout.GetControlRect(true, controlHeight);
float totalWidth = rect.width;
rect.width = EditorGUIUtility.labelWidth + objFieldSize;
rect.height = objFieldSize;
s_TempLabel.text = label;
EditorGUI.BeginChangeCheck();
Object tex = EditorGUI.ObjectField(rect, s_TempLabel, property.textureValue, type, false);
if (EditorGUI.EndChangeCheck())
{
property.textureValue = tex as Texture;
}
float additionalHeight = controlHeight - objFieldSize;
float xOffset = smallLayout ? rect.width - objFieldSize : rect.width;
rect.y += additionalHeight;
rect.x += xOffset;
rect.width = totalWidth - xOffset;
rect.height = EditorGUIUtility.singleLineHeight;
if (withTilingOffset)
{
DoTilingOffset(rect, property);
rect.y += (rect.height + 2f) * 2f;
}
m_Editor.EndAnimatedCheck();
if (speedNames != null)
{
DoUVSpeed(rect, speedNames);
}
}
void DoTilingOffset(Rect rect, MaterialProperty property)
{
float labelWidth = EditorGUIUtility.labelWidth;
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.40f);
Vector4 vector = property.textureScaleAndOffset;
bool changed = false;
float[] values = s_TempFloats[2];
s_TempLabel.text = "Tiling";
Rect vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
values[0] = vector.x;
values[1] = vector.y;
EditorGUI.BeginChangeCheck();
EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
if (EditorGUI.EndChangeCheck())
{
vector.x = values[0];
vector.y = values[1];
changed = true;
}
rect.y += rect.height + 2f;
s_TempLabel.text = "Offset";
vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
values[0] = vector.z;
values[1] = vector.w;
EditorGUI.BeginChangeCheck();
EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
if (EditorGUI.EndChangeCheck())
{
vector.z = values[0];
vector.w = values[1];
changed = true;
}
if (changed)
{
property.textureScaleAndOffset = vector;
}
EditorGUIUtility.labelWidth = labelWidth;
EditorGUI.indentLevel = indentLevel;
}
void DoUVSpeed(Rect rect, string[] names)
{
float labelWidth = EditorGUIUtility.labelWidth;
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.40f);
s_TempLabel.text = "Speed";
rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
EditorGUIUtility.labelWidth = 10f;
rect.width = rect.width * 0.5f - 2f;
if (names.Length == 1)
{
DoFloat2(rect, names[0]);
}
else
{
DoFloat(rect, names[0], "X");
rect.x += rect.width + 4f;
DoFloat(rect, names[1], "Y");
}
EditorGUIUtility.labelWidth = labelWidth;
EditorGUI.indentLevel = indentLevel;
}
protected void DoToggle(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
bool value = EditorGUILayout.Toggle(s_TempLabel, property.floatValue == 1f);
if (EndProperty())
{
property.floatValue = value ? 1f : 0f;
}
}
protected void DoFloat(string name, string label)
{
MaterialProperty property = BeginProperty(name);
Rect rect = EditorGUILayout.GetControlRect();
rect.width = EditorGUIUtility.labelWidth + 55f;
s_TempLabel.text = label;
float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoColor(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, false, true, true);
if (EndProperty())
{
property.colorValue = value;
}
}
void DoFloat(Rect rect, string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
if (EndProperty())
{
property.floatValue = value;
}
}
void DoFloat2(Rect rect, string name)
{
MaterialProperty property = BeginProperty(name);
float x = EditorGUI.FloatField(rect, "X", property.vectorValue.x);
rect.x += rect.width + 4f;
float y = EditorGUI.FloatField(rect, "Y", property.vectorValue.y);
if (EndProperty())
{
property.vectorValue = new Vector2(x, y);
}
}
protected void DoOffset(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector2 value = EditorGUI.Vector2Field(EditorGUILayout.GetControlRect(), s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoSlider(string name, string label)
{
MaterialProperty property = BeginProperty(name);
Vector2 range = property.rangeLimits;
s_TempLabel.text = label;
float value = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoSlider(string name, Vector2 range, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
float value = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoSlider(string propertyName, string propertyField, string label)
{
MaterialProperty property = BeginProperty(propertyName);
Vector2 range = property.rangeLimits;
s_TempLabel.text = label;
Vector4 value = property.vectorValue;
switch (propertyField)
{
case "X":
value.x = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.x, range.x, range.y);
break;
case "Y":
value.y = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.y, range.x, range.y);
break;
case "Z":
value.z = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.z, range.x, range.y);
break;
case "W":
value.w = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.w, range.x, range.y);
break;
}
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoSlider(string propertyName, string propertyField, Vector2 range, string label)
{
MaterialProperty property = BeginProperty(propertyName);
s_TempLabel.text = label;
Vector4 value = property.vectorValue;
switch (propertyField)
{
case "X":
value.x = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.x, range.x, range.y);
break;
case "Y":
value.y = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.y, range.x, range.y);
break;
case "Z":
value.z = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.z, range.x, range.y);
break;
case "W":
value.w = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.w, range.x, range.y);
break;
}
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector2(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector3(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector(string name, string label, GUIContent[] subLabels)
{
MaterialProperty property = BeginProperty(name);
Rect rect = EditorGUILayout.GetControlRect();
s_TempLabel.text = label;
rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
Vector4 vector = property.vectorValue;
float[] values = s_TempFloats[subLabels.Length];
for (int i = 0; i < subLabels.Length; i++)
{
values[i] = vector[i];
}
EditorGUI.MultiFloatField(rect, subLabels, values);
if (EndProperty())
{
for (int i = 0; i < subLabels.Length; i++)
{
vector[i] = values[i];
}
property.vectorValue = vector;
}
}
void DoDragAndDropBegin()
{
m_DragAndDropMinY = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)).y;
}
void DoDragAndDropEnd()
{
Rect rect = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true));
Event evt = Event.current;
if (evt.type == EventType.DragUpdated)
{
DragAndDrop.visualMode = DragAndDropVisualMode.Generic;
evt.Use();
}
else if (
evt.type == EventType.DragPerform &&
Rect.MinMaxRect(rect.xMin, m_DragAndDropMinY, rect.xMax, rect.yMax).Contains(evt.mousePosition)
)
{
DragAndDrop.AcceptDrag();
evt.Use();
Material droppedMaterial = DragAndDrop.objectReferences[0] as Material;
if (droppedMaterial && droppedMaterial != m_Material)
{
PerformDrop(droppedMaterial);
}
}
}
void PerformDrop(Material droppedMaterial)
{
Texture droppedTex = droppedMaterial.GetTexture(ShaderUtilities.ID_MainTex);
if (!droppedTex)
{
return;
}
Texture currentTex = m_Material.GetTexture(ShaderUtilities.ID_MainTex);
TMP_FontAsset requiredFontAsset = null;
if (droppedTex != currentTex)
{
requiredFontAsset = TMP_EditorUtility.FindMatchingFontAsset(droppedMaterial);
if (!requiredFontAsset)
{
return;
}
}
foreach (GameObject o in Selection.gameObjects)
{
if (requiredFontAsset)
{
TMP_Text textComponent = o.GetComponent<TMP_Text>();
if (textComponent)
{
Undo.RecordObject(textComponent, "Font Asset Change");
textComponent.font = requiredFontAsset;
}
}
TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(o, m_Material, droppedMaterial);
EditorUtility.SetDirty(o);
}
}
}
}
#endif

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 645409e9544820042937871953f20509
timeCreated: 1469844810
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,631 +0,0 @@
#if HDRP_10_7_OR_NEWER
using UnityEngine;
using UnityEditor;
using UnityEditor.Rendering.HighDefinition;
namespace TMPro.EditorUtilities
{
internal class TMP_SDF_HDRPLitShaderGUI : TMP_BaseHDRPLitShaderGUI
{
static ShaderFeature s_OutlineFeature, s_UnderlayFeature, s_BevelFeature, s_GlowFeature, s_MaskFeature;
static bool s_Face = true, s_Outline = true, s_Outline2 = true, s_Outline3 = true, s_Underlay = true, s_Lighting = true, s_Glow, s_Bevel, s_Light, s_Bump, s_Env;
static string[]
s_FaceUVSpeedName = { "_FaceUVSpeed" },
s_FaceUvSpeedNames = { "_FaceUVSpeedX", "_FaceUVSpeedY" },
s_OutlineUvSpeedNames = { "_OutlineUVSpeedX", "_OutlineUVSpeedY" },
s_OutlineUvSpeedName = { "_OutlineUVSpeed" };
/// <summary>
///
/// </summary>
static TMP_SDF_HDRPLitShaderGUI()
{
s_OutlineFeature = new ShaderFeature()
{
undoLabel = "Outline",
keywords = new[] { "OUTLINE_ON" }
};
s_UnderlayFeature = new ShaderFeature()
{
undoLabel = "Underlay",
keywords = new[] { "UNDERLAY_ON", "UNDERLAY_INNER" },
label = new GUIContent("Underlay Type"),
keywordLabels = new[]
{
new GUIContent("None"), new GUIContent("Normal"), new GUIContent("Inner")
}
};
s_BevelFeature = new ShaderFeature()
{
undoLabel = "Bevel",
keywords = new[] { "BEVEL_ON" }
};
s_GlowFeature = new ShaderFeature()
{
undoLabel = "Glow",
keywords = new[] { "GLOW_ON" }
};
s_MaskFeature = new ShaderFeature()
{
undoLabel = "Mask",
keywords = new[] { "MASK_HARD", "MASK_SOFT" },
label = new GUIContent("Mask"),
keywordLabels = new[]
{
new GUIContent("Mask Off"), new GUIContent("Mask Hard"), new GUIContent("Mask Soft")
}
};
}
/// <summary>
///
/// </summary>
public TMP_SDF_HDRPLitShaderGUI()
{
// Remove the ShaderGraphUIBlock to avoid having duplicated properties in the UI.
uiBlocks.RemoveAll(b => b is ShaderGraphUIBlock);
}
protected override void DoGUI()
{
s_Face = BeginPanel("Face", s_Face);
if (s_Face)
{
DoFacePanel();
}
EndPanel();
// Outline panels
DoOutlinePanels();
// Underlay panel
s_Underlay = BeginPanel("Underlay", s_Underlay);
if (s_Underlay)
{
DoUnderlayPanel();
}
EndPanel();
// Lighting panel
DrawLightingPanel();
/*
if (m_Material.HasProperty(ShaderUtilities.ID_GlowColor))
{
s_Glow = BeginPanel("Glow", s_GlowFeature, s_Glow);
if (s_Glow)
{
DoGlowPanel();
}
EndPanel();
}
*/
s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended);
if (s_DebugExtended)
{
DoDebugPanelSRP();
}
EndPanel();
EditorGUILayout.Space();
EditorGUILayout.Space();
// Draw HDRP panels
uiBlocks.OnGUI(m_Editor, m_Properties);
#if HDRP_12_OR_NEWER
ValidateMaterial(m_Material);
#else
SetupMaterialKeywordsAndPass(m_Material);
#endif
}
void DoFacePanel()
{
EditorGUI.indentLevel += 1;
DoColor("_FaceColor", "Color");
if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex))
{
if (m_Material.HasProperty("_FaceUVSpeedX"))
{
DoTexture2D("_FaceTex", "Texture", true, s_FaceUvSpeedNames);
}
else if (m_Material.HasProperty("_FaceUVSpeed"))
{
DoTexture2D("_FaceTex", "Texture", true, s_FaceUVSpeedName);
}
else
{
DoTexture2D("_FaceTex", "Texture", true);
}
}
if (m_Material.HasProperty("_Softness"))
{
DoSlider("_Softness", "X", new Vector2(0, 1), "Softness");
}
if (m_Material.HasProperty("_OutlineSoftness"))
{
DoSlider("_OutlineSoftness", "Softness");
}
if (m_Material.HasProperty(ShaderUtilities.ID_FaceDilate))
{
DoSlider("_FaceDilate", "Dilate");
if (m_Material.HasProperty(ShaderUtilities.ID_Shininess))
{
DoSlider("_FaceShininess", "Gloss");
}
}
if (m_Material.HasProperty(ShaderUtilities.ID_IsoPerimeter))
{
DoSlider("_IsoPerimeter", "X", new Vector2(-1, 1), "Dilate");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoOutlinePanels()
{
s_Outline = BeginPanel("Outline 1", s_Outline);
if (s_Outline)
DoOutlinePanelWithTexture(1, "Y", "Color");
EndPanel();
s_Outline2 = BeginPanel("Outline 2", s_Outline2);
if (s_Outline2)
DoOutlinePanel(2, "Z", "Color");
EndPanel();
s_Outline3 = BeginPanel("Outline 3", s_Outline3);
if (s_Outline3)
DoOutlinePanel(3, "W", "Color");
EndPanel();
}
void DoOutlinePanel(int outlineID, string propertyField, string label)
{
EditorGUI.indentLevel += 1;
DoColor("_OutlineColor" + outlineID, label);
if (outlineID != 3)
DoOffset("_OutlineOffset" + outlineID, "Offset");
else
{
if (m_Material.GetFloat(ShaderUtilities.ID_OutlineMode) == 0)
DoOffset("_OutlineOffset" + outlineID, "Offset");
}
DoSlider("_Softness", propertyField, new Vector2(0, 1), "Softness");
DoSlider("_IsoPerimeter", propertyField, new Vector2(-1, 1), "Dilate");
if (outlineID == 3)
{
DoToggle("_OutlineMode", "Outline Mode");
}
if (m_Material.HasProperty("_OutlineShininess"))
{
//DoSlider("_OutlineShininess", "Gloss");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoOutlinePanelWithTexture(int outlineID, string propertyField, string label)
{
EditorGUI.indentLevel += 1;
DoColor("_OutlineColor" + outlineID, label);
if (m_Material.HasProperty(ShaderUtilities.ID_OutlineTex))
{
if (m_Material.HasProperty("_OutlineUVSpeedX"))
{
DoTexture2D("_OutlineTex", "Texture", true, s_OutlineUvSpeedNames);
}
else if (m_Material.HasProperty("_OutlineUVSpeed"))
{
DoTexture2D("_OutlineTex", "Texture", true, s_OutlineUvSpeedName);
}
else
{
DoTexture2D("_OutlineTex", "Texture", true);
}
}
DoOffset("_OutlineOffset" + outlineID, "Offset");
DoSlider("_Softness", propertyField, new Vector2(0, 1), "Softness");
DoSlider("_IsoPerimeter", propertyField, new Vector2(-1, 1), "Dilate");
if (m_Material.HasProperty("_OutlineShininess"))
{
//DoSlider("_OutlineShininess", "Gloss");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoUnderlayPanel()
{
EditorGUI.indentLevel += 1;
if (m_Material.HasProperty(ShaderUtilities.ID_IsoPerimeter))
{
DoColor("_UnderlayColor", "Color");
DoSlider("_UnderlayOffset", "X", new Vector2(-1, 1), "Offset X");
DoSlider("_UnderlayOffset", "Y", new Vector2(-1, 1), "Offset Y");
DoSlider("_UnderlayDilate", new Vector2(-1, 1), "Dilate");
DoSlider("_UnderlaySoftness", new Vector2(0, 1), "Softness");
}
else
{
s_UnderlayFeature.DoPopup(m_Editor, m_Material);
DoColor("_UnderlayColor", "Color");
DoSlider("_UnderlayOffsetX", "Offset X");
DoSlider("_UnderlayOffsetY", "Offset Y");
DoSlider("_UnderlayDilate", "Dilate");
DoSlider("_UnderlaySoftness", "Softness");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
static GUIContent[] s_BevelTypeLabels =
{
new GUIContent("Outer Bevel"),
new GUIContent("Inner Bevel")
};
void DrawLightingPanel()
{
s_Lighting = BeginPanel("Lighting", s_Lighting);
if (s_Lighting)
{
s_Bevel = BeginPanel("Bevel", s_Bevel);
if (s_Bevel)
{
DoBevelPanel();
}
EndPanel();
s_Light = BeginPanel("Local Lighting", s_Light);
if (s_Light)
{
DoLocalLightingPanel();
}
EndPanel();
/*
s_Bump = BeginPanel("Bump Map", s_Bump);
if (s_Bump)
{
DoBumpMapPanel();
}
EndPanel();
s_Env = BeginPanel("Environment Map", s_Env);
if (s_Env)
{
DoEnvMapPanel();
}
EndPanel();
*/
}
EndPanel();
}
void DoBevelPanel()
{
EditorGUI.indentLevel += 1;
DoPopup("_BevelType", "Type", s_BevelTypeLabels);
DoSlider("_BevelAmount", "Amount");
DoSlider("_BevelOffset", "Offset");
DoSlider("_BevelWidth", "Width");
DoSlider("_BevelRoundness", "Roundness");
DoSlider("_BevelClamp", "Clamp");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoLocalLightingPanel()
{
EditorGUI.indentLevel += 1;
DoSlider("_LightAngle", "Light Angle");
DoColor("_SpecularColor", "Specular Color");
DoSlider("_SpecularPower", "Specular Power");
DoSlider("_Reflectivity", "Reflectivity Power");
DoSlider("_Diffuse", "Diffuse Shadow");
DoSlider("_Ambient", "Ambient Shadow");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoSurfaceLightingPanel()
{
EditorGUI.indentLevel += 1;
DoColor("_SpecColor", "Specular Color");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoBumpMapPanel()
{
EditorGUI.indentLevel += 1;
DoTexture2D("_BumpMap", "Texture");
DoSlider("_BumpFace", "Face");
DoSlider("_BumpOutline", "Outline");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoEnvMapPanel()
{
EditorGUI.indentLevel += 1;
DoColor("_ReflectFaceColor", "Face Color");
DoColor("_ReflectOutlineColor", "Outline Color");
DoCubeMap("_Cube", "Texture");
DoVector3("_EnvMatrixRotation", "Rotation");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoGlowPanel()
{
EditorGUI.indentLevel += 1;
DoColor("_GlowColor", "Color");
DoSlider("_GlowOffset", "Offset");
DoSlider("_GlowInner", "Inner");
DoSlider("_GlowOuter", "Outer");
DoSlider("_GlowPower", "Power");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoDebugPanel()
{
EditorGUI.indentLevel += 1;
DoTexture2D("_MainTex", "Font Atlas");
DoFloat("_GradientScale", "Gradient Scale");
DoFloat("_TextureWidth", "Texture Width");
DoFloat("_TextureHeight", "Texture Height");
EditorGUILayout.Space();
DoFloat("_ScaleX", "Scale X");
DoFloat("_ScaleY", "Scale Y");
if (m_Material.HasProperty(ShaderUtilities.ID_Sharpness))
DoSlider("_Sharpness", "Sharpness");
DoSlider("_PerspectiveFilter", "Perspective Filter");
EditorGUILayout.Space();
DoFloat("_VertexOffsetX", "Offset X");
DoFloat("_VertexOffsetY", "Offset Y");
if (m_Material.HasProperty(ShaderUtilities.ID_MaskCoord))
{
EditorGUILayout.Space();
s_MaskFeature.ReadState(m_Material);
s_MaskFeature.DoPopup(m_Editor, m_Material);
if (s_MaskFeature.Active)
{
DoMaskSubgroup();
}
EditorGUILayout.Space();
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
else if (m_Material.HasProperty("_MaskTex"))
{
DoMaskTexSubgroup();
}
else if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
{
EditorGUILayout.Space();
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
if (m_Material.HasProperty(ShaderUtilities.ID_StencilID))
{
EditorGUILayout.Space();
DoFloat("_Stencil", "Stencil ID");
DoFloat("_StencilComp", "Stencil Comp");
}
EditorGUILayout.Space();
EditorGUI.BeginChangeCheck();
bool useRatios = EditorGUILayout.Toggle("Use Ratios", !m_Material.IsKeywordEnabled("RATIOS_OFF"));
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo("Use Ratios");
if (useRatios)
{
m_Material.DisableKeyword("RATIOS_OFF");
}
else
{
m_Material.EnableKeyword("RATIOS_OFF");
}
}
if (m_Material.HasProperty(ShaderUtilities.ShaderTag_CullMode))
{
EditorGUILayout.Space();
DoPopup("_CullMode", "Cull Mode", s_CullingTypeLabels);
}
EditorGUILayout.Space();
EditorGUI.BeginDisabledGroup(true);
DoFloat("_ScaleRatioA", "Scale Ratio A");
DoFloat("_ScaleRatioB", "Scale Ratio B");
DoFloat("_ScaleRatioC", "Scale Ratio C");
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoDebugPanelSRP()
{
EditorGUI.indentLevel += 1;
DoTexture2D("_MainTex", "Font Atlas");
DoFloat("_GradientScale", "Gradient Scale");
//DoFloat("_TextureWidth", "Texture Width");
//DoFloat("_TextureHeight", "Texture Height");
EditorGUILayout.Space();
/*
DoFloat("_ScaleX", "Scale X");
DoFloat("_ScaleY", "Scale Y");
if (m_Material.HasProperty(ShaderUtilities.ID_Sharpness))
DoSlider("_Sharpness", "Sharpness");
DoSlider("_PerspectiveFilter", "Perspective Filter");
EditorGUILayout.Space();
DoFloat("_VertexOffsetX", "Offset X");
DoFloat("_VertexOffsetY", "Offset Y");
if (m_Material.HasProperty(ShaderUtilities.ID_MaskCoord))
{
EditorGUILayout.Space();
s_MaskFeature.ReadState(m_Material);
s_MaskFeature.DoPopup(m_Editor, m_Material);
if (s_MaskFeature.Active)
{
DoMaskSubgroup();
}
EditorGUILayout.Space();
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
else if (m_Material.HasProperty("_MaskTex"))
{
DoMaskTexSubgroup();
}
else if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
{
EditorGUILayout.Space();
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
if (m_Material.HasProperty(ShaderUtilities.ID_StencilID))
{
EditorGUILayout.Space();
DoFloat("_Stencil", "Stencil ID");
DoFloat("_StencilComp", "Stencil Comp");
}
EditorGUILayout.Space();
EditorGUI.BeginChangeCheck();
bool useRatios = EditorGUILayout.Toggle("Use Ratios", !m_Material.IsKeywordEnabled("RATIOS_OFF"));
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo("Use Ratios");
if (useRatios)
{
m_Material.DisableKeyword("RATIOS_OFF");
}
else
{
m_Material.EnableKeyword("RATIOS_OFF");
}
}
*/
if (m_Material.HasProperty(ShaderUtilities.ShaderTag_CullMode))
{
EditorGUILayout.Space();
DoPopup("_CullMode", "Cull Mode", s_CullingTypeLabels);
}
EditorGUILayout.Space();
/*
EditorGUI.BeginDisabledGroup(true);
DoFloat("_ScaleRatioA", "Scale Ratio A");
DoFloat("_ScaleRatioB", "Scale Ratio B");
DoFloat("_ScaleRatioC", "Scale Ratio C");
EditorGUI.EndDisabledGroup();
*/
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoMaskSubgroup()
{
DoVector("_MaskCoord", "Mask Bounds", s_XywhVectorLabels);
if (Selection.activeGameObject != null)
{
Renderer renderer = Selection.activeGameObject.GetComponent<Renderer>();
if (renderer != null)
{
Rect rect = EditorGUILayout.GetControlRect();
rect.x += EditorGUIUtility.labelWidth;
rect.width -= EditorGUIUtility.labelWidth;
if (GUI.Button(rect, "Match Renderer Bounds"))
{
FindProperty("_MaskCoord", m_Properties).vectorValue = new Vector4(
0,
0,
Mathf.Round(renderer.bounds.extents.x * 1000) / 1000,
Mathf.Round(renderer.bounds.extents.y * 1000) / 1000
);
}
}
}
if (s_MaskFeature.State == 1)
{
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
}
}
void DoMaskTexSubgroup()
{
EditorGUILayout.Space();
DoTexture2D("_MaskTex", "Mask Texture");
DoToggle("_MaskInverse", "Inverse Mask");
DoColor("_MaskEdgeColor", "Edge Color");
DoSlider("_MaskEdgeSoftness", "Edge Softness");
DoSlider("_MaskWipeControl", "Wipe Position");
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
// protected override void SetupMaterialKeywordsAndPassInternal(Material material)
// {
// BaseLitGUI.SetupBaseLitKeywords(material);
// BaseLitGUI.SetupBaseLitMaterialPass(material);
// }
}
}
#endif

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 85016528879d5d644981050d1d0a4368
timeCreated: 1469844718
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,642 +0,0 @@
#if HDRP_10_7_OR_NEWER
using UnityEngine;
using UnityEditor;
using UnityEditor.Rendering.HighDefinition;
namespace TMPro.EditorUtilities
{
internal class TMP_SDF_HDRPUnlitShaderGUI : TMP_BaseHDRPUnlitShaderGUI
{
#if !HDRP_11_OR_NEWER
const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit;
private readonly MaterialUIBlockList uiBlocks = new MaterialUIBlockList
{
new SurfaceOptionUIBlock(MaterialUIBlock.Expandable.Base, features: surfaceOptionFeatures),
new ShaderGraphUIBlock(MaterialUIBlock.Expandable.ShaderGraph, ShaderGraphUIBlock.Features.Unlit),
new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, ~AdvancedOptionsUIBlock.Features.SpecularOcclusion)
};
#endif
static ShaderFeature s_OutlineFeature, s_UnderlayFeature, s_BevelFeature, s_GlowFeature, s_MaskFeature;
static bool s_Face = true, s_Outline = true, s_Outline2 = true, s_Outline3 = true, s_Underlay = true, s_Lighting = true, s_Glow, s_Bevel, s_Light, s_Bump, s_Env;
static string[]
s_FaceUVSpeedName = { "_FaceUVSpeed" },
s_FaceUvSpeedNames = { "_FaceUVSpeedX", "_FaceUVSpeedY" },
s_OutlineUvSpeedNames = { "_OutlineUVSpeedX", "_OutlineUVSpeedY" },
s_OutlineUvSpeedName = { "_OutlineUVSpeed" };
/// <summary>
///
/// </summary>
static TMP_SDF_HDRPUnlitShaderGUI()
{
s_OutlineFeature = new ShaderFeature()
{
undoLabel = "Outline",
keywords = new[] { "OUTLINE_ON" }
};
s_UnderlayFeature = new ShaderFeature()
{
undoLabel = "Underlay",
keywords = new[] { "UNDERLAY_ON", "UNDERLAY_INNER" },
label = new GUIContent("Underlay Type"),
keywordLabels = new[]
{
new GUIContent("None"), new GUIContent("Normal"), new GUIContent("Inner")
}
};
s_BevelFeature = new ShaderFeature()
{
undoLabel = "Bevel",
keywords = new[] { "BEVEL_ON" }
};
s_GlowFeature = new ShaderFeature()
{
undoLabel = "Glow",
keywords = new[] { "GLOW_ON" }
};
s_MaskFeature = new ShaderFeature()
{
undoLabel = "Mask",
keywords = new[] { "MASK_HARD", "MASK_SOFT" },
label = new GUIContent("Mask"),
keywordLabels = new[]
{
new GUIContent("Mask Off"), new GUIContent("Mask Hard"), new GUIContent("Mask Soft")
}
};
}
/// <summary>
///
/// </summary>
public TMP_SDF_HDRPUnlitShaderGUI()
{
// Remove the ShaderGraphUIBlock to avoid having duplicated properties in the UI.
uiBlocks.RemoveAll(b => b is ShaderGraphUIBlock);
}
protected override void DoGUI()
{
s_Face = BeginPanel("Face", s_Face);
if (s_Face)
{
DoFacePanel();
}
EndPanel();
// Outline panels
DoOutlinePanels();
// Underlay panel
s_Underlay = BeginPanel("Underlay", s_Underlay);
if (s_Underlay)
{
DoUnderlayPanel();
}
EndPanel();
// Lighting panel
DrawLightingPanel();
/*
if (m_Material.HasProperty(ShaderUtilities.ID_GlowColor))
{
s_Glow = BeginPanel("Glow", s_GlowFeature, s_Glow);
if (s_Glow)
{
DoGlowPanel();
}
EndPanel();
}
*/
s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended);
if (s_DebugExtended)
{
DoDebugPanelSRP();
}
EndPanel();
EditorGUILayout.Space();
EditorGUILayout.Space();
// Draw HDRP panels
uiBlocks.OnGUI(m_Editor, m_Properties);
#if HDRP_12_OR_NEWER
ValidateMaterial(m_Material);
#else
SetupMaterialKeywordsAndPass(m_Material);
#endif
}
void DoFacePanel()
{
EditorGUI.indentLevel += 1;
DoColor("_FaceColor", "Color");
if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex))
{
if (m_Material.HasProperty("_FaceUVSpeedX"))
{
DoTexture2D("_FaceTex", "Texture", true, s_FaceUvSpeedNames);
}
else if (m_Material.HasProperty("_FaceUVSpeed"))
{
DoTexture2D("_FaceTex", "Texture", true, s_FaceUVSpeedName);
}
else
{
DoTexture2D("_FaceTex", "Texture", true);
}
}
if (m_Material.HasProperty("_Softness"))
{
DoSlider("_Softness", "X", new Vector2(0, 1), "Softness");
}
if (m_Material.HasProperty("_OutlineSoftness"))
{
DoSlider("_OutlineSoftness", "Softness");
}
if (m_Material.HasProperty(ShaderUtilities.ID_FaceDilate))
{
DoSlider("_FaceDilate", "Dilate");
if (m_Material.HasProperty(ShaderUtilities.ID_Shininess))
{
DoSlider("_FaceShininess", "Gloss");
}
}
if (m_Material.HasProperty(ShaderUtilities.ID_IsoPerimeter))
{
DoSlider("_IsoPerimeter", "X", new Vector2(-1, 1), "Dilate");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoOutlinePanels()
{
s_Outline = BeginPanel("Outline 1", s_Outline);
if (s_Outline)
DoOutlinePanelWithTexture(1, "Y", "Color");
EndPanel();
s_Outline2 = BeginPanel("Outline 2", s_Outline2);
if (s_Outline2)
DoOutlinePanel(2, "Z", "Color");
EndPanel();
s_Outline3 = BeginPanel("Outline 3", s_Outline3);
if (s_Outline3)
DoOutlinePanel(3, "W", "Color");
EndPanel();
}
void DoOutlinePanel(int outlineID, string propertyField, string label)
{
EditorGUI.indentLevel += 1;
DoColor("_OutlineColor" + outlineID, label);
if (outlineID != 3)
DoOffset("_OutlineOffset" + outlineID, "Offset");
else
{
if (m_Material.GetFloat(ShaderUtilities.ID_OutlineMode) == 0)
DoOffset("_OutlineOffset" + outlineID, "Offset");
}
DoSlider("_Softness", propertyField, new Vector2(0, 1), "Softness");
DoSlider("_IsoPerimeter", propertyField, new Vector2(-1, 1), "Dilate");
if (outlineID == 3)
{
DoToggle("_OutlineMode", "Outline Mode");
}
if (m_Material.HasProperty("_OutlineShininess"))
{
//DoSlider("_OutlineShininess", "Gloss");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoOutlinePanelWithTexture(int outlineID, string propertyField, string label)
{
EditorGUI.indentLevel += 1;
DoColor("_OutlineColor" + outlineID, label);
if (m_Material.HasProperty(ShaderUtilities.ID_OutlineTex))
{
if (m_Material.HasProperty("_OutlineUVSpeedX"))
{
DoTexture2D("_OutlineTex", "Texture", true, s_OutlineUvSpeedNames);
}
else if (m_Material.HasProperty("_OutlineUVSpeed"))
{
DoTexture2D("_OutlineTex", "Texture", true, s_OutlineUvSpeedName);
}
else
{
DoTexture2D("_OutlineTex", "Texture", true);
}
}
DoOffset("_OutlineOffset" + outlineID, "Offset");
DoSlider("_Softness", propertyField, new Vector2(0, 1), "Softness");
DoSlider("_IsoPerimeter", propertyField, new Vector2(-1, 1), "Dilate");
if (m_Material.HasProperty("_OutlineShininess"))
{
//DoSlider("_OutlineShininess", "Gloss");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoUnderlayPanel()
{
EditorGUI.indentLevel += 1;
if (m_Material.HasProperty(ShaderUtilities.ID_IsoPerimeter))
{
DoColor("_UnderlayColor", "Color");
DoSlider("_UnderlayOffset", "X", new Vector2(-1, 1), "Offset X");
DoSlider("_UnderlayOffset", "Y", new Vector2(-1, 1), "Offset Y");
DoSlider("_UnderlayDilate", new Vector2(-1, 1), "Dilate");
DoSlider("_UnderlaySoftness", new Vector2(0, 1), "Softness");
}
else
{
s_UnderlayFeature.DoPopup(m_Editor, m_Material);
DoColor("_UnderlayColor", "Color");
DoSlider("_UnderlayOffsetX", "Offset X");
DoSlider("_UnderlayOffsetY", "Offset Y");
DoSlider("_UnderlayDilate", "Dilate");
DoSlider("_UnderlaySoftness", "Softness");
}
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
static GUIContent[] s_BevelTypeLabels =
{
new GUIContent("Outer Bevel"),
new GUIContent("Inner Bevel")
};
void DrawLightingPanel()
{
s_Lighting = BeginPanel("Lighting", s_Lighting);
if (s_Lighting)
{
s_Bevel = BeginPanel("Bevel", s_Bevel);
if (s_Bevel)
{
DoBevelPanel();
}
EndPanel();
s_Light = BeginPanel("Local Lighting", s_Light);
if (s_Light)
{
DoLocalLightingPanel();
}
EndPanel();
/*
s_Bump = BeginPanel("Bump Map", s_Bump);
if (s_Bump)
{
DoBumpMapPanel();
}
EndPanel();
s_Env = BeginPanel("Environment Map", s_Env);
if (s_Env)
{
DoEnvMapPanel();
}
EndPanel();
*/
}
EndPanel();
}
void DoBevelPanel()
{
EditorGUI.indentLevel += 1;
DoPopup("_BevelType", "Type", s_BevelTypeLabels);
DoSlider("_BevelAmount", "Amount");
DoSlider("_BevelOffset", "Offset");
DoSlider("_BevelWidth", "Width");
DoSlider("_BevelRoundness", "Roundness");
DoSlider("_BevelClamp", "Clamp");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoLocalLightingPanel()
{
EditorGUI.indentLevel += 1;
DoSlider("_LightAngle", "Light Angle");
DoColor("_SpecularColor", "Specular Color");
DoSlider("_SpecularPower", "Specular Power");
DoSlider("_Reflectivity", "Reflectivity Power");
DoSlider("_Diffuse", "Diffuse Shadow");
DoSlider("_Ambient", "Ambient Shadow");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoSurfaceLightingPanel()
{
EditorGUI.indentLevel += 1;
DoColor("_SpecColor", "Specular Color");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoBumpMapPanel()
{
EditorGUI.indentLevel += 1;
DoTexture2D("_BumpMap", "Texture");
DoSlider("_BumpFace", "Face");
DoSlider("_BumpOutline", "Outline");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoEnvMapPanel()
{
EditorGUI.indentLevel += 1;
DoColor("_ReflectFaceColor", "Face Color");
DoColor("_ReflectOutlineColor", "Outline Color");
DoCubeMap("_Cube", "Texture");
DoVector3("_EnvMatrixRotation", "Rotation");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoGlowPanel()
{
EditorGUI.indentLevel += 1;
DoColor("_GlowColor", "Color");
DoSlider("_GlowOffset", "Offset");
DoSlider("_GlowInner", "Inner");
DoSlider("_GlowOuter", "Outer");
DoSlider("_GlowPower", "Power");
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoDebugPanel()
{
EditorGUI.indentLevel += 1;
DoTexture2D("_MainTex", "Font Atlas");
DoFloat("_GradientScale", "Gradient Scale");
DoFloat("_TextureWidth", "Texture Width");
DoFloat("_TextureHeight", "Texture Height");
EditorGUILayout.Space();
DoFloat("_ScaleX", "Scale X");
DoFloat("_ScaleY", "Scale Y");
if (m_Material.HasProperty(ShaderUtilities.ID_Sharpness))
DoSlider("_Sharpness", "Sharpness");
DoSlider("_PerspectiveFilter", "Perspective Filter");
EditorGUILayout.Space();
DoFloat("_VertexOffsetX", "Offset X");
DoFloat("_VertexOffsetY", "Offset Y");
if (m_Material.HasProperty(ShaderUtilities.ID_MaskCoord))
{
EditorGUILayout.Space();
s_MaskFeature.ReadState(m_Material);
s_MaskFeature.DoPopup(m_Editor, m_Material);
if (s_MaskFeature.Active)
{
DoMaskSubgroup();
}
EditorGUILayout.Space();
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
else if (m_Material.HasProperty("_MaskTex"))
{
DoMaskTexSubgroup();
}
else if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
{
EditorGUILayout.Space();
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
if (m_Material.HasProperty(ShaderUtilities.ID_StencilID))
{
EditorGUILayout.Space();
DoFloat("_Stencil", "Stencil ID");
DoFloat("_StencilComp", "Stencil Comp");
}
EditorGUILayout.Space();
EditorGUI.BeginChangeCheck();
bool useRatios = EditorGUILayout.Toggle("Use Ratios", !m_Material.IsKeywordEnabled("RATIOS_OFF"));
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo("Use Ratios");
if (useRatios)
{
m_Material.DisableKeyword("RATIOS_OFF");
}
else
{
m_Material.EnableKeyword("RATIOS_OFF");
}
}
if (m_Material.HasProperty(ShaderUtilities.ShaderTag_CullMode))
{
EditorGUILayout.Space();
DoPopup("_CullMode", "Cull Mode", s_CullingTypeLabels);
}
EditorGUILayout.Space();
EditorGUI.BeginDisabledGroup(true);
DoFloat("_ScaleRatioA", "Scale Ratio A");
DoFloat("_ScaleRatioB", "Scale Ratio B");
DoFloat("_ScaleRatioC", "Scale Ratio C");
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoDebugPanelSRP()
{
EditorGUI.indentLevel += 1;
DoTexture2D("_MainTex", "Font Atlas");
DoFloat("_GradientScale", "Gradient Scale");
//DoFloat("_TextureWidth", "Texture Width");
//DoFloat("_TextureHeight", "Texture Height");
EditorGUILayout.Space();
/*
DoFloat("_ScaleX", "Scale X");
DoFloat("_ScaleY", "Scale Y");
if (m_Material.HasProperty(ShaderUtilities.ID_Sharpness))
DoSlider("_Sharpness", "Sharpness");
DoSlider("_PerspectiveFilter", "Perspective Filter");
EditorGUILayout.Space();
DoFloat("_VertexOffsetX", "Offset X");
DoFloat("_VertexOffsetY", "Offset Y");
if (m_Material.HasProperty(ShaderUtilities.ID_MaskCoord))
{
EditorGUILayout.Space();
s_MaskFeature.ReadState(m_Material);
s_MaskFeature.DoPopup(m_Editor, m_Material);
if (s_MaskFeature.Active)
{
DoMaskSubgroup();
}
EditorGUILayout.Space();
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
else if (m_Material.HasProperty("_MaskTex"))
{
DoMaskTexSubgroup();
}
else if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
{
EditorGUILayout.Space();
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
if (m_Material.HasProperty(ShaderUtilities.ID_StencilID))
{
EditorGUILayout.Space();
DoFloat("_Stencil", "Stencil ID");
DoFloat("_StencilComp", "Stencil Comp");
}
EditorGUILayout.Space();
EditorGUI.BeginChangeCheck();
bool useRatios = EditorGUILayout.Toggle("Use Ratios", !m_Material.IsKeywordEnabled("RATIOS_OFF"));
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo("Use Ratios");
if (useRatios)
{
m_Material.DisableKeyword("RATIOS_OFF");
}
else
{
m_Material.EnableKeyword("RATIOS_OFF");
}
}
*/
if (m_Material.HasProperty(ShaderUtilities.ShaderTag_CullMode))
{
EditorGUILayout.Space();
DoPopup("_CullMode", "Cull Mode", s_CullingTypeLabels);
}
EditorGUILayout.Space();
/*
EditorGUI.BeginDisabledGroup(true);
DoFloat("_ScaleRatioA", "Scale Ratio A");
DoFloat("_ScaleRatioB", "Scale Ratio B");
DoFloat("_ScaleRatioC", "Scale Ratio C");
EditorGUI.EndDisabledGroup();
*/
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
}
void DoMaskSubgroup()
{
DoVector("_MaskCoord", "Mask Bounds", s_XywhVectorLabels);
if (Selection.activeGameObject != null)
{
Renderer renderer = Selection.activeGameObject.GetComponent<Renderer>();
if (renderer != null)
{
Rect rect = EditorGUILayout.GetControlRect();
rect.x += EditorGUIUtility.labelWidth;
rect.width -= EditorGUIUtility.labelWidth;
if (GUI.Button(rect, "Match Renderer Bounds"))
{
FindProperty("_MaskCoord", m_Properties).vectorValue = new Vector4(
0,
0,
Mathf.Round(renderer.bounds.extents.x * 1000) / 1000,
Mathf.Round(renderer.bounds.extents.y * 1000) / 1000
);
}
}
}
if (s_MaskFeature.State == 1)
{
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
}
}
void DoMaskTexSubgroup()
{
EditorGUILayout.Space();
DoTexture2D("_MaskTex", "Mask Texture");
DoToggle("_MaskInverse", "Inverse Mask");
DoColor("_MaskEdgeColor", "Edge Color");
DoSlider("_MaskEdgeSoftness", "Edge Softness");
DoSlider("_MaskWipeControl", "Wipe Position");
DoFloat("_MaskSoftnessX", "Softness X");
DoFloat("_MaskSoftnessY", "Softness Y");
DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
}
// protected override void SetupMaterialKeywordsAndPassInternal(Material material)
// {
// BaseLitGUI.SetupBaseLitKeywords(material);
// BaseLitGUI.SetupBaseLitMaterialPass(material);
// }
}
}
#endif

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: bad96c2cfa78a124cb8ec890d2386dfe
timeCreated: 1469844718
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,63 +0,0 @@
using UnityEditorInternal;
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
namespace TMPro.EditorUtilities
{
[CustomPropertyDrawer(typeof(TMP_Dropdown.OptionDataList), true)]
class DropdownOptionListDrawer : PropertyDrawer
{
private ReorderableList m_ReorderableList;
private void Init(SerializedProperty property)
{
if (m_ReorderableList != null)
return;
SerializedProperty array = property.FindPropertyRelative("m_Options");
m_ReorderableList = new ReorderableList(property.serializedObject, array);
m_ReorderableList.drawElementCallback = DrawOptionData;
m_ReorderableList.drawHeaderCallback = DrawHeader;
m_ReorderableList.elementHeight += 40;
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
Init(property);
m_ReorderableList.DoList(position);
}
private void DrawHeader(Rect rect)
{
GUI.Label(rect, "Options");
}
private void DrawOptionData(Rect rect, int index, bool isActive, bool isFocused)
{
SerializedProperty itemData = m_ReorderableList.serializedProperty.GetArrayElementAtIndex(index);
SerializedProperty itemText = itemData.FindPropertyRelative("m_Text");
SerializedProperty itemImage = itemData.FindPropertyRelative("m_Image");
SerializedProperty itemColor = itemData.FindPropertyRelative("m_Color");
RectOffset offset = new RectOffset(0, 0, -1, -3);
rect = offset.Add(rect);
rect.height = EditorGUIUtility.singleLineHeight;
EditorGUI.PropertyField(rect, itemText, GUIContent.none);
rect.y += EditorGUIUtility.singleLineHeight + 2;
EditorGUI.PropertyField(rect, itemImage, GUIContent.none);
rect.y += EditorGUIUtility.singleLineHeight + 2;
EditorGUI.PropertyField(rect, itemColor, GUIContent.none);
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
Init(property);
return m_ReorderableList.GetHeight();
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 705d3db7bce31a7439cc4c95cde5b04f
timeCreated: 1464818008
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,273 +0,0 @@
using UnityEngine;
using UnityEditor;
namespace TMPro.EditorUtilities
{
[CustomPropertyDrawer(typeof(TextAlignmentOptions))]
public class TMP_TextAlignmentDrawer : PropertyDrawer
{
const int k_AlignmentButtonWidth = 24;
const int k_AlignmentButtonHeight = 20;
const int k_WideViewWidth = 504;
const int k_ControlsSpacing = 6;
const int k_GroupWidth = k_AlignmentButtonWidth * 6;
static readonly int k_TextAlignmentHash = "DoTextAligmentControl".GetHashCode();
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUIUtility.currentViewWidth > k_WideViewWidth ? k_AlignmentButtonHeight : k_AlignmentButtonHeight * 2 + 3;
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var id = GUIUtility.GetControlID(k_TextAlignmentHash, FocusType.Keyboard, position);
EditorGUI.BeginProperty(position, label, property);
{
var controlArea = EditorGUI.PrefixLabel(position, id, label);
var horizontalAligment = new Rect(controlArea.x, controlArea.y, k_GroupWidth, k_AlignmentButtonHeight);
var verticalAligment = new Rect(!(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.x : horizontalAligment.xMax + k_ControlsSpacing, !(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.y + k_AlignmentButtonHeight + 3 : controlArea.y, k_GroupWidth, k_AlignmentButtonHeight);
EditorGUI.BeginChangeCheck();
var selectedHorizontal = DoHorizontalAligmentControl(horizontalAligment, property);
var selectedVertical = DoVerticalAligmentControl(verticalAligment, property);
if (EditorGUI.EndChangeCheck())
{
var value = (0x1 << selectedHorizontal) | (0x100 << selectedVertical);
property.intValue = value;
}
}
EditorGUI.EndProperty();
}
static int DoHorizontalAligmentControl(Rect position, SerializedProperty alignment)
{
var selected = TMP_EditorUtility.GetHorizontalAlignmentGridValue(alignment.intValue);
var values = new bool[6];
values[selected] = true;
if (alignment.hasMultipleDifferentValues)
{
foreach (var obj in alignment.serializedObject.targetObjects)
{
var text = obj as TMP_Text;
if (text != null)
{
values[TMP_EditorUtility.GetHorizontalAlignmentGridValue((int)text.alignment)] = true;
}
}
}
position.width = k_AlignmentButtonWidth;
for (var i = 0; i < values.Length; i++)
{
var oldValue = values[i];
var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentA[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid));
if (newValue != oldValue)
{
selected = i;
}
position.x += position.width;
}
return selected;
}
static int DoVerticalAligmentControl(Rect position, SerializedProperty alignment)
{
var selected = TMP_EditorUtility.GetVerticalAlignmentGridValue(alignment.intValue);
var values = new bool[6];
values[selected] = true;
if (alignment.hasMultipleDifferentValues)
{
foreach (var obj in alignment.serializedObject.targetObjects)
{
var text = obj as TMP_Text;
if (text != null)
{
values[TMP_EditorUtility.GetVerticalAlignmentGridValue((int)text.alignment)] = true;
}
}
}
position.width = k_AlignmentButtonWidth;
for (var i = 0; i < values.Length; i++)
{
var oldValue = values[i];
var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentB[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid));
if (newValue != oldValue)
{
selected = i;
}
position.x += position.width;
}
return selected;
}
}
[CustomPropertyDrawer(typeof(HorizontalAlignmentOptions))]
public class TMP_HorizontalAlignmentDrawer : PropertyDrawer
{
const int k_AlignmentButtonWidth = 24;
const int k_AlignmentButtonHeight = 20;
const int k_WideViewWidth = 504;
const int k_ControlsSpacing = 6;
const int k_GroupWidth = k_AlignmentButtonWidth * 6;
static readonly int k_TextAlignmentHash = "DoTextAligmentControl".GetHashCode();
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUIUtility.currentViewWidth > k_WideViewWidth ? k_AlignmentButtonHeight : k_AlignmentButtonHeight * 2 + 3;
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var id = GUIUtility.GetControlID(k_TextAlignmentHash, FocusType.Keyboard, position);
EditorGUI.BeginProperty(position, label, property);
{
var controlArea = EditorGUI.PrefixLabel(position, id, label);
var horizontalAligment = new Rect(controlArea.x, controlArea.y, k_GroupWidth, k_AlignmentButtonHeight);
//var verticalAligment = new Rect(!(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.x : horizontalAligment.xMax + k_ControlsSpacing, !(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.y + k_AlignmentButtonHeight + 3 : controlArea.y, k_GroupWidth, k_AlignmentButtonHeight);
EditorGUI.BeginChangeCheck();
var selectedHorizontal = DoHorizontalAligmentControl(horizontalAligment, property);
if (EditorGUI.EndChangeCheck())
{
var value = 0x1 << selectedHorizontal;
property.intValue = value;
}
}
EditorGUI.EndProperty();
}
static int DoHorizontalAligmentControl(Rect position, SerializedProperty alignment)
{
var selected = TMP_EditorUtility.GetHorizontalAlignmentGridValue(alignment.intValue);
var values = new bool[6];
values[selected] = true;
if (alignment.hasMultipleDifferentValues)
{
foreach (var obj in alignment.serializedObject.targetObjects)
{
var text = obj as TMP_Text;
if (text != null)
{
values[TMP_EditorUtility.GetHorizontalAlignmentGridValue((int)text.horizontalAlignment)] = true;
}
}
}
position.width = k_AlignmentButtonWidth;
for (var i = 0; i < values.Length; i++)
{
var oldValue = values[i];
var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentA[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid));
if (newValue != oldValue)
{
selected = i;
}
position.x += position.width;
}
return selected;
}
}
[CustomPropertyDrawer(typeof(VerticalAlignmentOptions))]
public class TMP_VerticalAlignmentDrawer : PropertyDrawer
{
const int k_AlignmentButtonWidth = 24;
const int k_AlignmentButtonHeight = 20;
const int k_WideViewWidth = 504;
const int k_ControlsSpacing = 6;
const int k_GroupWidth = k_AlignmentButtonWidth * 6;
static readonly int k_TextAlignmentHash = "DoTextAligmentControl".GetHashCode();
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUIUtility.currentViewWidth > k_WideViewWidth ? k_AlignmentButtonHeight : k_AlignmentButtonHeight * 2 + 3;
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var id = GUIUtility.GetControlID(k_TextAlignmentHash, FocusType.Keyboard, position);
EditorGUI.BeginProperty(position, label, property);
{
var controlArea = EditorGUI.PrefixLabel(position, id, label);
var horizontalAligment = new Rect(controlArea.x, controlArea.y, k_GroupWidth, k_AlignmentButtonHeight);
var verticalAligment = new Rect(!(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.x : horizontalAligment.xMax + k_ControlsSpacing, !(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.y + k_AlignmentButtonHeight + 3 : controlArea.y, k_GroupWidth, k_AlignmentButtonHeight);
EditorGUI.BeginChangeCheck();
//var selectedHorizontal = DoHorizontalAligmentControl(horizontalAligment, property);
var selectedVertical = DoVerticalAligmentControl(verticalAligment, property);
if (EditorGUI.EndChangeCheck())
{
var value = 0x100 << selectedVertical;
property.intValue = value;
}
}
EditorGUI.EndProperty();
}
static int DoVerticalAligmentControl(Rect position, SerializedProperty alignment)
{
var selected = TMP_EditorUtility.GetVerticalAlignmentGridValue(alignment.intValue);
var values = new bool[6];
values[selected] = true;
if (alignment.hasMultipleDifferentValues)
{
foreach (var obj in alignment.serializedObject.targetObjects)
{
var text = obj as TMP_Text;
if (text != null)
{
values[TMP_EditorUtility.GetVerticalAlignmentGridValue((int)text.verticalAlignment)] = true;
}
}
}
position.width = k_AlignmentButtonWidth;
for (var i = 0; i < values.Length; i++)
{
var oldValue = values[i];
var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentB[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid));
if (newValue != oldValue)
{
selected = i;
}
position.x += position.width;
}
return selected;
}
}
}

View File

@@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: ea87c857d2c45f64ebe967330244a515
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 53dc282e104b7b3499778bb50cb28216
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,699 +0,0 @@
using UnityEngine;
using UnityEngine.TextCore.Text;
using UnityEditor;
namespace TMPro.EditorUtilities
{
/// <summary>Base class for TextMesh Pro shader GUIs.</summary>
public abstract class TMP_BaseShaderGUI : ShaderGUI
{
/// <summary>Representation of a #pragma shader_feature.</summary>
/// <description>It is assumed that the first feature option is for no keyword (underscores).</description>
protected class ShaderFeature
{
public string undoLabel;
public GUIContent label;
/// <summary>The keyword labels, for display. Include the no-keyword as the first option.</summary>
public GUIContent[] keywordLabels;
/// <summary>The shader keywords. Exclude the no-keyword option.</summary>
public string[] keywords;
int m_State;
public bool Active
{
get { return m_State >= 0; }
}
public int State
{
get { return m_State; }
}
public void ReadState(Material material)
{
for (int i = 0; i < keywords.Length; i++)
{
if (material.IsKeywordEnabled(keywords[i]))
{
m_State = i;
return;
}
}
m_State = -1;
}
public void SetActive(bool active, Material material)
{
m_State = active ? 0 : -1;
SetStateKeywords(material);
}
public void DoPopup(MaterialEditor editor, Material material)
{
EditorGUI.BeginChangeCheck();
int selection = EditorGUILayout.Popup(label, m_State + 1, keywordLabels);
if (EditorGUI.EndChangeCheck())
{
m_State = selection - 1;
editor.RegisterPropertyChangeUndo(undoLabel);
SetStateKeywords(material);
}
}
void SetStateKeywords(Material material)
{
for (int i = 0; i < keywords.Length; i++)
{
if (i == m_State)
{
material.EnableKeyword(keywords[i]);
}
else
{
material.DisableKeyword(keywords[i]);
}
}
}
}
static GUIContent s_TempLabel = new GUIContent();
protected static bool s_DebugExtended;
static int s_UndoRedoCount, s_LastSeenUndoRedoCount;
static float[][] s_TempFloats =
{
null, new float[1], new float[2], new float[3], new float[4]
};
protected static GUIContent[] s_XywhVectorLabels =
{
new GUIContent("X"),
new GUIContent("Y"),
new GUIContent("W", "Width"),
new GUIContent("H", "Height")
};
protected static GUIContent[] s_LbrtVectorLabels =
{
new GUIContent("L", "Left"),
new GUIContent("B", "Bottom"),
new GUIContent("R", "Right"),
new GUIContent("T", "Top")
};
protected static GUIContent[] s_CullingTypeLabels =
{
new GUIContent("Off"),
new GUIContent("Front"),
new GUIContent("Back")
};
static TMP_BaseShaderGUI()
{
// Keep track of how many undo/redo events happened.
Undo.undoRedoPerformed += () => s_UndoRedoCount += 1;
}
bool m_IsNewGUI = true;
float m_DragAndDropMinY;
protected MaterialEditor m_Editor;
protected Material m_Material;
private int m_ShaderID;
protected MaterialProperty[] m_Properties;
void PrepareGUI()
{
m_IsNewGUI = false;
ShaderUtilities.GetShaderPropertyIDs();
// New GUI just got constructed. This happens in response to a selection,
// but also after undo/redo events.
if (s_LastSeenUndoRedoCount != s_UndoRedoCount)
{
// There's been at least one undo/redo since the last time this GUI got constructed.
// Maybe the undo/redo was for this material? Assume that is was.
TextEventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material);
}
s_LastSeenUndoRedoCount = s_UndoRedoCount;
}
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
m_Editor = materialEditor;
m_Material = materialEditor.target as Material;
this.m_Properties = properties;
if (m_IsNewGUI)
PrepareGUI();
DoDragAndDropBegin();
EditorGUI.BeginChangeCheck();
DoGUI();
if (EditorGUI.EndChangeCheck())
{
TextEventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material);
}
DoDragAndDropEnd();
}
public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)
{
base.AssignNewShaderToMaterial(material, oldShader, newShader);
TextEventManager.ON_MATERIAL_PROPERTY_CHANGED(true, material);
}
/// <summary>Override this method to create the specific shader GUI.</summary>
protected abstract void DoGUI();
static string[] s_PanelStateLabel = new string[] { "\t- <i>Click to collapse</i> -", "\t- <i>Click to expand</i> -" };
protected bool BeginPanel(string panel, bool expanded)
{
EditorGUI.indentLevel = 0;
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
r.x += 20;
r.width += 6;
bool enabled = GUI.enabled;
GUI.enabled = true;
expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
r.width -= 30;
EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
GUI.enabled = enabled;
EditorGUI.indentLevel += 1;
EditorGUI.BeginDisabledGroup(false);
return expanded;
}
protected bool BeginPanel(string panel, ShaderFeature feature, bool expanded, bool readState = true)
{
EditorGUI.indentLevel = 0;
if (readState)
{
feature.ReadState(m_Material);
}
EditorGUI.BeginChangeCheck();
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
GUILayout.BeginHorizontal();
Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 20, GUILayout.Width(20f)));
bool active = EditorGUI.Toggle(r, feature.Active);
if (EditorGUI.EndChangeCheck())
{
m_Editor.RegisterPropertyChangeUndo(feature.undoLabel);
feature.SetActive(active, m_Material);
}
r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
r.width += 6;
bool enabled = GUI.enabled;
GUI.enabled = true;
expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
r.width -= 10;
EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
GUI.enabled = enabled;
GUILayout.EndHorizontal();
EditorGUI.indentLevel += 1;
EditorGUI.BeginDisabledGroup(!active);
return expanded;
}
public void EndPanel()
{
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel -= 1;
EditorGUILayout.EndVertical();
}
MaterialProperty BeginProperty(string name)
{
MaterialProperty property = FindProperty(name, m_Properties);
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = property.hasMixedValue;
m_Editor.BeginAnimatedCheck(Rect.zero, property);
return property;
}
bool EndProperty()
{
m_Editor.EndAnimatedCheck();
EditorGUI.showMixedValue = false;
return EditorGUI.EndChangeCheck();
}
protected void DoPopup(string name, string label, GUIContent[] options)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
int index = EditorGUILayout.Popup(s_TempLabel, (int)property.floatValue, options);
if (EndProperty())
{
property.floatValue = index;
}
}
protected void DoCubeMap(string name, string label)
{
DoTexture(name, label, typeof(Cubemap));
}
protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null)
{
DoTexture(name, label, typeof(Texture2D), withTilingOffset, speedNames);
}
void DoTexture(string name, string label, System.Type type, bool withTilingOffset = false, string[] speedNames = null)
{
float objFieldSize = 60f;
bool smallLayout = EditorGUIUtility.currentViewWidth <= 330f && (withTilingOffset || speedNames != null);
float controlHeight = smallLayout ? objFieldSize * 2 : objFieldSize;
MaterialProperty property = FindProperty(name, m_Properties);
m_Editor.BeginAnimatedCheck(Rect.zero, property);
Rect rect = EditorGUILayout.GetControlRect(true, controlHeight);
float totalWidth = rect.width;
rect.width = EditorGUIUtility.labelWidth + objFieldSize;
rect.height = objFieldSize;
s_TempLabel.text = label;
EditorGUI.BeginChangeCheck();
Object tex = EditorGUI.ObjectField(rect, s_TempLabel, property.textureValue, type, false);
if (EditorGUI.EndChangeCheck())
{
property.textureValue = tex as Texture;
}
float additionalHeight = controlHeight - objFieldSize;
float xOffset = smallLayout ? rect.width - objFieldSize : rect.width;
rect.y += additionalHeight;
rect.x += xOffset;
rect.width = totalWidth - xOffset;
rect.height = EditorGUIUtility.singleLineHeight;
if (withTilingOffset)
{
DoTilingOffset(rect, property);
rect.y += (rect.height + 2f) * 2f;
}
m_Editor.EndAnimatedCheck();
if (speedNames != null)
{
DoUVSpeed(rect, speedNames);
}
}
void DoTilingOffset(Rect rect, MaterialProperty property)
{
float labelWidth = EditorGUIUtility.labelWidth;
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.40f);
Vector4 vector = property.textureScaleAndOffset;
bool changed = false;
float[] values = s_TempFloats[2];
s_TempLabel.text = "Tiling";
Rect vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
values[0] = vector.x;
values[1] = vector.y;
EditorGUI.BeginChangeCheck();
EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
if (EditorGUI.EndChangeCheck())
{
vector.x = values[0];
vector.y = values[1];
changed = true;
}
rect.y += rect.height + 2f;
s_TempLabel.text = "Offset";
vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
values[0] = vector.z;
values[1] = vector.w;
EditorGUI.BeginChangeCheck();
EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
if (EditorGUI.EndChangeCheck())
{
vector.z = values[0];
vector.w = values[1];
changed = true;
}
if (changed)
{
property.textureScaleAndOffset = vector;
}
EditorGUIUtility.labelWidth = labelWidth;
EditorGUI.indentLevel = indentLevel;
}
protected void DoUVSpeed(Rect rect, string[] names)
{
float labelWidth = EditorGUIUtility.labelWidth;
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.40f);
s_TempLabel.text = "Speed";
rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
EditorGUIUtility.labelWidth = 10f;
rect.width = rect.width * 0.5f - 2f;
if (names.Length == 1)
{
DoFloat2(rect, names[0]);
}
else
{
DoFloat(rect, names[0], "X");
rect.x += rect.width + 4f;
DoFloat(rect, names[1], "Y");
}
EditorGUIUtility.labelWidth = labelWidth;
EditorGUI.indentLevel = indentLevel;
}
protected void DoToggle(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
bool value = EditorGUILayout.Toggle(s_TempLabel, property.floatValue == 1f);
if (EndProperty())
{
property.floatValue = value ? 1f : 0f;
}
}
protected void DoFloat(string name, string label)
{
MaterialProperty property = BeginProperty(name);
Rect rect = EditorGUILayout.GetControlRect();
rect.width = EditorGUIUtility.labelWidth + 55f;
s_TempLabel.text = label;
float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoColor(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, false, true, true);
if (EndProperty())
{
property.colorValue = value;
}
}
void DoFloat(Rect rect, string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
if (EndProperty())
{
property.floatValue = value;
}
}
void DoFloat2(Rect rect, string name)
{
MaterialProperty property = BeginProperty(name);
float x = EditorGUI.FloatField(rect, "X", property.vectorValue.x);
rect.x += rect.width + 4f;
float y = EditorGUI.FloatField(rect, "Y", property.vectorValue.y);
if (EndProperty())
{
property.vectorValue = new Vector2(x, y);
}
}
protected void DoOffset(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector2 value = EditorGUI.Vector2Field(EditorGUILayout.GetControlRect(), s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoSlider(string name, string label)
{
MaterialProperty property = BeginProperty(name);
Vector2 range = property.rangeLimits;
s_TempLabel.text = label;
float value = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoSlider(string name, Vector2 range, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
float value = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y);
if (EndProperty())
{
property.floatValue = value;
}
}
protected void DoSlider(string propertyName, string propertyField, string label)
{
MaterialProperty property = BeginProperty(propertyName);
Vector2 range = property.rangeLimits;
s_TempLabel.text = label;
Vector4 value = property.vectorValue;
switch (propertyField)
{
case "X":
value.x = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.x, range.x, range.y);
break;
case "Y":
value.y = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.y, range.x, range.y);
break;
case "Z":
value.z = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.z, range.x, range.y);
break;
case "W":
value.w = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.w, range.x, range.y);
break;
}
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoSlider(string propertyName, string propertyField, Vector2 range, string label)
{
MaterialProperty property = BeginProperty(propertyName);
s_TempLabel.text = label;
Vector4 value = property.vectorValue;
switch (propertyField)
{
case "X":
value.x = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.x, range.x, range.y);
break;
case "Y":
value.y = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.y, range.x, range.y);
break;
case "Z":
value.z = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.z, range.x, range.y);
break;
case "W":
value.w = EditorGUI.Slider(EditorGUILayout.GetControlRect(), s_TempLabel, value.w, range.x, range.y);
break;
}
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector2(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector3(string name, string label)
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
if (EndProperty())
{
property.vectorValue = value;
}
}
protected void DoVector(string name, string label, GUIContent[] subLabels)
{
MaterialProperty property = BeginProperty(name);
Rect rect = EditorGUILayout.GetControlRect();
s_TempLabel.text = label;
rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
Vector4 vector = property.vectorValue;
float[] values = s_TempFloats[subLabels.Length];
for (int i = 0; i < subLabels.Length; i++)
{
values[i] = vector[i];
}
EditorGUI.MultiFloatField(rect, subLabels, values);
if (EndProperty())
{
for (int i = 0; i < subLabels.Length; i++)
{
vector[i] = values[i];
}
property.vectorValue = vector;
}
}
bool IsNewShader()
{
if (m_Material == null)
return false;
int currentShaderID = m_Material.shader.GetInstanceID();
if (m_ShaderID == currentShaderID)
return false;
m_ShaderID = currentShaderID;
return true;
}
void DoDragAndDropBegin()
{
m_DragAndDropMinY = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)).y;
}
void DoDragAndDropEnd()
{
Rect rect = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true));
Event evt = Event.current;
if (evt.type == EventType.DragUpdated)
{
DragAndDrop.visualMode = DragAndDropVisualMode.Generic;
evt.Use();
}
else if (evt.type == EventType.DragPerform && Rect.MinMaxRect(rect.xMin, m_DragAndDropMinY, rect.xMax, rect.yMax).Contains(evt.mousePosition))
{
DragAndDrop.AcceptDrag();
evt.Use();
Material droppedMaterial = DragAndDrop.objectReferences[0] as Material;
if (droppedMaterial && droppedMaterial != m_Material)
{
PerformDrop(droppedMaterial);
}
}
else if (evt.type == EventType.DragExited)
{
if (IsNewShader())
TextEventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material);
}
}
void PerformDrop(Material droppedMaterial)
{
Texture droppedTex = droppedMaterial.GetTexture(ShaderUtilities.ID_MainTex);
if (!droppedTex)
{
return;
}
Texture currentTex = m_Material.GetTexture(ShaderUtilities.ID_MainTex);
FontAsset requiredFontAsset = null;
if (droppedTex != currentTex)
{
requiredFontAsset = TMP_EditorUtility.FindMatchingFontAsset(droppedMaterial);
if (!requiredFontAsset)
{
return;
}
}
foreach (GameObject o in Selection.gameObjects)
{
if (requiredFontAsset)
{
TMP_Text textComponent = o.GetComponent<TMP_Text>();
if (textComponent)
{
Undo.RecordObject(textComponent, "Font Asset Change");
textComponent.font = requiredFontAsset;
}
}
TextEventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(o, m_Material, droppedMaterial);
EditorUtility.SetDirty(o);
}
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 5b568c26a0e77b24ea4badb24f550576
timeCreated: 1469844810
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More